/**
 * Puntoal — CookieConsent v3 Theme Overrides
 * Adapts the default CookieConsent styles to match Puntoal's design system.
 */

/* ─── Consent Modal (bar at bottom) ─── */
#cc-main .cm {
    background: var(--bg-glass, rgba(10, 17, 40, 0.85));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--bg-glass-border, rgba(255, 255, 255, 0.06));
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.25);
}

/* ─── Text colors ─── */
#cc-main .cm__title,
#cc-main .pm__title {
    color: var(--text-primary, #f0f4ff);
}

#cc-main .cm__desc,
#cc-main .pm__section-desc-wrapper,
#cc-main .pm__section-title-wrapper {
    color: var(--text-secondary, #8b9cc7);
}

/* ─── Links ─── */
#cc-main .cc-link,
#cc-main a {
    color: #00c9a7;
}

#cc-main .cc-link:hover,
#cc-main a:hover {
    color: #00e6bf;
}

/* ─── Accept All button (primary gradient) ─── */
#cc-main .cm__btn:first-child,
#cc-main .pm__btn:first-child {
    background: linear-gradient(135deg, #00c9a7, #00e0c0);
    color: #050a18;
    font-weight: 600;
    border: none;
    border-radius: 9999px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 201, 167, 0.25);
}

#cc-main .cm__btn:first-child:hover,
#cc-main .pm__btn:first-child:hover {
    box-shadow: 0 6px 24px rgba(0, 201, 167, 0.4);
    transform: translateY(-1px);
}

/* ─── Reject / Necessary only button (outline) ─── */
#cc-main .cm__btn:last-child {
    background: transparent;
    color: var(--text-primary, #f0f4ff);
    border: 1.5px solid var(--border-color-hover, rgba(255, 255, 255, 0.12));
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#cc-main .cm__btn:last-child:hover {
    border-color: #00c9a7;
    color: #00c9a7;
}

/* ─── Show preferences link ─── */
#cc-main .cm__btn--secondary {
    background: transparent;
    color: var(--text-secondary, #8b9cc7);
    border: none;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
    border-radius: 9999px;
}

#cc-main .cm__btn--secondary:hover {
    color: #00c9a7;
}

/* ─── Preferences Modal ─── */
#cc-main .pm {
    background: var(--bg-glass, rgba(10, 17, 40, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--bg-glass-border, rgba(255, 255, 255, 0.06));
    border-radius: 16px;
}

#cc-main .pm__header {
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
}

#cc-main .pm__section {
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
}

#cc-main .pm__footer {
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
}

/* ─── Save preferences button ─── */
#cc-main .pm__btn {
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* ─── Toggle switch ─── */
#cc-main .section__toggle:checked ~ .toggle__icon {
    background: #00c9a7;
}

/* ─── Cookie table ─── */
#cc-main .pm__table td,
#cc-main .pm__table th {
    color: var(--text-secondary, #8b9cc7);
    border-color: var(--border-color, rgba(255, 255, 255, 0.06));
}

/* ─── Footer links ─── */
#cc-main .cm__footer {
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
}

/* ─── Overlay ─── */
#cc-main .cm--bar .cm__body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

/* ═══════════════════════════════════════════
   LIGHT THEME OVERRIDES
   ═══════════════════════════════════════════ */
[data-theme="light"] #cc-main .cm {
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] #cc-main .cm__title,
[data-theme="light"] #cc-main .pm__title {
    color: #0f172a;
}

[data-theme="light"] #cc-main .cm__desc,
[data-theme="light"] #cc-main .pm__section-desc-wrapper,
[data-theme="light"] #cc-main .pm__section-title-wrapper {
    color: #475569;
}

[data-theme="light"] #cc-main .cm__btn:last-child {
    color: #0f172a;
    border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] #cc-main .cm__btn--secondary {
    color: #475569;
}

[data-theme="light"] #cc-main .pm {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] #cc-main .pm__header,
[data-theme="light"] #cc-main .pm__section,
[data-theme="light"] #cc-main .pm__footer,
[data-theme="light"] #cc-main .cm__footer {
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] #cc-main .pm__table td,
[data-theme="light"] #cc-main .pm__table th {
    color: #475569;
    border-color: rgba(0, 0, 0, 0.06);
}
