/* Fibo Theme Override for Mind Map Wizard - PREMIUM DARK NEON */

:root {
    /* Cores principais */
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --secondary-color: #a855f7;
    --accent-color: #f472b6;

    /* Fundos */
    --bg-app: #0f172a;
    /* Slate 950 - Fundo Geral */
    --bg-card: #1e1b4b;
    /* Indigo 950 - Fundo do Card */
    --bg-input: #312e81;
    /* Indigo 900 - Input */

    /* Bordas e Sombras */
    --border-card: #4338ca;
    /* Indigo 700 */
    --glow-primary: rgba(99, 102, 241, 0.4);

    /* Texto */
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    /* Variáveis do mmw.css redefinidas */
    --light-grey: #312e81;
    /* Agora usado como borda secundária */
    --white: #1e1b4b;
    /* Background de elementos brancos originais */
    --text-color: #ffffff;
    --background-color: #0f172a;
    --card-background: #1e1b4b;
}

body {
    background-color: var(--bg-app) !important;
    color: var(--text-primary) !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 20%);
}

/* --- Sidebar --- */
#leftSidebar {
    background-color: var(--bg-app) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.left-sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.sidebar-mindmap-list .mindmap-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* --- Header Card (O Card Principal da Imagem) --- */
/* --- Header Card (O Card Principal da Imagem) --- */
#app {
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh !important;
    width: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.header {
    /* Resetando estilos anteriores do header */
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    max-width: 100% !important;
    /* Mais largo como na imagem */
    margin: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

/* Container interno que simula o card da imagem */
.fibo-card-container {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 32px;
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.1),
        /* Borda interna brilhante */
        0 20px 50px -10px rgba(0, 0, 0, 0.5);
    /* Sombra profunda */
    position: relative;
    overflow: hidden;
    text-align: left;
    /* Alinhamento à esquerda como na imagem */
}

/* Header interno do card: Avatar + Título */
.fibo-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

/* Avatar Roxo */
.fibo-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.fibo-title-group {
    display: flex;
    flex-direction: column;
}

.fibo-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fibo-name {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    margin: 0 !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
}

.fibo-badge {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Mensagem de Boas-vindas */
.fibo-message {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.fibo-message p {
    margin-bottom: 12px;
}

.fibo-submessage {
    background: rgba(15, 23, 42, 0.5);
    /* Fundo mais escuro para destaque */
    padding: 12px;
    border-radius: 12px;
    border-left: 3px solid #f472b6;
    /* Accent color rosa/obsidiana */
}

/* --- Input Area dentro do Card --- */
.input-wrapper {
    background: rgba(255, 255, 255, 0.05) !important;
    /* Translúcido */
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    height: 56px !important;
    margin: 0 !important;
    max-width: 100% !important;
}

.input-wrapper:focus-within {
    border-color: var(--primary-color) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
}

.input {
    color: white !important;
}

.input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Botão de Enviar (Estilo "Conversar") */
.send-prompt-btn {
    background: linear-gradient(90deg, #6366f1, #d946ef) !important;
    /* Gradiente Roxo -> Rosa */
    width: 44px !important;
    /* Um pouco menor para caber melhor */
    height: 44px !important;
    top: 5px !important;
    /* Ajuste de posição */
    right: 5px !important;
    border-radius: 8px !important;
}

.send-prompt-btn svg {
    stroke: white !important;
    fill: none !important;
}

.send-prompt-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(217, 70, 239, 0.5);
}

/* --- Seletores e Outros --- */
.model-dropdown-btn,
.manual-btn {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-muted) !important;
}

.manual-btn:hover {
    border-color: var(--primary-color) !important;
    color: var(--text-primary) !important;
}

/* Loading Animation */
.analyze svg path.board {
    stroke: var(--primary-color) !important;
}

.analyze svg path.stick {
    stroke: var(--accent-color) !important;
}

/* SVGs Gerais */
svg {
    stroke: currentColor;
}

/* ============================================= */
/* COMPACT MODE - Para Grid View (menos espaço) */
/* ============================================= */
@media (max-width: 400px),
(max-height: 450px) {
    .fibo-card-container {
        padding: 12px;
        border-radius: 12px;
    }

    .fibo-card-header {
        gap: 10px;
        margin-bottom: 12px;
    }

    .fibo-avatar {
        width: 32px;
        height: 32px;
    }

    .fibo-avatar svg {
        width: 18px;
        height: 18px;
    }

    .fibo-name {
        font-size: 1rem !important;
    }

    .fibo-badge {
        font-size: 0.65rem;
        padding: 1px 6px;
    }

    .fibo-message {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .fibo-message p {
        margin-bottom: 8px;
    }

    /* Esconde a submensagem no modo compacto */
    .fibo-submessage {
        display: none;
    }

    .input-wrapper {
        height: 44px !important;
        border-radius: 10px !important;
    }

    .input {
        font-size: 0.85rem !important;
    }

    .send-prompt-btn {
        width: 36px !important;
        height: 36px !important;
        top: 3px !important;
        right: 3px !important;
        border-radius: 8px !important;
    }

    .send-prompt-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* ULTRA COMPACT - Para espaços muito pequenos */
@media (max-width: 280px),
(max-height: 320px) {
    .fibo-card-container {
        padding: 8px;
        border-radius: 10px;
    }

    .fibo-card-header {
        gap: 8px;
        margin-bottom: 8px;
    }

    .fibo-avatar {
        width: 28px;
        height: 28px;
    }

    .fibo-name {
        font-size: 0.9rem !important;
    }

    .fibo-badge {
        display: none;
    }

    .fibo-message {
        font-size: 0.75rem;
    }

    /* Esconde welcome message também */
    .fibo-message>p:first-child {
        display: none;
    }

    .input-wrapper {
        height: 40px !important;
        margin-top: 8px !important;
    }
}