/*
 * Clinic Type Themes
 * Carregado APÓS dark-theme.css. Seletores mais específicos (.theme-dark .clinic-X *)
 * ganham de dark-theme.css (.theme-dark *) por especificidade — sem !important.
 *
 * Família Medical (default): nenhuma classe extra — usa a paleta azul do app.css.
 * Dental:       .clinic-dental     (#1a7abf teal-blue)
 * Veterinary:   .clinic-veterinary (#1a9152 forest-green)
 * Therapy:      .clinic-therapy    (#6c54b5 soft-indigo)
 *
 * IMPORTANTE: os seletores incluem .clinic-X * para sobrescrever o seletor * do app.css
 * que fixa --primary-color em cada elemento, bloqueando herança. Clinic-themes.css é
 * carregado DEPOIS do dark-theme.css, então ganha por ordem de cascata com mesma especificidade.
 */

/* ═══════════════════════════════════════════════════════════════
   LIGHT MODE
   ═══════════════════════════════════════════════════════════════ */

/* ── Dental ─────────────────────────────────────────────────── */
.clinic-dental,
.clinic-dental * {
    --primary-color:    #1a7abf;
    --primary:          #1a7abf;
    --primary-rgb:      26, 122, 191;
    --primary-soft:     rgba(26, 122, 191, 0.10);
    --box-shadow-focus: 0 0 0 2px rgba(26, 122, 191, 0.25);
}

.clinic-dental.sidebar,
.clinic-dental .sidebar {
    --sidebar-accent:      #1a7abf;
    --sidebar-accent-rgb:  26, 122, 191;
    --sidebar-accent-soft: rgba(26, 122, 191, 0.10);
}

/* ── Veterinary ─────────────────────────────────────────────── */
.clinic-veterinary,
.clinic-veterinary * {
    --primary-color:    #1a9152;
    --primary:          #1a9152;
    --primary-rgb:      26, 145, 82;
    --primary-soft:     rgba(26, 145, 82, 0.10);
    --box-shadow-focus: 0 0 0 2px rgba(26, 145, 82, 0.25);
}

.clinic-veterinary.sidebar,
.clinic-veterinary .sidebar {
    --sidebar-accent:      #1a9152;
    --sidebar-accent-rgb:  26, 145, 82;
    --sidebar-accent-soft: rgba(26, 145, 82, 0.10);
}

/* ── Therapy / Psychology ───────────────────────────────────── */
.clinic-therapy,
.clinic-therapy * {
    --primary-color:    #6c54b5;
    --primary:          #6c54b5;
    --primary-rgb:      108, 84, 181;
    --primary-soft:     rgba(108, 84, 181, 0.10);
    --box-shadow-focus: 0 0 0 2px rgba(108, 84, 181, 0.25);
}

.clinic-therapy.sidebar,
.clinic-therapy .sidebar {
    --sidebar-accent:      #6c54b5;
    --sidebar-accent-rgb:  108, 84, 181;
    --sidebar-accent-soft: rgba(108, 84, 181, 0.10);
}

/* ═══════════════════════════════════════════════════════════════
   DARK MODE — especificidade 0-2-0, bate dark-theme.css (0-1-0)
   Sobrescreve --primary-color e --primary-rgb em TODOS os elementos
   dentro do wrapper de clínica no modo escuro.
   ═══════════════════════════════════════════════════════════════ */

/* ── Dark + Dental ──────────────────────────────────────────── */
.theme-dark .clinic-dental,
.theme-dark .clinic-dental * {
    --primary-color:    #3a9bd5;
    --primary:          #3a9bd5;
    --primary-rgb:      58, 155, 213;
    --primary-soft:     rgba(58, 155, 213, 0.20);
    --box-shadow-focus: 0 0 0 2px rgba(58, 155, 213, 0.35);
}

