@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap");

/* :root {
    --colour-1: #ffffff;
    --colour-2: #000000;
    --colour-3: #000000;
    --colour-4: #000000;
    --colour-5: #000000;
    --colour-6: #000000;

    --accent: #ffffff;
    --blur-bg: #98989866;
    --blur-border: #00000040;
    --user-input: #000000;
    --conversations: #000000;
} */

:root {
    /* Update text colors for better contrast */
    --text-primary: #ffffff;  /* Pure white for main text */
    --text-secondary: #c8c8c8;  /* Lighter grey for secondary text */
    
    /* Keep other colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1b1e;
    --accent-purple: #AD7EFF;
    --border-color: rgba(255, 255, 255, 0.08);
    --hover-bg: rgba(255, 255, 255, 0.06);
    --active-bg: rgba(255, 255, 255, 0.08);
    
    /* LibreChat-like colors */
    --colour-1: var(--bg-primary);
    --colour-2: var(--text-secondary);
    --colour-3: var(--text-primary);
    --colour-4: var(--text-secondary);
    --colour-5: var(--bg-secondary);
    --colour-6: #242424;
    
    --accent: var(--accent-purple);
    --blur-bg: rgba(32, 33, 35, 0.8);
    --blur-border: var(--border-color);
    --user-input: #ac87bb;
    --conversations: #c7a2ff;

    /* Add professional blue accents */
    --accent-blue: #0066cc;
    --accent-blue-hover: #0077ee;
    --button-gradient: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    --button-gradient-hover: linear-gradient(to bottom, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    --button-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    --button-shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.3);
}

:root {
    --font-1: "Arial", sans-serif;
    --section-gap: 25px;
    --border-radius-1: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    /* font-family: var(--font-1); */   /* this font has conflict with MathJax \hat so we can't use it in problem_content */
}

/* the below keeps the global font family in other locations, but since it's not global it doesn't appear where equations will be */
#message-input, .box.conversations {
    font-family: var(--font-1);
}


html,
body {
    scroll-behavior: smooth;
    overflow: hidden;
}

body {
    padding: var(--section-gap);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    height: calc(100vh - 2 * var(--section-gap)); /* Account for padding */
}

.row {
    display: flex;
    height: 100%;
    gap: var(--section-gap);
    background: var(--bg-primary); /* Add background to row */
}

.box {
    background: linear-gradient(
        to bottom,
        rgba(26, 27, 30, 0.95),
        var(--bg-secondary)
    );
    border: 1px solid var(--border-color);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    width: 100%;
    border-radius: var(--border-radius-1);
}

.conversations {
    max-width: 260px;
    width: 260px;
    height: 100%;
    padding: var(--section-gap);
    background: linear-gradient(
        to right,
        var(--bg-secondary),
        rgba(26, 27, 30, 0.95)
    );
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
    box-shadow: 
        inset -1px 0 0 rgba(0, 0, 0, 0.2),
        inset 1px 0 0 rgba(255, 255, 255, 0.02);
}

.conversation {
    height: 100%;
    flex-grow: 1;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.conversation #messages {
    flex-grow: 1;
    overflow-y: auto;
    background: linear-gradient(
        to bottom,
        rgba(26, 27, 30, 0.95),
        var(--bg-secondary)
    );
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-1);
    margin-bottom: 20px;
}

.conversation .user-input {
    flex-shrink: 0;
}

.conversation .buttons {
    flex-shrink: 0;
}

.conversation .problem-content {
    flex: 1 1 auto; /* adjust these values as needed */
    overflow-y: auto; /* enable scroll if content overflows */
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.message {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.02),
        transparent
    );
    margin-bottom: 2px; /* Add small gap between messages */
    display: flex;
    gap: var(--section-gap);
    align-items: flex-start;
}

.message .user {
    max-width: 48px;
    max-height: 48px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(102, 178, 255, 0.2); /* Subtle blue border */
}

.message .content {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    flex: 1;
}

.user-message {
    background: linear-gradient(
        to bottom,
        rgba(0, 102, 204, 0.03),
        rgba(0, 102, 204, 0.01)
    );
}

.assistant-message {
    background: linear-gradient(
        to bottom,
        rgba(26, 27, 30, 0.8),
        rgba(26, 27, 30, 0.6)
    );
    backdrop-filter: blur(10px);
}

.input-area {
    border-top: 1px solid var(--border-color);
    padding: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 27, 30, 0.95),
        var(--bg-primary)
    );
    box-shadow: 
        0 -4px 12px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
    position: sticky;
    bottom: 0;
}

/* Remove bottom margin from input box */
.input-box {
    display: flex;
    align-items: center;
    padding-right: 15px;
    cursor: pointer;
    height: 100px;
    overflow: hidden;
    background: linear-gradient(
        to bottom,
        rgba(40, 41, 45, 0.8),
        rgba(26, 27, 30, 0.8)
    );
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-1);
}

