/* Hide Chainlit branding */
a[href*='https://github.com/Chainlit/chainlit'] {
    visibility: hidden;
}

div.watermark, .watermark {
    display: none !important;
}

/* Message spacing */
.step {
    margin-bottom: 0.5rem;
}

/* USER MESSAGE STYLING - Shadow for pop-out effect */
.px-5.py-2\.5.relative.bg-accent.rounded-3xl {
    border: 1px solid hsl(0 0% 85%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease-in-out;
}

.px-5.py-2\.5.relative.bg-accent.rounded-3xl:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px);
}

/* SPECIAL BUTTONS STYLING - Outline style */
.-ml-1\.5 button:not(.w-9):not([class*="w-9"]) {
    background-color: transparent !important;
    color: hsl(var(--primary)) !important;
    border: 1px solid hsl(var(--primary)) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.750rem;
    transition: all 0.2s ease-in-out;
}

.-ml-1\.5 button:not(.w-9):not([class*="w-9"]):hover {
    background-color: hsla(var(--primary), 0.05) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px hsla(var(--primary), 0.15);
}

/* Messages loading animation */
.step:empty {
    width: 24px;
    height: 24px;
    margin-left: 16px;
    background-image: url("data:image/svg+xml;base64,PHN2ZwogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICB3aWR0aD0iMjQiCiAgaGVpZ2h0PSIyNCIKICB2aWV3Qm94PSIwIDAgMjQgMjQiCiAgZmlsbD0ibm9uZSIKICBzdHJva2U9ImN1cnJlbnRDb2xvciIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCiAgY2xhc3M9Imljb24gaWNvbi10YWJsZXIgaWNvbnMtdGFibGVyLW91dGxpbmUgaWNvbi10YWJsZXItbG9hZGVyLTIiCj4KICA8cGF0aCBzdHJva2U9Im5vbmUiIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4KICA8cGF0aCBkPSJNMTIgM2E5IDkgMCAxIDAgOSA5IiAvPgo8L3N2Zz4=");
    animation: spin 2s linear infinite;
}

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

/* Copy button tooltips */
button[aria-label="Copy"]:hover::after {
    content: "Kopieren";
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 4px;
    border-radius: 8px;
    top: 100%;
    width: 64px;
    left: 0;
    font-size: 12px;
    opacity: 0.9;
    z-index: 10000;
}

button[aria-label="Copy"]:active::after {
    content: "In die Zwischenablage kopiert!";
    width: 192px;
}

/* Hide profile and sidebar buttons */
.MuiIconButton-root:has(.MuiAvatar-root) {
    display: none !important;
}

#open-sidebar-button {
    display: none !important;
}

:root {
    --theme-tooltip-text: "Toggle theme";
    --settings-tooltip-text: "Settings";
    --chatbot-version-date: "23.10.2025";
    --light-theme-tooltip: "Light Theme";
    --dark-theme-tooltip: "Dark Theme";
    --follow-system-tooltip: "Follow System";
}

#theme-toggle,
#chat-settings-open-modal {
    position: relative;
}

#theme-toggle::after,
#chat-settings-open-modal::after {
    position: absolute;
    z-index: 50;
    overflow: hidden;
    border-radius: calc(0.375rem); /* rounded-md */
    border: 1px solid hsl(var(--border));
    background: hsl(var(--popover));
    padding: 0.375rem 0.75rem; /* py-1.5 px-3 */
    font-size: 0.875rem; /* text-sm */
    color: hsl(var(--popover-foreground));
    
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    
    left: 50%;
    transform: translateX(-50%);
    
    pointer-events: none;
    white-space: nowrap;
    
    opacity: 0;
    scale: 0.95;
    transition: opacity 150ms, scale 150ms;
}

#theme-toggle::after {
    content: var(--theme-tooltip-text);
    top: 100%;
    margin-top: 4px;
    left: auto;
    right: -4px;
    transform: none;
}

#chat-settings-open-modal::after {
    content: var(--settings-tooltip-text);
    bottom: 100%;
    margin-bottom: 4px;
    right: auto;
    left: -4px;
    transform: none;
}

#theme-toggle:hover::after,
#chat-settings-open-modal:hover::after {
    opacity: 1;
    scale: 1;
}
  .relative.flex.flex-col.items-center.gap-2.w-full::after {
    content: "RoBOT Version " var(--chatbot-version-date);
    display: block;
    text-align: center;
    font-size: 9px;
    color: #666;
    opacity: 0.7;
    margin-top: -6px;
    margin-bottom: -6px;
  }

div[role="menu"][data-radix-menu-content] {
    overflow: visible !important;
}

div[role="menu"] div[role="menuitem"] {
    position: relative;
    overflow: visible !important;
}

div[role="menu"] div[role="menuitem"]::after {
    content: "";
    position: absolute;
    z-index: 100;
    overflow: hidden;
    border-radius: calc(0.375rem);
    border: 1px solid hsl(var(--border));
    background: hsl(var(--popover));
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    color: hsl(var(--popover-foreground));
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    
    pointer-events: none;
    white-space: nowrap;
    
    opacity: 0;
    scale: 0.95;
    transition: opacity 150ms, scale 150ms;
}

div[role="menu"] div[role="menuitem"]:hover::after {
    opacity: 1;
    scale: 1;
}

div[role="menu"] div[role="menuitem"]:nth-child(1)::after {
    content: var(--light-theme-tooltip);
}

div[role="menu"] div[role="menuitem"]:nth-child(2)::after {
    content: var(--dark-theme-tooltip);
}

div[role="menu"] div[role="menuitem"]:nth-child(3)::after {
    content: var(--follow-system-tooltip);
}
