/* COMPREHENSIVE CHAINLIT UI HIDING */

/* Hide ALL header elements except title/logo */
header *:not(h1):not(.MuiTypography-h6):not([class*="title"]):not([class*="logo"]) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Hide ALL buttons globally, then restore action buttons */
button,
.MuiButton-root,
.MuiButtonBase-root,
.MuiIconButton-root,
.MuiToggleButton-root,
.MuiFab-root,
[role="button"] {
    display: none !important;
    visibility: hidden !important;
}

/* Restore action buttons in message content area */
.cl-message button,
.cl-message .MuiButton-root,
.cl-message .MuiButtonBase-root,
.cl-message .MuiIconButton-root,
.cl-message [role="button"],
[class*="message"] button,
[class*="message"] .MuiButton-root,
[class*="message"] .MuiButtonBase-root,
[class*="message"] .MuiIconButton-root,
[class*="message"] [role="button"],
[data-testid*="message"] button,
[data-testid*="message"] .MuiButton-root,
[data-testid*="message"] .MuiButtonBase-root,
[data-testid*="message"] .MuiIconButton-root,
[data-testid*="message"] [role="button"] {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Hide all SVG icons in header */
header svg,
header i,
header [class*="icon"] {
    display: none !important;
}

/* Hide toolbar actions and right-side content */
.MuiToolbar-root > *:not(:first-child),
.MuiAppBar-root .MuiToolbar-root > div:not(:first-child),
[class*="toolbar"] > *:not(:first-child) {
    display: none !important;
}

/* Hide navigation and menu elements */
nav button,
nav [role="button"],
[role="navigation"] button,
[class*="nav"] button {
    display: none !important;
}

/* Hide specific Chainlit components */
.cl-header__actions,
.cl-navbar,
.new-chat-button,
[data-cy="new-chat"],
[data-testid*="chat"],
[data-testid*="button"],
[data-testid*="toggle"] {
    display: none !important;
}

/* Hide theme/settings related elements */
[aria-label*="theme"],
[aria-label*="Theme"],
[aria-label*="mode"],
[aria-label*="Mode"],
[aria-label*="settings"],
[aria-label*="Settings"],
[title*="theme"],
[title*="Theme"],
[title*="mode"],
[title*="Mode"] {
    display: none !important;
}

/* Hide dropdown menus and modal triggers */
[role="menu"],
[role="menuitem"],
.MuiMenu-root,
.MuiMenuItem-root,
[class*="dropdown"],
[class*="menu"] {
    display: none !important;
}

/* Hide any floating action buttons or overlays */
.MuiSpeedDial-root,
.MuiDialog-root,
.MuiModal-root,
[class*="overlay"],
[class*="popup"] {
    display: none !important;
}

/* Hide interactive elements only in header */
header *[onclick],
header *[onmousedown],
header *[onmouseup],
header *[role="button"]:not([class*="title"]):not([class*="heading"]) {
    display: none !important;
}

/* Custom placeholder text */
input[placeholder="chat.input.placeholder"],
input[placeholder="Type your message here..."],
textarea[placeholder="chat.input.placeholder"],
textarea[placeholder="Type your message here..."] {
    /* Can't directly change placeholder via CSS, but we can style it */
}

input[placeholder="chat.input.placeholder"]::placeholder,
input[placeholder="Type your message here..."]::placeholder,
textarea[placeholder="chat.input.placeholder"]::placeholder,
textarea[placeholder="Type your message here..."]::placeholder {
    content: "Ask me anything about Pablo's experience, skills, or background..." !important;
    opacity: 0;
}

input[placeholder="chat.input.placeholder"]::before,
input[placeholder="Type your message here..."]::before,
textarea[placeholder="chat.input.placeholder"]::before,
textarea[placeholder="Type your message here..."]::before {
    content: "Ask me anything about Pablo's experience, skills, or background...";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
    opacity: 1;
}

/* Hide original placeholder when input has focus or content */
input[placeholder="chat.input.placeholder"]:focus::before,
input[placeholder="Type your message here..."]:focus::before,
textarea[placeholder="chat.input.placeholder"]:focus::before,
textarea[placeholder="Type your message here..."]:focus::before,
input[placeholder="chat.input.placeholder"]:not(:placeholder-shown)::before,
input[placeholder="Type your message here..."]:not(:placeholder-shown)::before,
textarea[placeholder="chat.input.placeholder"]:not(:placeholder-shown)::before,
textarea[placeholder="Type your message here..."]:not(:placeholder-shown)::before {
    opacity: 0;
}

/* Hide element with id="header" specifically */
#header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Hide entire header if all else fails - UNCOMMENT IF NEEDED */
/*
header,
.MuiAppBar-root,
[role="banner"] {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

main,
.MuiContainer-root,
[role="main"] {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
*/