.theme-dark .clinic-dental .sidebar,
.theme-dark .clinic-dental.sidebar {
    --sidebar-accent:      #3a9bd5;
    --sidebar-accent-rgb:  58, 155, 213;
    --sidebar-accent-soft: rgba(58, 155, 213, 0.15);
}

.theme-dark .clinic-dental .logo-accent,
.theme-dark .clinic-dental .logo-short           { color: #3a9bd5; }
.theme-dark .clinic-dental .menu-item.active      { color: #3a9bd5; background: rgba(58, 155, 213, 0.15); border-left-color: #3a9bd5; }
.theme-dark .clinic-dental .user-avatar           { background: rgba(58, 155, 213, 0.18); border-color: rgba(58, 155, 213, 0.3); color: #3a9bd5; }
.theme-dark .clinic-dental .theme-toggle:hover    { color: #3a9bd5; background: rgba(58, 155, 213, 0.1); }
.theme-dark .clinic-dental .clinic-badge          { background: rgba(58, 155, 213, 0.15); color: #3a9bd5; }

/* ── Dark + Veterinary ──────────────────────────────────────── */
.theme-dark .clinic-veterinary,
.theme-dark .clinic-veterinary * {
    --primary-color:    #2ecc71;
    --primary:          #2ecc71;
    --primary-rgb:      46, 204, 113;
    --primary-soft:     rgba(46, 204, 113, 0.20);
    --box-shadow-focus: 0 0 0 2px rgba(46, 204, 113, 0.35);
}

.theme-dark .clinic-veterinary .sidebar,
.theme-dark .clinic-veterinary.sidebar {
    --sidebar-accent:      #2ecc71;
    --sidebar-accent-rgb:  46, 204, 113;
    --sidebar-accent-soft: rgba(46, 204, 113, 0.15);
}

.theme-dark .clinic-veterinary .logo-accent,
.theme-dark .clinic-veterinary .logo-short        { color: #2ecc71; }
.theme-dark .clinic-veterinary .menu-item.active  { color: #2ecc71; background: rgba(46, 204, 113, 0.15); border-left-color: #2ecc71; }
.theme-dark .clinic-veterinary .user-avatar       { background: rgba(46, 204, 113, 0.18); border-color: rgba(46, 204, 113, 0.3); color: #2ecc71; }
.theme-dark .clinic-veterinary .theme-toggle:hover { color: #2ecc71; background: rgba(46, 204, 113, 0.1); }
.theme-dark .clinic-veterinary .clinic-badge      { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }

/* ── Dark + Therapy ─────────────────────────────────────────── */
.theme-dark .clinic-therapy,
.theme-dark .clinic-therapy * {
    --primary-color:    #9b7de8;
    --primary:          #9b7de8;
    --primary-rgb:      155, 125, 232;
    --primary-soft:     rgba(155, 125, 232, 0.20);
    --box-shadow-focus: 0 0 0 2px rgba(155, 125, 232, 0.35);
}

.theme-dark .clinic-therapy .sidebar,
.theme-dark .clinic-therapy.sidebar {
    --sidebar-accent:      #9b7de8;
    --sidebar-accent-rgb:  155, 125, 232;
    --sidebar-accent-soft: rgba(155, 125, 232, 0.15);
}

.theme-dark .clinic-therapy .logo-accent,
.theme-dark .clinic-therapy .logo-short           { color: #9b7de8; }
.theme-dark .clinic-therapy .menu-item.active     { color: #9b7de8; background: rgba(155, 125, 232, 0.15); border-left-color: #9b7de8; }
.theme-dark .clinic-therapy .user-avatar          { background: rgba(155, 125, 232, 0.18); border-color: rgba(155, 125, 232, 0.3); color: #9b7de8; }
.theme-dark .clinic-therapy .theme-toggle:hover   { color: #9b7de8; background: rgba(155, 125, 232, 0.1); }
.theme-dark .clinic-therapy .clinic-badge         { background: rgba(155, 125, 232, 0.15); color: #9b7de8; }
