/* Hide the button containing the plug icon */
button:has(svg.lucide-plug) {
    display: none;
}

.welcome-screen {
    .logo {
        width: 58px !important;
        margin-bottom: 140px !important;
    }
}
#header {
    background: hsl(var(--header-bg));
}

/* Insert text before first empty div in header */
#header > div:first-child:empty::before {
    content: "Assistant IA interne";
    position: absolute;
    top: 50%;
    left: 12px;
    width: 150px;
    transform: translateY(-50%);
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: white;
    font-weight: bold;
}

#header > div.flex.items-center {
    position: relative;
}

#header > div:last-child::before {
    content: "";
    display: block;
    width: 173px;
    height: 36px;
    background-image: url('/public/logo_dark.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 12px;
}

[data-state="expanded"] [data-sidebar="header"]::after {
    content: "";
    position: absolute;
    top: 17px;
    right: -3px;
    height: 28px;
    width: 1px;
    background: #e3e3e354;
}

[data-sidebar="header"] {
    background: hsl(var(--header-bg));
    padding-bottom: 11px !important;
}
#chat-profiles {
    color: white;
    font-size: 16px;
}
#welcome-screen #message-composer {
    position: relative;
}
#welcome-screen #message-composer::before {
    content: "Comment puis-je vous aider aujourd'hui ?";
    display: block;
    text-align: center;
    position: absolute;
    top: -134px;
    left: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 26px;
    font-weight: 500;
    width: 100%;
}

#welcome-screen #message-composer::after {
    content: "Bienvenue sur l'assistant IA interne de Cospirit";
    display: block;
    text-align: center;
    position: absolute;
    top: -87px;
    left: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: hsl(var(--welcome-msg));
    font-weight: 400;
    width: 100%;
}
#theme-toggle, #search-chats-button, #sidebar-trigger-button {
   color: hsl(var(--header-muted));
}
/* Hide elements on mobile and tablet */
@media (max-width: 768px) {
    #header > div:last-child::before {
        display: none;
    }
    
    #welcome-screen #message-composer::after {
        display: none;
    }
}

#theme-toggle:hover, #search-chats-button:hover, #sidebar-trigger-button:hover, #chat-profiles:hover, #user-nav-button:hover {
   background-color: hsl(var(--header-hover-bg));
}
#theme-toggle:focus-visible, #new-chat-button:focus-visible, #search-chats-button:focus-visible, #sidebar-trigger-button:focus-visible, #chat-profiles:focus-visible, #user-nav-button:focus-visible {
   --tw-ring-offset-shadow: 1px 0px 15px 5px #00000029;
}
#theme-toggle::focus, #new-chat-button::focus, #search-chats-button::focus, #sidebar-trigger-button::focus, #chat-profiles::focus, #user-nav-button::focus {
   --tw-ring-offset-shadow: 1px 0px 15px 5px #00000029;
}

#user-nav-button {
    .bg-primary {
        background: #ecebeb5c;
    }
}

#new-chat-button {
    background: hsl(var(--primary));
    color: white
}

#new-chat-button:hover {
    background-color: #3333ffb0;
}

#readme-button {
    display: none;
}

.watermark {
    height: 17px;
}
.watermark .prose {
    display: none;
}

/* Hide tool and llm steps */
[data-step-type="tool"],
[data-step-type="llm"] {
    display: none;
}

/* Loading indicator above message-composer while generating */
@keyframes shimmer {
    0%   { background-position:  200% center; }
    100% { background-position: -200% center; }
}

body:has(#message-composer .stop-icon) *:has(> [data-step-type="user_message"])::after {
    content: "Chargement...";
    display: block;
    margin-top: 12px;
    padding-left: 16px;
    font-size: 1em;
    white-space: nowrap;
    background: linear-gradient(
        90deg,
        hsl(var(--muted-foreground, 0 0% 25%)) 25%,
        hsl(var(--foreground, 0 0% 95%)) 50%,
        hsl(var(--muted-foreground, 0 0% 25%)) 75%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 1.6s linear infinite;
}

.loading-cursor {
    display: none !important;
}

.welcome-screen img {
    margin-bottom: 90px;
}

*:has(> #message-composer)::after {
    content: "Version alpha en cours de développement";
    display: block;
    background-color: #ad791d;
    color: white;
    padding: 5px;
    margin: 20px;
    border-radius: 12px;
}