/* Remove border between input and send button */
#message-input {
    width: 100%;
    background: transparent; /* Change to transparent */
    border: none; /* Remove border */
    color: var(--text-primary);
    padding: 12px;
    resize: none;
}

/* Update send button styling */
#send-button {
    display: inline-block !important;
    padding: 5px 10px !important;
    border: none !important;
    border-radius: 4px !important;
    background: linear-gradient(to bottom, var(--accent-blue), rgba(0, 102, 204, 0.9)) !important;
    color: var(--text-primary) !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    box-shadow: var(--button-shadow) !important;
}

#send-button:hover {
    background: linear-gradient(to bottom, var(--accent-blue-hover), rgba(0, 119, 238, 0.9)) !important;
    box-shadow: var(--button-shadow-hover) !important;
    transform: translateY(-1px) !important;
}

/* Ensure the entire input box has the proper border */
.user-input .box {
    border: 1px solid var(--border-color);
}

button {
    background: var(--button-gradient);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--button-shadow);
}

button:hover {
    background: var(--button-gradient-hover);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--button-shadow-hover);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

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

.dropdown-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.gradient:nth-child(1) {
    --top: 0;
    --right: 0;
    --size: 70vw;
    --blur: calc(0.5 * var(--size));
    --opacity: 0.3;
    animation: zoom_gradient 6s infinite;
}

.gradient {
    position: absolute;
    z-index: -1;
    border-radius: calc(0.5 * var(--size));
    background-color: var(--accent);
    background: radial-gradient(circle at center, var(--accent), var(--accent));
    width: 70vw;
    height: 70vw;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    filter: blur(calc(0.5 * 70vw)) opacity(var(--opacity));
    display: none; /* Remove the gradient overlay that might be causing purple tint */
}

.conversations .top {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding: 0;
    margin-bottom: 10px; /* Reduced from 20px to 10px */
}

.convo {
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.02));
}

.convo:hover {
    background: none;
    transform: none;
}

.convo .left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: auto;
    min-width: 0;
}

/* Keep blue only for conversation icons */
.conversations i {
    color: var(--accent-blue-hover); /* Use the brighter blue by default */
    opacity: 0.9;
    cursor: pointer;
    transition: all 0.2s ease;
}

.conversations i:hover {
    transform: scale(1.1);
    opacity: 1;
}

.convo-title {
    color: var(--text-primary) !important;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.message:last-child {
    animation: 0.6s show_message;
}

@keyframes show_message {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
}

.message .user img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    outline: 1px solid var(--border-color);
}

.message .user:after {
    display: none; /* This removes the glow while keeping the icons */
}

.message .content p,
.message .content li,
.message .content code {
    font-size: 15px;
    line-height: 1.3;
    color: var(--text-primary);
}

.message .user i {
    position: absolute;
    bottom: -6px;
    right: -6px;
    z-index: 1000;
}

.new_convo {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 10px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
}

.new_convo:hover {
    background: rgba(255, 255, 255, 0.1);
    border-style: solid;
}

.new_convo span {
    color: var(--colour-3);
    font-size: 14px;
}

.stop_generating {
    position: absolute;
    bottom: 118px;
    /* left: 10px;
    bottom: 125px;
    right: 8px; */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000000;
}

.stop_generating button {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background-color: var(--blur-bg);
    border-radius: var(--border-radius-1);
    border: 1px solid var(--blur-border);
    padding: 10px 15px;
    color: var(--colour-3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    animation: show_popup 0.4s;
}

@keyframes show_popup {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
}

@keyframes hide_popup {
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

.stop_generating-hiding button {
    animation: hide_popup 0.4s;
}

.stop_generating-hidden button {
    display: none;
}

.typing {
    position: absolute;
    top: -25px;
    left: 0;
    font-size: 14px;
    animation: show_popup 0.4s;
}

.typing-hiding {
    animation: hide_popup 0.4s;
}

.typing-hidden {
    display: none;
}

input[type="checkbox"] {
    height: 0;
    width: 0;
    display: none;
}

label {
    cursor: pointer;
    text-indent: -9999px;
    width: 50px;
    height: 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background-color: var(--blur-bg);
    border-radius: var(--border-radius-1);
    border: 1px solid var(--blur-border);
    display: block;
    border-radius: 100px;
    position: relative;
    overflow: hidden;
    transition: 0.33s;
}

label:after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 5px;
    width: 20px;
    height: 20px;
    background: var(--colour-3);
    border-radius: 90px;
    transition: 0.33s;
}

input:checked+label {
    background: var(--blur-border);
}

input:checked+label:after {
    left: calc(100% - 5px - 20px);
}

.buttons {
    min-height: 10vh;
    display: flex;
    align-items: start;
    justify-content: left;
    width: 100%;
}

.field {
    height: fit-content;
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 15px
}

.field .about {
    font-size: 14px;
    color: var(--colour-3);
}

.disable-scrollbars::-webkit-scrollbar {
  background: transparent; /* Chrome/Safari/Webkit */
  width: 0px;
}

.disable-scrollbars {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE 10+ */
}

select {
    background: var(--button-gradient);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 8px auto;
    padding-right: 30px;
    box-shadow: var(--button-shadow);
}

select:hover {
    background: var(--button-gradient-hover);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--button-shadow-hover);
}

