/* Presets compartilhados dos painéis Celebrax.
   Os temas alteram somente a interface administrativa; a identidade do site público do evento permanece independente. */

.admin-theme-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 0 12px;
}

.admin-theme-option,
.provider-theme-option {
    border: 1px solid var(--admin-border, var(--provider-border));
    color: var(--admin-text, var(--provider-text));
    background: var(--admin-card, var(--provider-card));
    cursor: pointer;
}

.admin-theme-option {
    display: grid;
    grid-template-columns: 25px 1fr;
    gap: 8px;
    align-items: center;
    min-height: 44px;
    padding: 7px 9px;
    border-radius: 11px;
    font-size: .68rem;
    font-weight: 750;
    text-align: left;
}

.admin-theme-option[aria-checked="true"] {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--admin-primary) 18%, transparent);
}

.panel-theme-swatch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 25px;
    height: 25px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .14);
    border-radius: 50%;
}

.panel-theme-swatch i {
    display: block;
}

.panel-theme-swatch[data-theme-swatch="light"] i:first-child { background: #f4f7fb; }
.panel-theme-swatch[data-theme-swatch="light"] i:last-child { background: #0b1730; }
.panel-theme-swatch[data-theme-swatch="dark"] i:first-child { background: #0b1120; }
.panel-theme-swatch[data-theme-swatch="dark"] i:last-child { background: #60a5fa; }
.panel-theme-swatch[data-theme-swatch="ocean"] i:first-child { background: #e8f2fb; }
.panel-theme-swatch[data-theme-swatch="ocean"] i:last-child { background: #0f6ea8; }
.panel-theme-swatch[data-theme-swatch="lavender"] i:first-child { background: #f5effa; }
.panel-theme-swatch[data-theme-swatch="lavender"] i:last-child { background: #76549b; }
.panel-theme-swatch[data-theme-swatch="sage"] i:first-child { background: #eef4ed; }
.panel-theme-swatch[data-theme-swatch="sage"] i:last-child { background: #3d7a62; }

.admin-theme-caption {
    display: block;
    margin: 2px 0 8px;
    color: var(--admin-muted);
    font-size: .64rem;
    line-height: 1.45;
}

/* Painel do Evento: Oceano */
body.admin-theme-ocean {
    --admin-bg: #eaf3f8;
    --admin-bg-soft: #dcecf4;
    --admin-sidebar: #123a63;
    --admin-sidebar-soft: #174f78;
    --admin-primary: #0f6ea8;
    --admin-coral: #e2675a;
    --admin-orange: #d68a3d;
    --admin-mint: #269c89;
    --admin-gold: #d6a83b;
    --admin-text: #15324c;
    --admin-muted: #5d7385;
    --admin-border: #c8dce7;
    --admin-card: #fbfdfe;
    --admin-card-shadow: 0 14px 34px rgba(18, 58, 99, .09);
    --admin-active-bg: linear-gradient(135deg, rgba(15, 110, 168, .18), rgba(38, 156, 137, .10));
    --admin-active-border: rgba(15, 110, 168, .32);
    background: radial-gradient(circle at top right, rgba(15, 110, 168, .13), transparent 30%), linear-gradient(180deg, #f6fbfd, var(--admin-bg)) !important;
}

/* Painel do Evento: Lavanda */
body.admin-theme-lavender {
    --admin-bg: #f3eef7;
    --admin-bg-soft: #ebe2f2;
    --admin-sidebar: #3f315c;
    --admin-sidebar-soft: #594274;
    --admin-primary: #76549b;
    --admin-coral: #c85b79;
    --admin-orange: #c27a53;
    --admin-mint: #4f8d7a;
    --admin-gold: #c59b48;
    --admin-text: #352b49;
    --admin-muted: #756985;
    --admin-border: #ddd0e6;
    --admin-card: #fffafd;
    --admin-card-shadow: 0 14px 34px rgba(63, 49, 92, .10);
    --admin-active-bg: linear-gradient(135deg, rgba(118, 84, 155, .20), rgba(200, 91, 121, .10));
    --admin-active-border: rgba(154, 112, 181, .35);
    background: radial-gradient(circle at top right, rgba(118, 84, 155, .14), transparent 30%), linear-gradient(180deg, #fcf9fe, var(--admin-bg)) !important;
}

/* Painel do Evento: Sálvia */
body.admin-theme-sage {
    --admin-bg: #edf3ed;
    --admin-bg-soft: #e1ece2;
    --admin-sidebar: #29483b;
    --admin-sidebar-soft: #365f4e;
    --admin-primary: #3d7a62;
    --admin-coral: #c86c62;
    --admin-orange: #c67a45;
    --admin-mint: #4d9275;
    --admin-gold: #bd9947;
    --admin-text: #263b32;
    --admin-muted: #66786f;
    --admin-border: #cadacd;
    --admin-card: #fbfdf9;
    --admin-card-shadow: 0 14px 34px rgba(41, 72, 59, .09);
    --admin-active-bg: linear-gradient(135deg, rgba(61, 122, 98, .20), rgba(198, 122, 69, .10));
    --admin-active-border: rgba(77, 146, 117, .34);
    background: radial-gradient(circle at top right, rgba(61, 122, 98, .13), transparent 30%), linear-gradient(180deg, #f8fbf7, var(--admin-bg)) !important;
}

body.admin-theme-ocean .sidebar {
    background: radial-gradient(circle at 15% 0%, rgba(67, 170, 211, .22), transparent 31%), linear-gradient(180deg, #123a63, #0c2a49) !important;
}

body.admin-theme-lavender .sidebar {
    background: radial-gradient(circle at 15% 0%, rgba(200, 91, 121, .20), transparent 31%), linear-gradient(180deg, #3f315c, #2d2442) !important;
}

body.admin-theme-sage .sidebar {
    background: radial-gradient(circle at 15% 0%, rgba(198, 122, 69, .18), transparent 31%), linear-gradient(180deg, #29483b, #1f382e) !important;
}

body.admin-theme-ocean .admin-header-eyebrow,
body.admin-theme-lavender .admin-header-eyebrow,
body.admin-theme-sage .admin-header-eyebrow,
body.admin-theme-ocean .admin-dashboard-kicker,
body.admin-theme-lavender .admin-dashboard-kicker,
body.admin-theme-sage .admin-dashboard-kicker {
    color: var(--admin-primary) !important;
}

body.admin-dark-mode .admin-theme-option {
    color: var(--dark-text);
    background: var(--dark-panel);
    border-color: var(--dark-border);
}

body.admin-dark-mode .admin-theme-option[aria-checked="true"] {
    border-color: var(--dark-accent);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, .18);
}

body.admin-dark-mode .admin-theme-caption {
    color: var(--dark-muted);
}

/* Seletor do Portal do Prestador */
.provider-theme-button {
    position: relative;
}

.provider-theme-popover {
    position: fixed;
    z-index: 12000;
    top: 78px;
    right: 24px;
    width: min(330px, calc(100vw - 32px));
    padding: 16px;
    color: var(--provider-text);
    background: var(--provider-card);
    border: 1px solid var(--provider-border);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(11, 23, 48, .22);
}

.provider-theme-popover header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 13px;
}

.provider-theme-popover header div {
    display: grid;
    gap: 3px;
}

.provider-theme-popover header strong {
    color: var(--provider-navy);
    font-size: .82rem;
}

.provider-theme-popover header small {
    color: var(--provider-muted);
    font-size: .64rem;
    line-height: 1.4;
}

.provider-theme-close {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--provider-text);
    background: var(--provider-soft);
    border: 1px solid var(--provider-border);
    border-radius: 10px;
}

.provider-theme-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.provider-theme-option {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 9px;
    align-items: center;
    min-height: 50px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: .7rem;
    font-weight: 800;
    text-align: left;
}

.provider-theme-option[aria-checked="true"] {
    border-color: var(--provider-blue);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--provider-blue) 20%, transparent);
}

/* Portal do Prestador: Oceano */
html[data-theme="ocean"] {
    color-scheme: light;
    --provider-bg: #eaf3f8;
    --provider-card: #fbfdfe;
    --provider-text: #15324c;
    --provider-navy: #123a63;
    --provider-muted: #5d7385;
    --provider-border: #c8dce7;
    --provider-soft: #dcecf4;
    --provider-blue: #0f6ea8;
    --provider-blue-dark: #0b567f;
    --provider-mint: #269c89;
    --provider-coral: #e2675a;
    --provider-orange: #d68a3d;
    --provider-shadow: 0 20px 60px rgba(18, 58, 99, .12);
}

/* Portal do Prestador: Lavanda */
html[data-theme="lavender"] {
    color-scheme: light;
    --provider-bg: #f3eef7;
    --provider-card: #fffafd;
    --provider-text: #352b49;
    --provider-navy: #3f315c;
    --provider-muted: #756985;
    --provider-border: #ddd0e6;
    --provider-soft: #ebe2f2;
    --provider-blue: #76549b;
    --provider-blue-dark: #5d407d;
    --provider-mint: #4f8d7a;
    --provider-coral: #c85b79;
    --provider-orange: #c27a53;
    --provider-shadow: 0 20px 60px rgba(63, 49, 92, .13);
}

/* Portal do Prestador: Sálvia */
html[data-theme="sage"] {
    color-scheme: light;
    --provider-bg: #edf3ed;
    --provider-card: #fbfdf9;
    --provider-text: #263b32;
    --provider-navy: #29483b;
    --provider-muted: #66786f;
    --provider-border: #cadacd;
    --provider-soft: #e1ece2;
    --provider-blue: #3d7a62;
    --provider-blue-dark: #2e604c;
    --provider-mint: #4d9275;
    --provider-coral: #c86c62;
    --provider-orange: #c67a45;
    --provider-shadow: 0 20px 60px rgba(41, 72, 59, .12);
}

html[data-theme="ocean"] body,
html[data-theme="lavender"] body,
html[data-theme="sage"] body {
    background: var(--provider-bg);
}

html[data-theme="ocean"] .provider-sidebar {
    background: linear-gradient(180deg, #123a63, #0c2a49);
}

html[data-theme="lavender"] .provider-sidebar {
    background: linear-gradient(180deg, #3f315c, #2d2442);
}

html[data-theme="sage"] .provider-sidebar {
    background: linear-gradient(180deg, #29483b, #1f382e);
}

html[data-theme="ocean"] .provider-public-shell::before,
html[data-theme="lavender"] .provider-public-shell::before,
html[data-theme="sage"] .provider-public-shell::before {
    background: color-mix(in srgb, var(--provider-blue) 16%, transparent);
}

html[data-theme="ocean"] .provider-public-shell::after,
html[data-theme="lavender"] .provider-public-shell::after,
html[data-theme="sage"] .provider-public-shell::after {
    background: color-mix(in srgb, var(--provider-mint) 14%, transparent);
}

@media (max-width: 620px) {
    .admin-theme-picker,
    .provider-theme-options {
        grid-template-columns: 1fr;
    }

    .provider-theme-popover {
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-theme-option,
    .provider-theme-option,
    .provider-theme-popover {
        transition: none !important;
    }
}
