/* Cookie-consent modal (first-party CMP) — Vape and Go.
   Loaded from template/consent_init.php on every page that can run GTM.

   Aug 2026 redesign: centred dialog with an intro view and a settings view
   (category cards + per-cookie tables), styled to the site's own language —
   white cards, teal #035c56 headings, green #3ab77d accents, 10px radii.

   z-index notes: the overlay sits BELOW bootstrap modals/backdrops
   (1040/1050) so the 18+ age-verification modal keeps priority; the consent
   dialog is revealed when the age gate closes. */

.fv-cc-overlay {
    position: fixed;
    inset: 0;
    z-index: 1039;
    background: rgba(8, 24, 22, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fv-cc-fade .18s ease-out;
}

@keyframes fv-cc-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fv-cc-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 88vh;
    overflow: auto;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .30);
    font-family: inherit;
    animation: fv-cc-rise .22s ease-out;
    position: relative;
}

@keyframes fv-cc-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

.fv-cc-brandbar {
    height: 5px;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(90deg, #035c56, #3ab77d);
}

.fv-cc-body {
    padding: 22px 24px 20px;
}

.fv-cc-modal h3 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 700;
    color: #035c56;
}

.fv-cc-text {
    margin: 0 0 16px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #444;
}

.fv-cc-modal a {
    color: #035c56;
    text-decoration: underline;
}

/* ── Action buttons ──────────────────────────────────────────────────────
   "Accept all" and "Reject non-essential" keep EQUAL prominence (ICO
   guidance) — same size and weight, different colour only. */
.fv-cc-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.fv-cc-actions-spacer {
    flex: 1;
}

.fv-cc-btn {
    border: 0;
    border-radius: 8px;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
}

.fv-cc-accept-btn {
    background: #3ab77d;
    color: #fff;
}

.fv-cc-reject-btn {
    background: #eef1f0;
    color: #1f2726;
}

.fv-cc-save-btn {
    background: #035c56;
    color: #fff;
}

.fv-cc-btn:hover {
    filter: brightness(.94);
}

.fv-cc-linkbtn {
    background: none;
    border: 0;
    color: #035c56;
    text-decoration: underline;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 2px;
}

.fv-cc-back {
    position: absolute;
    top: 14px;
    left: 18px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.fv-cc-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: 0;
    font-size: 26px;
    line-height: 1;
    color: #6b7573;
    cursor: pointer;
    padding: 4px 8px;
}

.fv-cc-close:hover {
    color: #1f2726;
}

.fv-cc-back + h3,
.fv-cc-close + h3 {
    margin-top: 14px;
}

/* ── Category cards (settings view) ─────────────────────────────────── */
.fv-cc-cats {
    margin-bottom: 16px;
}

.fv-cc-cat {
    border: 1px solid #e2e8e6;
    border-radius: 10px;
    padding: 13px 14px 10px;
    margin-bottom: 10px;
    background: #fbfdfc;
}

.fv-cc-cat-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.fv-cc-cat-titles h4 {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: #1f2726;
}

.fv-cc-cat-titles p {
    margin: 0;
    font-size: 12.5px;
    color: #555;
    line-height: 1.45;
}

.fv-cc-always {
    font-size: 12px;
    font-weight: 700;
    color: #3ab77d;
    white-space: nowrap;
    padding-top: 3px;
}

/* "Show cookies" expander + per-cookie table */
.fv-cc-showcookies {
    background: none;
    border: 0;
    padding: 6px 0 2px;
    font-size: 12px;
    font-weight: 600;
    color: #035c56;
    cursor: pointer;
    text-decoration: underline;
}

.fv-cc-showcookies::after {
    content: " \25BE";
}

.fv-cc-showcookies.fv-cc-open::after {
    content: " \25B4";
}

.fv-cc-cookielist {
    overflow-x: auto;
    margin-top: 6px;
}

.fv-cc-cookielist table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.fv-cc-cookielist th {
    text-align: left;
    color: #6b7573;
    font-weight: 600;
    padding: 4px 8px 4px 0;
    border-bottom: 1px solid #e2e8e6;
    white-space: nowrap;
}

.fv-cc-cookielist td {
    padding: 5px 8px 5px 0;
    color: #333;
    border-bottom: 1px solid #eef2f1;
    vertical-align: top;
}

.fv-cc-cookielist td:first-child {
    font-family: monospace;
    white-space: nowrap;
}

/* ── Toggle switch ──────────────────────────────────────────────────── */
.fv-cc-switch {
    position: relative;
    flex: none;
    width: 44px;
    height: 24px;
    margin-top: 2px;
}

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

.fv-cc-switch span {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: #ccd4d2;
    transition: background .15s;
    pointer-events: none;
}

.fv-cc-switch span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform .15s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

.fv-cc-switch input:checked+span {
    background: #3ab77d;
}

.fv-cc-switch input:checked+span::after {
    transform: translateX(20px);
}

/* ── Age-gate embedded mode ─────────────────────────────────────────
   The consent question rides inside the age-verification modal
   (#fv-cc-agegate row in footer.php, revealed by cookie-consent.js).
   One dialog, one click: checkbox state + "I Am Over 18". */
.fv-cc-agegate {
    margin: 16px auto 4px;
    max-width: 360px;
    text-align: left;
    background: #f4f8f7;
    border: 1px solid #dfe9e7;
    border-radius: 10px;
    padding: 11px 13px;
}

.fv-cc-agegate-check {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    cursor: pointer;
    font-size: 12.5px;
    color: #3d4a48;
    line-height: 1.45;
    margin: 0;
    font-weight: 400;
}

.fv-cc-agegate-check input {
    width: 16px;
    height: 16px;
    flex: none;
    margin: 1px 0 0;
    cursor: pointer;
    accent-color: #3ab77d;
}

.fv-cc-agegate-check em {
    font-style: normal;
    color: #8a9995;
}

.fv-cc-agegate-links {
    margin: 7px 0 0 25px;
    display: flex;
    gap: 16px;
}

.fv-cc-agegate-links a {
    font-size: 12px;
    color: #035c56;
    text-decoration: underline;
}

.fv-cc-agegate-done {
    margin: 0;
    font-size: 12.5px;
    font-weight: 700;
    color: #3ab77d;
    line-height: 1.4;
}

/* Settings overlay opened from inside the age modal must sit ABOVE it.
   #age_verification_modal carries z-index 9999999999 (common.css), which
   browsers clamp to the int32 maximum 2147483647 — so match that maximum:
   with equal z-index the LATER element in the DOM paints on top, and this
   overlay is appended to <body> after the modal, so it wins. */
.fv-cc-overlay.fv-cc-ontop {
    z-index: 2147483647;
}

/* ── Mobile ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .fv-cc-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .fv-cc-body {
        padding: 18px 16px 16px;
    }

    .fv-cc-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .fv-cc-actions-spacer {
        display: none;
    }

    .fv-cc-btn {
        width: 100%;
    }

    .fv-cc-linkbtn.fv-cc-goto-prefs {
        order: 5;
        text-align: center;
    }
}