.info {
    padding: 8px 12px;
    display: flex;
    gap: 18px;
    align-items: center;
    user-select: none;
    background: transparent;
    border-radius: var(--border-radius-1);
    width: 100%;
    cursor: default;
    border: 1px dashed var(--conversations)
}

.bottom_buttons {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bottom_buttons button {
    width: 100%;
    justify-content: flex-start;
    background: var(--button-gradient);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 14px;
    transition: all 0.2s ease;
    box-shadow: var(--button-shadow);
}

.bottom_buttons button:hover {
    background: var(--button-gradient-hover);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--button-shadow-hover);
    transform: translateX(2px);
}

.bottom_buttons button:active {
    transform: translateY(0);
}

.bottom_buttons button span {
    color: var(--text-primary) !important;
    font-size: 14px;
}

/*Added by greg below*/
.bottom_buttons button:hover {
    background-color: var(--blur-border);
    transition: background-color 0.3s ease-in-out;
}

.bottom_buttons button:active {
    transform: scale(0.98);
    transition: transform 0.1s ease-in-out;
}
/*Added by greg above*/

#cursor {
    line-height: 17px;
    margin-left: 3px;
    -webkit-animation: blink 0.8s infinite;
    animation: blink 0.8s infinite;
    width: 7px;
    height: 15px;
}

@keyframes blink {
    0% {
        background: #ffffff00;
    }

    50% {
        background: white;
    }

    100% {
        background: #ffffff00;
    }
}

@-webkit-keyframes blink {
    0% {
        background: #ffffff00;
    }

    50% {
        background: white;
    }

    100% {
        background: #ffffff00;
    }
}


ol,
ul {
    padding-left: 20px;
}

@keyframes spinNew {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.inline-spinner {
    border: 2px solid transparent;
    border-radius: 50%;
    border-top: 2px solid var(--accent-blue);
    width: 12px;
    height: 12px;
    animation: spinNew 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 5px;
    position: relative;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

.spinner:before {
    content: '';
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    left: 45%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--accent-blue);
    border-top-color: white;
    animation: spinner .6s linear infinite;
}

.spinner {
    margin: 100px auto;
    width: 50px;
    height: 40px;
    text-align: center;
    font-size: 10px;
}


.grecaptcha-badge {
    visibility: hidden;
}

.mobile-sidebar {
    display: none !important;
    position: absolute;
    z-index: 100000;
    top: 0;
    left: 0;
    margin: 10px;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background-color: var(--blur-bg);
    border-radius: 10px;
    border: 1px solid var(--blur-border);
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    transition: 0.33s;
}

.mobile-sidebar i {
    transition: 0.33s;
}

.rotated {
    transform: rotate(360deg);
}

@media screen and (max-width: 767px) {
    .conversations {
        display: none;
        width: 100%;
        max-width: none;
    }

    .buttons {
    flex-wrap: wrap;
    gap: 5px;
    padding-bottom: 10vh;
    margin-bottom: 10vh;
    }

    .field {
    min-height: 5%;
    width: fit-content;
    }

    .mobile-sidebar {
        display: flex !important;
    }
}

@media screen and (max-height: 640px) {
    body {
        height: 87vh
    }
}


.shown {
    display: flex;
}


a:-webkit-any-link {
    color: var(--accent);
}

.conversation .user-input textarea {
    font-size: 15px;
    width: 100%;
    padding: 12px 15px;
    background: none;
    border: none;
    outline: none;
    color: var(--colour-3);
    resize: none;  /* disable resizing */
    max-height: 100%;  /* allow it to fill up to 100% of its container */
    overflow: auto;  /* scroll bar will appear if the content exceeds the max height */
}

/* style for hljs copy */
.hljs-copy-wrapper {
    position: relative;
    overflow: hidden
}

.hljs-copy-wrapper:hover .hljs-copy-button,
.hljs-copy-button:focus {
    transform: translateX(0)
}

.hljs-copy-button {
    position: absolute;
    transform: translateX(calc(100% + 1.125em));
    top: 1em;
    right: 1em;
    width: 2rem;
    height: 2rem;
    text-indent: -9999px;
    color: #fff;
    border-radius: .25rem;
    border: 1px solid #ffffff22;
    background-color: #2d2b57;
    background-image: url('data:image/svg+xml;utf-8,<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6 5C5.73478 5 5.48043 5.10536 5.29289 5.29289C5.10536 5.48043 5 5.73478 5 6V20C5 20.2652 5.10536 20.5196 5.29289 20.7071C5.48043 20.8946 5.73478 21 6 21H18C18.2652 21 18.5196 20.8946 18.7071 20.7071C18.8946 20.5196 19 20.2652 19 20V6C19 5.73478 18.8946 5.48043 18.7071 5.29289C18.5196 5.10536 18.2652 5 18 5H16C15.4477 5 15 4.55228 15 4C15 3.44772 15.4477 3 16 3H18C18.7956 3 19.5587 3.31607 20.1213 3.87868C20.6839 4.44129 21 5.20435 21 6V20C21 20.7957 20.6839 21.5587 20.1213 22.1213C19.5587 22.6839 18.7957 23 18 23H6C5.20435 23 4.44129 22.6839 3.87868 22.1213C3.31607 21.5587 3 20.7957 3 20V6C3 5.20435 3.31607 4.44129 3.87868 3.87868C4.44129 3.31607 5.20435 3 6 3H8C8.55228 3 9 3.44772 9 4C9 4.55228 8.55228 5 8 5H6Z" fill="white"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 3C7 1.89543 7.89543 1 9 1H15C16.1046 1 17 1.89543 17 3V5C17 6.10457 16.1046 7 15 7H9C7.89543 7 7 6.10457 7 5V3ZM15 3H9V5H15V3Z" fill="white"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    transition: background-color 200ms ease, transform 200ms ease-out
}

.hljs-copy-button:hover {
    border-color: #ffffff44
}

.hljs-copy-button:active {
    border-color: #ffffff66
}

.hljs-copy-button[data-copied="true"] {
    text-indent: 0;
    width: auto;
    background-image: none
}

@media(prefers-reduced-motion) {
    .hljs-copy-button {
        transition: none
    }
}

.hljs-copy-alert {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px
}

.visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}


.color-picker>fieldset {
    border: 0;
    display: flex;
    width: fit-content;
    background: var(--colour-1);
    margin-inline: auto;
    border-radius: 8px;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    cursor: pointer;
    background-color: var(--blur-bg);
    border: 1px solid var(--blur-border);
    color: var(--colour-3);
    display: block;
    position: relative;
    overflow: hidden;
    outline: none;
    padding: 6px 16px;
}

.color-picker input[type="radio"]:checked {
    background-color: var(--radio-color);
}

.color-picker input[type="radio"]#light {
    --radio-color: gray;
}

