/* Cookie consent (Law 25) - reusable kit.
   Re-theme per site by overriding the --cc-* variables (see the guide).
   Each variable falls back to the site's own design tokens when they exist. */
.cookie-consent {
    --cc-bg: var(--bg-card, #ffffff);
    --cc-text: var(--text-main, #4b5563);
    --cc-heading: var(--text-heading, #18181b);
    --cc-accent: #336699;
    --cc-accent-hover: #264d73;
    --cc-on-accent: #ffffff;
    --cc-gold: #39c0e0;
    --cc-border: var(--border-color, #e4e4e7);
    --cc-radius: 12px;
    --cc-font: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --cc-font-heading: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --cc-ease: cubic-bezier(0.16, 1, 0.3, 1);

    position: fixed;
    left: 1.5rem;
    bottom: 1.5rem;
    z-index: 100000;
    width: calc(100% - 3rem);
    max-width: 520px;
    box-sizing: border-box;
    background-color: var(--cc-bg);
    color: var(--cc-text);
    font-family: var(--cc-font);
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
    border: 1px solid var(--cc-border);
    border-top: 3px solid var(--cc-gold);
    border-radius: var(--cc-radius);
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.25);
    animation: ccIn 0.6s var(--cc-ease);
}

.cookie-consent *,
.cookie-consent *::before,
.cookie-consent *::after { box-sizing: border-box; }

.cookie-consent[hidden],
.cookie-consent [hidden] { display: none !important; }

@keyframes ccIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.cookie-consent .cc-inner { padding: 1.5rem; }

.cookie-consent .cc-close {
    position: absolute;
    top: 1rem;
    right: 1.1rem;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--cc-heading, #18181b);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s var(--cc-ease);
    -webkit-appearance: none;
    appearance: none;
    opacity: 0.65;
    z-index: 2;
}

.cookie-consent .cc-close:hover {
    opacity: 1;
    color: var(--cc-accent, #b80a2d);
    background-color: rgba(127, 127, 127, 0.12);
    transform: scale(1.08);
}

.cookie-consent .cc-close:focus-visible {
    outline: 2px solid var(--cc-gold, #c4a472);
    outline-offset: 2px;
    opacity: 1;
}

/* Neutralise legacy global p/h/button rules */
.cookie-consent .cc-title {
    font-family: var(--cc-font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
    text-transform: none;
    letter-spacing: normal;
    color: var(--cc-heading);
    margin: 0 0 0.5rem;
    padding-right: 2rem;
}

.cookie-consent .cc-text {
    font-size: 0.92rem;
    line-height: 1.6;
    text-align: left;
    color: var(--cc-text);
    margin: 0 0 1.1rem;
}

.cookie-consent .cc-link {
    color: var(--cc-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}
.cookie-consent .cc-link:hover { color: var(--cc-accent-hover); }

.cookie-consent .cc-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* Accept and Refuse share the exact same style so neither is nudged (Law 25) */
.cookie-consent .cc-btn {
    flex: 1 1 auto;
    margin: 0;
    padding: 0.7rem 1.3rem;
    border-radius: 50px;
    font-family: var(--cc-font);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
    transition: all 0.3s var(--cc-ease);
    border: 1px solid var(--cc-accent);
    -webkit-appearance: none;
    appearance: none;
}

.cookie-consent .cc-btn-primary { background-color: var(--cc-accent); color: var(--cc-on-accent); }
.cookie-consent .cc-btn-primary:hover { background-color: var(--cc-accent-hover); border-color: var(--cc-accent-hover); transform: translateY(-2px); }

.cookie-consent .cc-btn-ghost { background-color: transparent; color: var(--cc-heading); border-color: var(--cc-border); }
.cookie-consent .cc-btn-ghost:hover { border-color: var(--cc-gold); color: var(--cc-accent); }

.cookie-consent .cc-btn:focus-visible,
.cookie-consent .cc-switch input:focus-visible + i,
.cc-fab:focus-visible { outline: 2px solid var(--cc-gold); outline-offset: 3px; }

/* Preferences */
.cookie-consent .cc-prefs { margin-bottom: 1.1rem; border-top: 1px solid var(--cc-border); }

.cookie-consent .cc-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--cc-border);
}

.cookie-consent .cc-option strong {
    display: block;
    color: var(--cc-heading);
    font-size: 0.95rem;
    font-weight: 700;
}

.cookie-consent .cc-option span {
    display: block;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--cc-text);
    opacity: 0.8;
}

.cookie-consent .cc-switch {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 26px;
    margin: 0;
    cursor: pointer;
}

.cookie-consent .cc-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.cookie-consent .cc-switch i {
    position: absolute;
    inset: 0;
    border-radius: 50px;
    background-color: #d4d4d8;
    transition: all 0.3s var(--cc-ease);
    pointer-events: none;
}

.cookie-consent .cc-switch i::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.3s var(--cc-ease);
}

.cookie-consent .cc-switch input:checked + i { background-color: var(--cc-accent); }
.cookie-consent .cc-switch input:checked + i::after { transform: translateX(20px); }

.cookie-consent .cc-switch input:disabled { cursor: not-allowed; }
.cookie-consent .cc-switch input:disabled + i { opacity: 0.5; }

/* Optional floating reopen button (for sites without a footer link) */
.cc-fab {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 99999;
    margin: 0;
    padding: 0.45rem 0.9rem;
    border-radius: 50px;
    border: 1px solid #e4e4e7;
    background: #ffffff;
    color: #4b5563;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.75rem;
    line-height: 1.2;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cc-fab:hover { color: #b80a2d; border-color: #c4a472; }

@media (max-width: 600px) {
    .cookie-consent {
        left: 0.75rem;
        bottom: 0.75rem;
        width: calc(100% - 1.5rem);
        max-height: calc(100vh - 1.5rem);
        overflow-y: auto;
    }
    .cookie-consent .cc-inner { padding: 1.15rem; }
    .cookie-consent .cc-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent { animation: none; }
    .cookie-consent .cc-btn,
    .cookie-consent .cc-switch i,
    .cookie-consent .cc-switch i::after { transition: none; }
}

/* Tiny footer strip (for sites that have no footer of their own) */
.cc-mini-footer {
    padding: 1.5rem 1rem 2.5rem;
    text-align: center;
    background: transparent;
    border: none;
}
.cc-mini-footer a,
.cc-mini-footer [data-cookie-settings] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.4rem;
    border-radius: 50px;
    font-family: 'Noto Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #ffffff !important;
    background-color: var(--primary-red, #b80a2d);
    border: 1px solid var(--primary-red, #b80a2d);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(184, 10, 45, 0.25);
}
.cc-mini-footer a:hover,
.cc-mini-footer [data-cookie-settings]:hover {
    background-color: var(--primary-red-hover, #910520);
    border-color: var(--primary-red-hover, #910520);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(184, 10, 45, 0.35);
}
