/**
 * Cynexix Cookie Notice — banner + settings dialog styles (v2)
 *
 * CYNEXIX design language:
 *   Primary navy : #1C2D5A (site --default-color)
 *   Navy hover   : #24396F
 *   Surfaces     : #FFFFFF on #F9FAFE pages
 *   Pill radius  : 50px (site CTA convention)
 */

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

.ccn-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;

    background: #ffffff;
    border-top: 1px solid #e6eaf4;
    box-shadow: 0 -10px 30px rgba(13, 30, 61, 0.10);
    padding: 18px 32px;
}

.ccn-banner__text {
    margin: 0;
    flex: 1 1 420px;
    max-width: 760px;
    color: #1C2D5A;
    font-size: 14px;
    line-height: 1.6;
}

.ccn-banner__text a {
    color: #1C2D5A;
    font-weight: 600;
    text-decoration: underline;
}

.ccn-banner__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

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

.ccn-btn {
    display: inline-block;
    border-radius: 50px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.6px;
    line-height: 1;
    padding: 12px 24px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.25s, box-shadow 0.2s, color 0.25s;
    white-space: nowrap;
}

.ccn-btn--primary {
    background: #1C2D5A;
    color: #ffffff;
    border: 1px solid #1C2D5A;
}
.ccn-btn--primary:hover {
    background: #24396F;
    box-shadow: rgba(13, 30, 61, 0.18) 0 6px 16px;
    transform: translateY(-1px);
}

.ccn-btn--secondary {
    background: transparent;
    color: #1C2D5A;
    border: 1px solid #1C2D5A;
}
.ccn-btn--secondary:hover {
    background: rgba(28, 45, 90, 0.06);
    transform: translateY(-1px);
}

.ccn-btn--ghost {
    background: transparent;
    color: #1C2D5A;
    border: 1px solid transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.ccn-btn--ghost:hover {
    background: rgba(28, 45, 90, 0.06);
}

.ccn-btn:focus-visible,
.ccn-modal__close:focus-visible,
.ccn-switch input:focus-visible + .ccn-switch__track {
    outline: 2px solid #1C2D5A;
    outline-offset: 2px;
}

/* ---------------- Settings dialog ---------------- */

.ccn-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100001; /* above the banner and the site dropdowns */
    background: rgba(13, 22, 44, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

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

.ccn-modal {
    background: #ffffff;
    border: 1px solid #e6eaf4;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(13, 30, 61, 0.30);
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 26px 28px;
    box-sizing: border-box;
    color: #1C2D5A;
}

.ccn-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.ccn-modal__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1C2D5A;
}

.ccn-modal__close {
    background: none;
    border: 0;
    font-size: 26px;
    line-height: 1;
    color: #1C2D5A;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 8px;
}
.ccn-modal__close:hover {
    background: rgba(28, 45, 90, 0.06);
}

.ccn-modal__intro {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.6;
    color: #4a5674;
}
.ccn-modal__intro a {
    color: #1C2D5A;
    font-weight: 600;
}

.ccn-category {
    border-top: 1px solid #edf0f8;
    padding: 14px 0;
}

.ccn-category__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ccn-category__name {
    font-size: 14px;
    font-weight: 600;
}

.ccn-category__state {
    font-size: 12px;
    font-weight: 600;
    color: #2e7d32;
    letter-spacing: 0.3px;
}

.ccn-category__desc {
    margin: 6px 0 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: #4a5674;
}

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

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

.ccn-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.ccn-switch__track {
    width: 42px;
    height: 24px;
    border-radius: 24px;
    background: #cdd5e6;
    transition: background-color 0.2s;
    position: relative;
    flex: 0 0 auto;
}

.ccn-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(13, 30, 61, 0.3);
    transition: transform 0.2s;
}

.ccn-switch input:checked + .ccn-switch__track {
    background: #1C2D5A;
}

.ccn-switch input:checked + .ccn-switch__track::after {
    transform: translateX(18px);
}

.ccn-switch__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.ccn-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid #edf0f8;
    padding-top: 18px;
    margin-top: 4px;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 767px) {
    .ccn-banner {
        padding: 16px 20px;
        gap: 14px;
    }

    .ccn-banner__actions {
        width: 100%;
        justify-content: stretch;
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .ccn-banner__actions .ccn-btn {
        text-align: center;
    }

    .ccn-modal {
        padding: 20px;
    }

    .ccn-modal__actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .ccn-modal__actions .ccn-btn {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ccn-btn,
    .ccn-switch__track,
    .ccn-switch__track::after {
        transition: none;
    }
}