.color-picker input[type="radio"]#pink {
    --radio-color: pink;
}

.color-picker input[type="radio"]#blue {
    --radio-color: blue;
}

.color-picker input[type="radio"]#green {
    --radio-color: green;
}

.color-picker input[type="radio"]#dark {
    --radio-color: #232323;
}

.pink {
    --colour-1: hsl(310 50% 90%);
    --clr-card-bg: hsl(310 50% 100%);
    --colour-3: hsl(310 50% 15%);
    --conversations: hsl(310 50% 25%);
}

.blue {
    --colour-1: hsl(209 50% 90%);
    --clr-card-bg: hsl(209 50% 100%);
    --colour-3: hsl(209 50% 15%);
    --conversations: hsl(209 50% 25%);
}

.green {
    --colour-1: hsl(109 50% 90%);
    --clr-card-bg: hsl(109 50% 100%);
    --colour-3: hsl(109 50% 15%);
    --conversations: hsl(109 50% 25%);
}

.dark {
    --colour-1: hsl(209 50% 10%);
    --clr-card-bg: hsl(209 50% 5%);
    --colour-3: hsl(209 50% 90%);
    --conversations: hsl(209 50% 80%);
}

/*from GREG below*/
  .custom-input {
    background-color: black;
    color: lightgrey;
    border: 1px solid grey;
    padding: 5px;
    outline: none;
    border-radius: 5px; /* Add this line to give the input fields rounded edges */
  }

  .custom-input:-webkit-autofill,
  .custom-input:-webkit-autofill:hover,
  .custom-input:-webkit-autofill:focus,
  .custom-input:-webkit-autofill:active {
    background-color: black !important;
    color: white !important;
  }

  /* Set the color of the input text to the desired color when entering text (white) */
  .custom-input:focus {
    color: white;
    background-color: black;
  }

  /* Override autofill box-shadow and transition to prevent color change */
  .custom-input:-webkit-autofill::first-line  {
    background-color: black !important;
    color: white !important;
  }

  .custom-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px black inset;
    transition: background-color 5000s ease-in-out 0s;
  }
  /*from GREG above*/

:root:has(#pink:checked) {
    --colour-1: hsl(310 50% 90%);
    --clr-card-bg: hsl(310 50% 100%);
    --colour-3: hsl(310 50% 15%);
    --conversations: hsl(310 50% 25%);
}

:root:has(#blue:checked) {
    --colour-1: hsl(209 50% 90%);
    --clr-card-bg: hsl(209 50% 100%);
    --colour-3: hsl(209 50% 15%);
    --conversations: hsl(209 50% 25%);
}

:root:has(#green:checked) {
    --colour-1: hsl(109 50% 90%);
    --clr-card-bg: hsl(109 50% 100%);
    --colour-3: hsl(109 50% 15%);
    --conversations: hsl(109 50% 25%);
}

