.CodeMirror {
    display: none;
} 



body {
    overscroll-behavior: none;
    /* Prevent pull-to-refresh and overscroll glow */
    margin: 0 !important;
    padding: 0 !important;
}

/* Use border-box sizing everywhere to avoid overflow from padding/borders */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Prevent horizontal panning/blank space on mobile */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}


  
button ,input, textarea {
    padding: 6px ;
    border-radius: 4px ;
    background-color: white ;
    color: black ;
    border: 1px solid lightgray ;
  
  }

.code-copy-btn {
    position: fixed;
    display: none;
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s ease;
    transform: translateY(-100%);
    font-size: 14px;
}

/* Minimal icon-only group controls */
.group-controls {
  backdrop-filter: blur(4px);
}
.group-controls button {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  line-height: 1;
}
.group-controls button span {
  transition: background 0.15s ease;
}
.group-controls button:hover span {
  background: rgba(0,0,0,0.06);
}
.group-controls button:active span {
  background: rgba(0,0,0,0.12);
}

.code-copy-btn:hover {
    background: #f5f5f5;
    color: #333;
}

/* Spinner Styles */
.spinner {
    position: absolute;
    width: 40px;
    height: 40px;
    z-index: 10000;
}

.double-bounce1,
.double-bounce2 {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0.6;
    position: absolute;
    top: 0;
    left: 0;

    -webkit-animation: bounce 2.0s infinite ease-in-out;
    animation: bounce 2.0s infinite ease-in-out;
}

.double-bounce2 {
    -webkit-animation-delay: -1.0s;
    animation-delay: -1.0s;
}

@-webkit-keyframes bounce {

    0%,
    100% {
        -webkit-transform: scale(0.0);
    }

    50% {
        -webkit-transform: scale(1.0);
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(0.0);
    }

    50% {
        transform: scale(1.0);
    }
}

body {
    position: fixed;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    scrollbar-color: lightblue white;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    height: 95vh;
    width: 100vw;

}

h1 {
    font-size: x-large;
    font-family: Georgia, 'Times New Roman', Times, serif;
}


h2 {
    font-size: large;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

h3 {
    font-size: medium;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

video, img {
    width: auto !important;
    height: 300px !important; 
}
img:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.9);
    transition: all 0.5s ease;
}

audio {
    width: 90%;
}


iframe {
    max-width: 100%;
    max-height: 100%;
 
    width: 90%;
    height: 500px !important; 
}


#folders {
    scrollbar-width: none;
    overflow: auto;
}

.active {
    background-color: lightgreen !important;
    color: black !important;
}

.block {
    padding: 10px 0px 0px 5px;
    max-height: 500px;
    min-height: 100px;
    overflow: auto;
    scrollbar-color: rgb(236, 234, 234) white;
    background-color: white;
    border: 1px solid rgb(231, 228, 228); /* Added border style */

    /* Light gray */
    scrollbar-width: thin;
    word-break: break-word;
    overflow-wrap: anywhere;
}




.editor-container {
    display: flex;
    height: 95vh;
    position: relative;
    scrollbar-color: lightblue white;

    scrollbar-width: thin;
    overflow-x: hidden;
}






.sidebar {
    background: lightpink;
    left: 40px;
    top: 400px;
    font-size: small;
    width: 80vw;
    max-width: 500px;
    background-color: #f7f7f7;
    border-right: 1px solid #e0e0e0;
    padding-left: 10px;
    position: fixed;
    height: 50vh;
    overflow-y: auto;
    z-index: 100;
    /* give a dark shadow */
    box-shadow: 0 -9px 20px 2px rgb(18 0 0 / 30%);
}

.hidden {
    display: none;
}

.main-content {
    margin-left: 2vw;
    min-width: 0; /* prevent flex overflow */

}

.main-content.expanded {
    margin-left: 0;
}

.sidebar-header {
    height: 40px;
    width: 100%;
    background-color: #f5f5f5;
}

