/*** Overwrite TailwindCSS classes ***/
body .rounded-3xl {
    border-radius: var(--radius);
}

/*** Standard missing classes from Tailwind CSS ***/
:root {
    --color-amber-100: #FEF3C7;
    --color-amber-300: #FCD34D;
    --color-yellow-700: #A16207;
    --color-yellow-950: #422006;
}

.pr-10 {
    padding-right: 2.5rem !important;
}

.self-auto {
    align-self: auto;
}

.self-center {
    align-self: center;
}

.self-start {
    align-self: flex-start;
}

@media (min-width: 768px) {
    .md\:flex-row {
        flex-direction: row !important;
    }

    .md\:items-center {
        align-items: center !important;
    }

    .md\:self-auto {
        align-self: auto !important;
    }

    .md\:self-center {
        align-self: center !important;
    }

    .md\:self-start {
        align-self: flex-start !important;
    }

    .md\:pr-2 {
        padding-right: .5rem !important;
    }

    .md\:pr-5 {
        padding-right: 1.25rem !important;
    }

    .md\:static {
        position: static !important;
    }
}

/*** Custom colors ***/
.light {
    --warning-border: var(--color-amber-300);
    --warning-bg: var(--color-amber-100);
}

.dark {
    --warning-border: var(--color-yellow-700);
    --warning-bg: var(--color-yellow-950);
}

.warning-border {
    border-color: var(--warning-border);
}

.warning-bg {
    background-color: var(--warning-bg);
}

/*** Header ***/
#root:has(#header) {
    background-color: hsl(var(--foreground));
}

#header,
#header + div {
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
    border-collapse: collapse;
}

#header + div {
    border-top: none;
}

#user-nav-button,
#user-nav-button .rounded-full {
    border-radius: 8px;
}

/** Model Menu **/
#chat-profiles {
    white-space: nowrap;
    font-size: 0.875rem;
}

#chat-profile-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground) / 75%);
}

#chat-profile-description * {
    line-height: normal;
}

/** Help Button **/
#help-button {
    font-size: 0.875rem;
}

/** Avatar Menu **/
div[role="menu"] div:not(div[role="menuitem"]) .leading-none {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 300;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/** Header Menus on Small Screens **/
@media (max-width: 550px) {
    #header .text-sm {
        font-size: 0.8rem;
    }

    #chat-profiles {
        font-size: 0.8rem;
    }

    #chat-profile-description {
        width: 110px;
        font-size: 0.8rem;
        color: hsl(var(--muted-foreground) / 75%);
    }

    #chat-profile-description * {
        line-height: normal;
    }

    .px-3, .px-4 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    #help-button {
        width: 2.25rem;
        height: 2.25rem;
    }

    #help-button-label {
        display: none;
    }

}

/*** Sidebar ***/
.group\/sidebar-wrapper main.bg-background {
    background-color: transparent;
}

div[data-sidebar="sidebar"] {
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--sidebar-background));
    border-collapse: collapse;
}

div[data-sidebar="group-label"] {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 300;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/*** Scrollbar styles ***/
.overflow-auto, .overflow-scroll, .overflow-x-auto, .overflow-x-scroll, .overflow-y-auto, .overflow-y-scroll {
    scrollbar-color: hsl(var(--input)) transparent;
}

/*** Welcome Screen ***/
#welcome-screen .logo {
    border-radius: var(--radius);
}

/*** Chat Field ***/
#message-composer {
    border: 1px solid hsl(var(--primary) / 25%);
}

/** Mask **/
.absolute.bottom-4 button {
    z-index: 1;
}

.absolute.bottom-4::after {
    content: "";
    display: block;
    position: absolute;
    z-index: 0;
    width: 100%;
    height: 52px;
    /*background: linear-gradient(to bottom, hsl(var(--background)) 0%, hsl(var(--background) / 0%) 100%);*/
    background: linear-gradient(to bottom, hsl(var(--background) / 0%) 0%, hsl(var(--background)) 100%);

}

/*** Messages (Steps) ***/
.step h1 {
    font-size: 2rem;
    line-height: 1.4;
    font-weight: 600;
}

.step h2 {
    font-size: 1.7rem;
    line-height: 1.4;
    font-weight: 600;
    border-bottom: none;
}

.step h3 {
    font-size: 1.5rem;
    line-height: 1.4;
    font-weight: 600;
}

.step h4 {
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: 600;
}

.step h5 {
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 700;
}

.step h6 {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 700;
}

.step small {
    font-size: 0.875rem;
    line-height: normal;
}

.step .mini {
    font-size: 0.75rem;
    line-height: normal;
}

/*** User messages ***/
/*.step[data-step-type="user_message"] .message-content {}*/

/*** Agent messages ***/
/*.step[data-step-type="assistant_message"] .message-content {}*/

/** Agent Avatar Image **/
span.rounded-full:has(> img.aspect-square) {
    border-radius: 4px;
    height: 26px;
    width: 26px;
}

/*** Reasoning messages ***/
.step[data-step-type="tool"] .ai-message h3 {
    padding-top: 0.3rem;
    font-size: 0.889rem;
}

/* chat watermark */
.watermark {
    text-align: center;
}