:root:has(#dark:checked) {
    --colour-1: hsl(209 50% 10%);
    --clr-card-bg: hsl(209 50% 5%);
    --colour-3: hsl(209 50% 90%);
    --conversations: hsl(209 50% 80%);
}

/*next 3 added by greg so page doesn't slightly shift up and down*/

body {
    height: 100vh;
    /*overflow: auto;*/ /*stopping entire page scrolling b/c hopefully doesn't need to*/
}

.row {
    height: 100%;
}

.conversation {
    height: calc(100% - 120px); /* Adjust this value if needed */
    overflow: auto;
}

/*next 4 added by greg so messages+input message+buttons expand to full vertical height*/
.conversation {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.conversation #messages {
    flex-grow: 1;
    overflow-y: auto;
}

.conversation .user-input {
    flex-shrink: 0;
}

.conversation .buttons {
    flex-shrink: 0;
}

.conversation .problem-content {
    flex: 1 1 auto; /* adjust these values as needed */
    overflow-y: auto; /* enable scroll if content overflows */
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}


.custom-select{
    padding: 8px 12px;
    width: 100%;
    min-width: 150px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed #9370DB;
    color: var(--colour-3);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23ffffff" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-position: right .7em top 50%, 0 0;
    background-size: .65em auto, 100%;
    border-radius: var(--border-radius-1);
    font-size: 14px;
}

.custom-select:hover {
    border-style: solid;
}

/*next 4 added by greg for emoji buttons and container for them*/
.emoji-container {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 12px;
    background-color: rgba(40, 40, 40, 0.6);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-left: 5px;
    vertical-align: middle;
    transform: scale(0.99);
}

.emoji-btn {
    font-size: 18px;
    margin: 0 3px;
    border: none;
    background: transparent;
    cursor: pointer;
    outline: none;
    padding: 0;
    transition: transform 0.1s, filter 0.3s;
    border-radius: 12px;
    filter: grayscale(50%);
    transform: scale(0.67);
    display: inline-block; /* Keep buttons inline */
}

.emoji-btn:hover {
    filter: grayscale(0%);
    transform: scale(1);
}

.emoji-btn:active {
    transform: scale(0.8);
}

/* 7 below are Styles for the Math button container similar to the emoji container */
.math-container {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 12px;
    background-color: rgba(50, 50, 50, 0.5);
    margin-left: 5px;
    vertical-align: middle;
    transform: scale(0.99);
    position: relative; /* Relative to allow absolute positioning of the panel */
}

#math-panel {
    display: none; /* Ensure it's hidden by default */
    position: absolute;
    top: 0;
    left: 100%; /* Position to the right of the container */
    background-color: rgba(50, 50, 50, 0.75); /* Medium dark grey with 75% opacity */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Light border for contrast */
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    white-space: nowrap; /* Keep symbols in a single row */
    display: flex;
    align-items: center; /* Vertically center the symbols */
    justify-content: center; /* Center the symbols horizontally */
    width: max-content; /* Ensure the width fits the content */
}

.math-btn {
    margin: 0 3px;
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    outline: none;
    padding: 0;
    transition: filter 0.3s, background-color 0.3s, box-shadow 0.3s;
    border-radius: 12px; /* Keep the original border-radius */
    filter: grayscale(50%);
    position: relative;
    width: 24px; /* Explicitly set width */
    height: 24px; /* Explicitly set height */
    display: flex;
    align-items: center;
    justify-content: center;
}

.math-btn .pi-symbol {
    font-size: 18px; /* Original size */
    transform: scale(1); /* Default scale */
    transition: transform 0.2s;
    display: inline-block;
}

.math-btn:hover .pi-symbol {
    transform: scale(1.2); /* Scale up the Pi symbol by 20% on hover */
}

.math-btn:active,
.math-btn.open {
    background-color: rgba(255, 255, 255, 0.3); /* Slightly lighter background to indicate it's active */
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.3); /* Slightly wider shadow for pressed effect */
    filter: grayscale(0%);
}

.math-btn:active .pi-symbol {
    transform: scale(1.2); /* Maintain the 20% scale up when pressed */
}

.math-panel-btn {
    font-size: 18px;
    cursor: pointer;
    margin: 0 6px; /* Space between symbols */
    background: none; /* No background */
    border: none; /* No borders */
    color: white; /* White symbols */
    outline: none;
    display: inline-block;
    text-align: center;
}

