/* Cookie Consent — generic styling shared across all brands.
   Picks up your existing --brand-primary / --brand-secondary variables,
   with neutral fallbacks so it works even where those aren't set. */

.cc-hidden { display: none !important; }

body.cc-modal-open { overflow: hidden; }

/* ---- Banner ------------------------------------------------------------- */

.cc-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    background: var(--brand-secondary, #1a1a2e);
    color: #fff;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.25);
}

.cc-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cc-banner__text {
    flex: 1 1 320px;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cc-banner__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ---- Buttons ------------------------------------------------------------ */

.cc-btn {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    font-family: inherit;
}

.cc-btn--primary {
    background: var(--brand-primary, #AE1478);
    color: #fff;
}

.cc-btn--primary:hover {
    filter: brightness(1.08);
}

.cc-btn--ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.cc-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.12);
}

.cc-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ---- Modal -------------------------------------------------------------- */

.cc-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cc-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.cc-modal__dialog {
    position: relative;
    background: #fff;
    color: #1a1a2e;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cc-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.cc-modal__title {
    margin: 0;
    font-size: 1.25rem;
    color: var(--brand-secondary, #1a1a2e);
}

.cc-modal__close {
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    color: #888;
    padding: 0 4px;
}

.cc-modal__close:hover { color: #1a1a2e; }

.cc-modal__body { padding: 20px 24px; }

.cc-modal__intro {
    margin: 0 0 20px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #444;
}

.cc-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 18px 24px;
    border-top: 1px solid #eee;
    background: #fafafa;
    border-radius: 0 0 10px 10px;
}

.cc-modal__footer .cc-btn--ghost {
    color: var(--brand-secondary, #1a1a2e);
    border-color: #ccc;
}

.cc-modal__footer .cc-btn--ghost:hover {
    background: #f0f0f0;
}

/* ---- Cookie groups ------------------------------------------------------ */

.cc-group {
    padding: 16px 0;
    border-top: 1px solid #eee;
}

.cc-group:first-of-type { border-top: none; }

.cc-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.cc-group__name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--brand-secondary, #1a1a2e);
}

.cc-group__badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #2e7d32;
    background: #e6f4ea;
    padding: 3px 10px;
    border-radius: 999px;
}

.cc-group__desc {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #555;
}

/* ---- Toggle switch ------------------------------------------------------ */

.cc-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.cc-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cc-switch__slider {
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 999px;
    position: relative;
    transition: background-color 0.15s ease;
    flex: 0 0 auto;
}

.cc-switch__slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.15s ease;
}

.cc-switch input:checked + .cc-switch__slider {
    background: var(--brand-primary, #AE1478);
}

.cc-switch input:checked + .cc-switch__slider::before {
    transform: translateX(20px);
}

.cc-switch input:focus-visible + .cc-switch__slider {
    outline: 2px solid var(--brand-primary, #AE1478);
    outline-offset: 2px;
}

/* Visually-hidden text label for screen readers */
.cc-switch__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---- Small screens ------------------------------------------------------ */

@media (max-width: 640px) {
    .cc-banner__actions { width: 100%; }
    .cc-banner__actions .cc-btn { flex: 1 1 auto; }
    .cc-modal__footer { justify-content: stretch; }
    .cc-modal__footer .cc-btn { flex: 1 1 auto; }
}