.sidebar-actions {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.folder-input-container {
    z-index: 100;
    position: fixed;
    top: 50px;
    left: 50px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.folder-input-container input {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
}

.folder-input-container button {
    padding: 4px 8px;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
}

.folder-input-container button:hover {
    background-color: #f0f0f0;
}

.folder-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    margin: 4px 0;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
    position: relative;
}

.folder-contents {
    margin-left: 20px;
    border-left: 1px solid #e0e0e0;
    padding-left: 15px;
    display: block;
}

.folder-item.open+.folder-contents {
    display: block;
}

.folder-count {
    font-size: 0.8em;
    color: #888;
    margin-left: auto;
}

.folder-item.open>.folder-content>i.fa-folder:before {
    content: "\f07c";
    /* Font Awesome open folder icon */
}

.sub-folder {
    margin-left: 20px;
}

.folder-note {
    margin-left: 20px;
    padding-left: 24px;
    position: relative;
}

.folder-note:before {
    content: "\f15b";
    /* Font Awesome file icon */
    font-family: "Font Awesome 6 Free";
    position: absolute;
    left: 0;
    color: #888;
}

.folder-item .folder-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.folder-item .add-note-btn {
    visibility: hidden;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
}

.folder-item:hover .add-note-btn {
    visibility: visible;
}

.folder-item .add-note-btn:hover {
    background-color: #e0e0e0;
    color: #333;
}

.folder-item:hover {
    background-color: #f0f0f0;
}

.folder-item i {
    color: #ffd700;
}

.auth-buttons {
    display: flex;
    gap: 5px;
}

.page-item {
    padding: 8px;
    margin: 4px 0;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.page-item:hover {
    background-color: #f0f0f0;
}

.sidebar-section {
    margin-top: 5px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    overflow: auto;
    font-size: small;
    scrollbar-width: none;
}

.sidebar-btn {

    font-size: xx-small;
    width: 100%;
    padding: 8px;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.sidebar-btn:hover {
    background-color: #f0f0f0;
}

#tocList {
    padding-left: 0px;
}

.toc-item {
    cursor: pointer;
    border-radius: 4px;
    margin: 8px 0;
}

.toc-item:hover {
    background-color: #f0f0f0;
}

.toc-h1 {
    padding-left: 0px;
}

.toc-h2 {
    padding-left: 15px;
}

.toc-h3 {
    padding-left: 30px;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
    scrollbar-width: none;
}

.toolbar {
    height: 40px;
    padding-top: 5px;
    padding-left: 0px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #fff;
}

.formatting-tools {
    padding-left: 0px;
    display: flex;
    gap: 5px;
    align-items: center;
    margin-left: 0;
    /* Add margin to prevent overlap with toggle button */
}

.dropdown {
    z-index: 300;
    position: relative;
    display: inline-block;
}




.user-settings .dropbtn:hover {
    background: #e0e0e0;
}

.color-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
}

.color-picker:hover {
    background-color: #f0f0f0;
}

.dropbtn {
    padding: 5px 10px;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dropbtn:hover {
    background-color: #f0f0f0;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 300;
    border-radius: 4px;
    overflow: hidden;
}

.dropdown-content button,
.dropdown-content select {
    width: 100%;
    padding: 8px 12px;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-content button:hover {
    background-color: #f0f0f0;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* When toolbar is locked by JS, prevent hover from opening until mouse leaves */
.toolbar.dropdowns-locked .dropdown:hover .dropdown-content {
    display: none;
}

.formatting-tools button {
    padding: 5px 10px;
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.formatting-tools button:hover {
    background-color: #f0f0f0;
}


#saveNoteBtn .fa-spinner {
    margin-right: 4px;
}

#saveNoteBtn .fa-save {
    margin-right: 4px;
}

.note-title {
    overflow: auto;
    white-space: nowrap;
    max-width: 80vw;
    padding: 0px 10px 0 5px;
    font-weight: bold;
    background-color: #f5f5f5;
    border-radius: 8px;
    display: inline-block;
}

/* Recent notes container spans remaining window width */
.recent-notes {
    flex: 1;
    width: 100%;
    min-width: 0; /* allow flex child to shrink */
    display: flex;
    align-items: center;
    overflow: visible;
    gap: 6px;
}

.recent-tabs-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    max-width: 100%;
}

.recent-note {
    display: inline-block;
    margin: 0 6px;
    font-size: 14px;
    color: #666;
    background-color: #f5f5f5;
    /* border-radius: 4px; */
    /* cursor: pointer; */
    /* transition: all 0.2s ease; */
    /* vertical-align: middle; */
    max-width: 20vw;
    overflow: hidden;
}

.recent-note:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* Dropdown for overflow notes */
.recent-dropdown 
{ 
    position: absolute; 
    right: 20px;
    display: inline-block; 
}
.recent-dropdown-btn {
    padding: 4px 10px;
    font-size: 14px;
    color: #444;
    background-color: #f5f5f5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.recent-dropdown-btn:hover { background-color: #eaeaea; }

.recent-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: -20px;
    z-index: 1000;
    display: none;
    min-width: 220px;
    max-height: 60vh;
    overflow: auto;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
.recent-dropdown-item {
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}
.recent-dropdown-item:hover { background-color: #f7f7f7; }

.note-title[placeholder]:empty:before {
    content: attr(placeholder);
    color: #888;
    font-style: italic;
}

.editor {
    flex: 1;
    overflow-y: auto;
    background-color: #fff;
    scrollbar-color: rgb(219, 248, 219) white;
    scrollbar-width: thin;
    transition: width 0.3s ease;
    overflow-x: hidden;
    word-break: break-word;
    overflow-wrap: anywhere;
}

[contenteditable=true]:empty:before {
    content: attr(placeholder);
    color: #888;
    font-style: italic;
}




.commentContainer {
    margin: 10px 0;
    padding: 5px;
    border-radius: 4px;
    height: 500px;
    border: 1px solid #e0e0e0;
    
}

.showcomment{
    position: fixed !important;
    bottom: 10px;
    left: 10px;
    background-color: white;
    border: 1px solid lightblue;
    height: 40vh !important;
    width: 90vw !important;
    max-width: 700px;
    z-index: 110;
    box-shadow: 0 -8px 10px rgba(0, 0, 0, 0.315);
}

.topcomment{
    z-index: 111;
}



/* Different block type colors */



.audio-block audio,
.video-block video {
    max-width: 100%;
}

.iframe-block {
    position: relative;
    width: 90%;
    height: 40%;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.iframe-block iframe {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: white;
}

/* Style for <pre> elements */
pre {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: monospace;
    margin: 10px 0;
}

/* Style for <code> elements within <pre> */
pre code {
    font-family: monospace;
    white-space: pre-wrap;
    /* Preserve spaces and line breaks */
}

#headingSelect {
    padding: 5px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

#textColor {
    padding: 0;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 4px;
}

.source-view {
    width: 86vw;
    margin-left: 10px;
    background-color: #f8f9fa;
    font-family: monospace;
    white-space: pre-wrap;
    padding: 20px;
    display: none;
}

.ai-toolbar {
    max-width: 90vw;
    position: absolute;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    padding: 8px;
    display: none;
    z-index: 200;
}

.ai-toolbar-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ai-toolbar button {
    padding: 3px 6px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 10px;
    color: #333;
    width: 100%;
    text-align: left;
}

.ai-toolbar button:hover {
    background: #f0f0f0;
}

.ai-model-selects {
    display: flex;
    flex-direction: row;
    gap: 4px;
}

.ai-model-select {
    padding: 6px 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: white;
    font-size: 12px;
    color: #333;
    flex: 1;
}

.ai-model-select:hover {
    background: #f0f0f0;
}

.ai-response {
    margin-top: 8px;
    padding: 8px;
    border-left: 3px solid #e0e0e0;
    background: #f8f9fa;
}

.ai-response-header {
    font-weight: bold;
    color: #666;
    margin-bottom: 4px;
}

.ai-toolbar.visible {
    display: block;
}

.ai-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
}

.ai-actions button {
    flex: 1;
    min-width: 80px;
    white-space: nowrap;
}

@media (max-width: 480px) {}

/* Mobile-safe media sizing and wrapping */
@media (max-width: 768px) {
    .editor img,
    .editor video {
        max-width: 100% !important;
        height: auto !important;
    }
    .editor iframe {
        max-width: 100% !important;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 0;
    margin-left: 5vw;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90vw;
    height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

.modal-header {
   margin: 0;
   padding: 0;
}



.close:hover {
    color: #555;
}

.settings-section {
    margin-bottom: 30px;
}

.prompt-settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.prompt-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.prompt-item label {
    font-weight: bold;
    color: #555;
}

.prompt-item input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.custom-tool {
    margin-bottom: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.custom-tool input {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 85%;
}

.custom-tool .remove-tool {
    color: #ff4444;
    cursor: pointer;
    padding: 4px 8px;
    background: none;
    border: none;
}

.add-tool-btn {
    width: 100%;
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px dashed #ccc;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.add-tool-btn:hover {
    background-color: #e0e0e0;
}

.model-config {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.model-config input {
    width: 100%;
    max-width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.model-config .remove-model {
    color: #ff4444;
    cursor: pointer;
    background: none;
    border: none;
}

.upload-container-btn {
    position: relative;
    bottom: 0;
    padding: 10px 20px;
    background-color: #2ecc71 !important;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}



/* Comment styles */
.commented-text {
    background-color: #fbfbfb;
    border-bottom: 2px dotted #d4c2ee;
    cursor: help;
    color: rgb(32, 2, 2);
}

.comment-tooltip {
    height: 30vh;
    overflow: auto;
    position: fixed;
    top: 65vh;
    left: 5vw;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90vw;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}






.tooltip-header .close-tooltip:hover {
    color: #333;
}

.comment-content {

    padding: 10px;
}

/* Style for individual model responses
[data-comment*="---"] {
    padding: 0px;
    border-radius: 6px;
} */

.tooltip-header {
    display: flex;
    background-color: #f0f0f0;
}

.comment-actions {
    display: flex;
    gap: 8px;
    margin-left: 10px;
    /* Adjust as needed */
}

.comment-actions button {
    padding: 4px 8px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.comment-actions button:hover {
    background-color: #e0e0e0;
}

.comment-edit-input {
    width: 70vw;
    height: 30vh;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 8px;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.quick-ask-btn {
    position: fixed;
    left: 20px;
    bottom: 20px;
    background: #2ecc71;
    color: white;
    padding: 15px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    transition: all 0.3s ease;
}

.ai-input-shortcuts {
    display: flex;
            flex-wrap: wrap;

}

.ai-input-shortcuts li {
    flex: 1;
    width: 80px;
    height: 25px;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 7px;
    list-style: none;
    font-size: large;

}

.quick-ask-btn:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.quick-ask-btn i {
    font-size: 20px;
}

.custom-dropdown {
    position: relative;
    flex: 1;
}

.model-select-btn {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 12px;
    background: #eef2ff; /* soft blue */
    font-size: 13px;
    font-weight: 600;
    color: #1e3a8a; /* indigo-900 */
    text-align: left;
    cursor: pointer;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.06s ease;
}

.model-select-btn:hover {
    background: #e0e7ff; /* a bit deeper */
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

.custom-dropdown .model-select-btn::after {
    content: '▾';
    margin-left: 6px;
    opacity: 0.6;
    font-size: 0.9em;
}

.model-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: none;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    max-height: 220px;
    overflow-y: auto;
    margin-top: 6px;
}
.model-else {

    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: monospace;
    height: 50px;
}
.tool-prompt  {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: monospace;
    height: 50px;
}

.tool-prompt:focus {
    height: 100px;    
}

.model-options.show {
    display: block;
}



.model-options button {
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    font-size: 13px;
    color: #111827;
    text-align: left;
    cursor: pointer;
}

.model-options button:hover {
    background: #eff6ff; /* light blue hover */
}

/* Modern model response tabs */
.ask-tabs,
.comment-tabs {
    display: flex;
    gap: 8px;
    margin: 6px 0;
    flex-wrap: wrap;
}

.ask-tabs button,
.comment-tabs button,
.model-tab {
    appearance: none;
    border: 0px solid #e5e7eb;
    background: #f9fafb;
    color: #111827;
    border-radius: 0;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ask-tabs button:hover,
.comment-tabs button:hover,
.model-tab:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.ask-tabs button.active,
.comment-tabs button.active,
.model-tab.active {
    background: #111827;
    color: #ffffff;
    border-color: #111827;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.ask-tabs button:focus-visible,
.comment-tabs button:focus-visible,
.model-tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

.editor:focus {
    outline: none;
}

.editor:focus-visible {
    outline: none;
}

[contenteditable]:focus {
    outline: none;
}

.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
}

.toast {
    background: #fff;
    border-left: 4px solid #ff4444;
    border-radius: 4px;
    padding: 12px 35px 12px 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    position: relative;
    animation: slideIn 0.3s ease-out;
    max-width: 450px;
    min-width: 300px;
    transition: background-color 0.5s ease;
}

.toast.success {
    border-left-color: #2ecc71;
}

.toast-message {
    color: #333;
    font-size: 14px;
    margin-right: 15px;
}

.toast-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
}

.toast-close:hover {
    color: #333;
}

.toast.error {
    background-color: #ff4444;
    /* Red background for error */
}

.toast.error.hide {
    background-color: #ffffff;
    /* White background after 1 second */
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Profile Modal Styles */
#profileModal {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

#profileModal .modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;


}

#profileModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#profileModal .modal-header .close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

#profileModal .modal-body {
    margin-top: 10px;
}

#profileModal .modal-footer {

    text-align: right;
}

#profileModal .close-profile-btn {
    padding: 8px 16px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#profileModal .close-profile-btn:hover {
    background-color: #27ae60;
}

@keyframes slideOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Pin Block Button Styles */

.highlight {
    
    border: 1px solid lightblue; /* Added border style */

}

.pin-block-btn:hover {
    color: #333;
}




#topbarPinBtn:hover {
    color: #333;
}

.pinned {
    position: fixed;
    max-height: 500px;
    min-height: 200px;
    width: 95%;
    top: 40px;
    left: 2%;
    z-index: 110;
    box-shadow: 0 16px 16px rgba(0, 0, 0, 0.3);
    border: 2px solid lightblue;
}

/* Upload Modal Styles */
#uploadModal .modal-content {
    max-width: 600px;
}






#previewArea {

    margin-top: 0px !important;
    background-color: #f9f9f9;
    border-radius: 8px;
}

#filePreview {
    justify-content: center;
    align-items: center;
    min-height: 100px;
    overflow: auto;
}

#filePreview img,
#filePreview video {
    max-width: 100%;
    object-fit: contain;
    scrollbar-width: none;
}

#filePreview audio {
    width: 100%;
}



.media-capture-controls {
    background-color: #f9f9f9;
    border-radius: 8px;
}

.capture-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.capture-btn {
    flex: 1;
    padding: 10px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.capture-btn:hover {
    background-color: #27ae60;
}

.capture-btn i {
    font-size: 16px;
}

.device-selectors {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: small;
}

.device-select {
    flex: 1;
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.capture-buttons {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.capture-btn {
    flex: 1;
    padding: 10px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s ease;
}

.capture-btn:hover {
    background-color: #27ae60;
}

.capture-btn i {
    font-size: 16px;
}

#mediaPreview {
    width: 100%;
    max-width: 100%;
    margin: 15px 0;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#videoPreview {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
}

#shootPhotoBtn {
    background-color: #e74c3c;
}

#shootPhotoBtn:hover {
    background-color: #c0392b;
}

#stopRecordingBtn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#stopRecordingBtn:hover {
    background-color: #c0392b;
}

#audioRecordingControls {
    padding: 15px;
    background-color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

#recordingTime {
    font-family: monospace;
    font-size: 18px;
    color: #e74c3c;
}

#newFolderBtn {
    font-size: large;
    padding: 5px 10px;
    background: none;
    border: 0px;
    cursor: pointer;
}

#midiaURLContainer {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: black;
    color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    font-size: small;
    z-index: 1000;
    max-height: 60px;
    width: 90vw;
    overflow-wrap: break-word;
    overflow: auto;

}

#imgDisplay {
    position: fixed;
    top: 50px;
    left: 50px;
    max-width: 100000px;
    max-height: 100000px;
    
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.adapt_img {
    width: auto !important;
    max-width: 10000px !important;
}