/*3 below styles make it so that the problem title and statement don't get too big verticallly*/

    #problem_info {
        position: relative;
        max-height: 35vh;
        background-color: var(--container-color);
        border-radius: 8px;
        margin-bottom: 10px;
        padding: 15px;
        transition: max-height 0.2s ease;
        overflow: hidden; /* Ensure content doesn't overflow during transition */
        resize: none; /* Remove default resize as we're implementing custom resize */
        min-height: 100px; /* Set a minimum height */
        max-height: 35vh; /* Default max height */
        /* Ensure problem_info doesn't shrink when messages grow */
        flex-shrink: 0; 
    }

    /* Style for the dedicated resize handle */
    #problem-resize-handle {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 8px;
        cursor: ns-resize;
        z-index: 100;
        background: transparent;
    }
    
    #problem-resize-handle::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 6px;
        background: rgba(0, 0, 0, 0.1);
        border-radius: 0 0 8px 8px;
        opacity: 0.3;
        transition: opacity 0.2s ease, background 0.2s ease;
    }
    
    #problem-resize-handle::before {
        content: '';
        position: absolute;
        bottom: 3px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 2px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 1px;
        z-index: 6;
        opacity: 0.4;
        transition: opacity 0.2s ease;
    }
    
    #problem-resize-handle:hover::after {
        opacity: 0.5;
        background: rgba(0, 0, 0, 0.15);
    }
    
    #problem-resize-handle:hover::before {
        opacity: 0.7;
    }
    
    /* Remove the old pseudo elements styling since we now use a dedicated handle */
    #problem_info::after,
    #problem_info::before {
        content: none;
    }
    
    /* Make content container scrollable instead of the entire problem_info */
    #content_container {
        max-height: calc(35vh - 25px); /* Adjusted to account for padding and handle */
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
        padding-bottom: 10px; /* Add space for the indicator */
    }

    /* When problem_info is being resized, the content container should adjust */
    #problem_info.resizing #content_container {
        max-height: calc(100% - 25px);
    }

    /* Subtle scrollbar customization */
    #content_container::-webkit-scrollbar {
        width: 8px; /* Adjust scrollbar width */
    }

    #content_container::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.1);
    }

    #content_container::-webkit-scrollbar-thumb {
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }

    #content_container::-webkit-scrollbar-thumb:hover {
        background-color: rgba(255, 255, 255, 0.15);
    }
    
    /* Scroll indicator for problem content - update position */
    .scroll-indicator {
        position: absolute;
        bottom: 12px; /* Adjusted position to avoid new handle */
        left: 50%;
        transform: translateX(-50%);
        color: var(--text-secondary, rgba(255, 255, 255, 0.5));
        font-size: 0.7rem;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.25s ease, transform 0.25s ease;
        pointer-events: auto;
        cursor: pointer;
        z-index: 101; /* Make sure it's above the handle */
        background-color: rgba(0, 0, 0, 0.25);
        padding: 4px 8px;
        border-radius: 12px;
        backdrop-filter: blur(2px);
    }

    .scroll-indicator:hover {
        opacity: 0.9 !important;
        transform: translateX(-50%) translateY(2px);
    }

    .scroll-indicator i {
        font-size: 0.7rem;
        animation: bounce 1.5s infinite;
    }

    @keyframes bounce {
        0%, 20%, 50%, 80%, 100% {
            transform: translateY(0);
        }
        40% {
            transform: translateY(3px);
        }
        60% {
            transform: translateY(2px);
        }
    }

    .scroll-indicator.visible {
        opacity: 0.8;
    }

    /* Theme-specific styling */
    .pink .scroll-indicator {
        background-color: rgba(219, 112, 147, 0.15);
    }

    .blue .scroll-indicator {
        background-color: rgba(100, 149, 237, 0.15);
    }

    .green .scroll-indicator {
        background-color: rgba(46, 139, 87, 0.15);
    }

    .dark .scroll-indicator {
        background-color: rgba(50, 50, 50, 0.3);
    }

@keyframes emojiWarningFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.emoji-warning-fading {
    animation-name: emojiWarningFadeOut;
    animation-timing-function: ease-out;
    animation-duration: 2s;
    animation-fill-mode: forwards;
}

/* Make highlighted conversation more pronounced */
.highlighted-convo {
    background: linear-gradient(to right, rgba(0, 102, 204, 0.25), rgba(0, 102, 204, 0.15)); /* Increased opacity */
    border: 1px solid rgba(0, 102, 204, 0.5); /* Much more visible border */
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15), /* Outer glow */
                inset 0 0 0 1px rgba(255, 255, 255, 0.1); /* Subtle inner highlight */
    border-radius: 10px;
    padding: 5px;
    margin: -5px;
    transition: all 0.2s ease;
}

/* Theme-specific highlighted styles with increased visibility */
.pink .highlighted-convo {
    background: linear-gradient(to right, hsla(310, 50%, 80%, 0.25), hsla(310, 50%, 80%, 0.15));
    border: 1px solid hsla(310, 50%, 70%, 0.5);
    box-shadow: 0 2px 8px hsla(310, 50%, 70%, 0.15),
                inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.blue .highlighted-convo {
    background: linear-gradient(to right, hsla(209, 50%, 80%, 0.25), hsla(209, 50%, 80%, 0.15));
    border: 1px solid hsla(209, 50%, 70%, 0.5);
    box-shadow: 0 2px 8px hsla(209, 50%, 70%, 0.15),
                inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.green .highlighted-convo {
    background: linear-gradient(to right, hsla(109, 50%, 80%, 0.25), hsla(109, 50%, 80%, 0.15));
    border: 1px solid hsla(109, 50%, 70%, 0.5);
    box-shadow: 0 2px 8px hsla(109, 50%, 70%, 0.15),
                inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.dark .highlighted-convo {
    background: linear-gradient(to right, rgba(70, 70, 70, 0.25), rgba(70, 70, 70, 0.15));
    border: 1px solid rgba(100, 100, 100, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2),
                inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/*below 3 styles are for the add conversation button with selector inside of it*/
.custom-select {
    padding: 6px 12px;  /* Increased padding by a factor of 1.5 */
    width: calc(100% + 2ch);  /* Width is the full container width plus space for 2 characters */
    max-width: calc(100% + 2ch);  /* Ensure it doesn't overflow its container */
    min-width: 0;  /* Allow it to shrink below its content size */
    background: transparent;
    border: none;
    color: var(--colour-3);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23ffffff" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right .7em top 50%, 0 0;
    background-size: .65em auto, 100%;
    border-radius: var(--border-radius-1);
    font-size: 14px;
}
.new_convo.vertical {
    flex-direction: column;
    gap: 6px;  /* Increased gap by a factor of 1.5 */
    padding: 6px 12px;  /* Adjusting the padding by a factor of 1.5 */
}
.new_convo.vertical .small-text {
    font-size: 14px;  /* Smaller font size */
    flex-shrink: 0;  /* Prevent the text from shrinking */
}



/* top region gradient with rounded borders */
.top {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.05));
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px; /* Rounded edges */
}

/* Theme-specific adjustments */
.pink .top {
    background: linear-gradient(to bottom, hsla(310, 50%, 100%, 0.05), hsla(310, 50%, 0%, 0.05));
    border-color: hsla(310, 50%, 70%, 0.5);
}
.blue .top {
    background: linear-gradient(to bottom, hsla(209, 50%, 100%, 0.05), hsla(209, 50%, 0%, 0.05));
    border-color: hsla(209, 50%, 70%, 0.5);
}
.green .top {
    background: linear-gradient(to bottom, hsla(109, 50%, 100%, 0.05), hsla(109, 50%, 0%, 0.05));
    border-color: hsla(109, 50%, 70%, 0.5);
}
.dark .top {
    background: linear-gradient(to bottom, rgba(90, 90, 90, 0.05), rgba(40, 40, 40, 0.05));
    border-color: rgba(70, 70, 70, 0.5);
}
/* Top region right distance to bottom buttons*/
.bottom_buttons {
    margin-top: -20px; /* replace [SAME_MARGIN_VALUE] with the actual margin used for the "Add Conversation" button */
}

/*contatct icon, next 5 styles*/
.contact-container {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 999;
}

/* Update envelope icon styling */
.email-icon {
    font-size: 20px;
    color: var(--text-secondary) !important; /* Match other icons */
    opacity: 0.8;
    text-decoration: none;
    position: relative;
    transition: opacity 0.2s ease;
}

.email-icon:hover {
    opacity: 1;
    color: var(--text-primary) !important;
}

.contact-bubble {
    position: absolute;
    bottom: 25px;
    right: 0;
    padding: 10px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.9);  /* white with slight opacity */
    border: 1px solid #ddd;
    display: none;
    max-width: 250px;
    font-size: 12px;
    background-color: #f5f5f5;
    color: #333;
}

.contact-bubble a {
    color: #007BFF;  /* Assuming links in your theme are this color */
    text-decoration: underline; /* Or any other style you use for links */
}

/* Thinking animation for reasoning models */
@keyframes thinking-dots {
    0%, 20% { content: "thinking"; }
    40% { content: "thinking."; }
    60% { content: "thinking.."; }
    80%, 100% { content: "thinking..."; }
}

.thinking-indicator {
    font-style: italic;
    color: var(--colour-3);
    opacity: 0.7;
    position: relative;
    display: inline-block;
}

.thinking-indicator::after {
    content: "thinking";
    animation: thinking-dots 2s infinite;
}

.thinking-indicator.hidden {
    display: none;
}

/* Update icon colors and settings link styling */
.bottom_buttons button i,
.fas.fa-gear,
.fas.fa-trash,
.fas.fa-edit,
.fas.fa-upload {
    color: var(--text-secondary);
    opacity: 0.8;
}

.bottom_buttons button:hover i,
.fas.fa-gear:hover,
.fas.fa-trash:hover,
.fas.fa-edit:hover,
.fas.fa-upload:hover {
    color: var(--text-primary);
    opacity: 1;
}

/* Update settings link (email) styling */
.settings-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    font-size: 0.9em;
    opacity: 0.8;
}

.settings-link, 
.settings-link #message a {  /* Add this selector to target the email text */
    color: var(--text-secondary);
    opacity: 0.8;
}

#message a {  /* Direct styling for the email text */
    color: var(--text-secondary) !important;  /* Override any other styles */
    opacity: 0.8;
    text-decoration: none;
}

.settings-link:hover,
.settings-link:hover #message a,
#message a:hover {
    color: var(--text-primary) !important;
    text-decoration: none;
    opacity: 1;
}

/* Style the custom select inside new conversation button */
.new_convo .custom-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 12px;
    width: 100%;
    color: var(--text-primary);
    margin-top: 4px;
    font-size: 14px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23ffffff" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right .7em top 50%, 0 0;
    background-size: .65em auto, 100%;
    padding-right: 30px; /* Make room for the arrows */
}

.new_convo .custom-select:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
}

/* Update the new conversation button to better frame the select */
.new_convo.vertical {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    align-items: stretch; /* Make children fill width */
}

.new_convo.vertical .small-text {
    font-size: 14px;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Add spacing between top and firebase-auth sections */
.conversations .top {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding: 0;
    margin-bottom: 10px; /* Reduced from 20px to 10px */
}

/* Or alternatively we can add margin to the firebase-auth section */
#firebase-auth {
    margin-top: 10px; /* Reduced from 20px to 10px */
}

.math-panel-btn:hover {
    transform: scale(1.1);
}

/* Bulb button styles */
.bulb-container {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 12px;
    background-color: rgba(50, 50, 50, 0.5);
    margin-left: 5px;
    vertical-align: middle;
    transform: scale(0.99);
}

.bulb-btn {
    margin: 0 3px;
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    outline: none;
    padding: 0;
    transition: filter 0.3s, background-color 0.3s, box-shadow 0.3s;
    border-radius: 12px;
    filter: grayscale(50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bulb-btn i {
    font-size: 18px;
    transform: scale(1);
    transition: transform 0.2s;
    display: inline-block;
}

.bulb-btn:hover i {
    transform: scale(1.2);
}

.bulb-btn.active {
    background-color: rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    filter: grayscale(0%);
}

.bulb-btn.active i {
    color: #FFD700;
}

/* Image button styles - EXACTLY matching bulb button */
.image-container {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 12px;
    background-color: rgba(50, 50, 50, 0.5);
    margin-left: 5px;
    vertical-align: middle;
    transform: scale(0.99);
}

.image-btn {
    margin: 0 3px;
    border: none;
    background: transparent;
    color: white;
    cursor: pointer;
    outline: none;
    padding: 0;
    transition: filter 0.3s, background-color 0.3s, box-shadow 0.3s;
    border-radius: 12px;
    filter: grayscale(50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-btn i {
    font-size: 18px;
    transform: scale(1);
    transition: transform 0.2s;
    display: inline-block;
}

.image-btn:hover i {
    transform: scale(1.2);
}

.image-btn.has-content {
    background-color: rgba(40, 167, 69, 0.3);
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.3);
    filter: grayscale(0%);
}

.image-btn.has-content i {
    color: #28a745;
}

/* Math container for positioning */
.math-container {
    position: relative;
    display: inline-block;
}

/* Math button content attached state */
.math-btn.has-content {
    background-color: rgba(40, 167, 69, 0.3);
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.3);
    filter: grayscale(0%);
}

.math-btn.has-content i {
    color: #28a745;
}

/* Attached indicator styles */
.image-attached-indicator,
.sketch-attached-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.image-attached-indicator:hover,
.sketch-attached-indicator:hover {
    background-color: #c82333;
    transform: scale(1.1);
}

/* Image description box for converted content in chat */
.image-description-box {
    background-color: rgba(74, 139, 255, 0.1);
    border: 2px solid rgba(74, 139, 255, 0.4);
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
    position: relative;
    width: 100%;
}

.image-description-box::before {
    content: "📷 Converted from image";
    position: absolute;
    top: -12px;
    left: 15px;
    background-color: #1a1a1a;
    padding: 0 10px;
    color: rgba(74, 139, 255, 0.8);
    font-size: 12px;
    font-weight: 600;
}

/* Container for image content with thumbnail */
.image-content-container {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

/* Thumbnail container */
.image-thumbnail-container {
    flex-shrink: 0;
}

/* Thumbnail styling */
.image-thumbnail {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(74, 139, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-thumbnail:hover {
    transform: scale(1.05);
    border-color: rgba(74, 139, 255, 0.8);
    box-shadow: 0 4px 12px rgba(74, 139, 255, 0.3);
}

/* Adjust image-description-box when in container */
.image-content-container .image-description-box {
    flex: 1;
    margin: 0;
}

/* Wrapper for entire image content */
.image-content-wrapper {
    width: 100%;
}

/* User message after image content */
.user-message-after-image {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Fix for dropdown options in Microsoft Edge - white text on white background issue */
select option {
    background-color: var(--colour-1);
    color: var(--text-primary);
}

/* Ensure loading spinner is properly visible in problem_content */
#problem_info .spinner {
    margin: 30px auto;
    position: relative;
    z-index: 10;
}

/* When spinner is active, ensure content space is appropriate */
#problem_content:has(.spinner) {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}