/*
 * ACRATS cookie consent. Scoped (.acc-*) plain CSS so it looks the same on the
 * Tailwind and the Bootstrap layouts and needs no Vite build.
 * Brand: navy #0D1F3C, charcoal #1D1D1B, lime #C2CC41 (primary).
 */

.acc-root, .acc-root *, .acc-dialog, .acc-dialog *, .acc-embed, .acc-embed * { box-sizing: border-box; }

/* ---- banner: phone = bottom sheet, >=640px = bottom-left card -------- */
.acc-banner {
    position: fixed; z-index: 2147483000; left: 0; right: 0; bottom: 0;
    max-height: 80vh; overflow-y: auto;
    background: #0D1F3C; color: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .25);
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    font-family: inherit; font-size: 14px; line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
.acc-banner[hidden] { display: none; }
@media (min-width: 640px) {
    .acc-banner {
        left: 24px; right: auto; bottom: 24px; width: 420px; max-width: calc(100vw - 48px);
        border-radius: 12px; padding: 24px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
    }
}
.acc-banner__title { margin: 0 0 6px; font-size: 16px; font-weight: 600; line-height: 1.35; color: #fff; }
.acc-banner__body { margin: 0 0 4px; color: #E5E9F0; }
.acc-banner__links { margin: 0 0 16px; }

.acc-link { color: #C2CC41; text-decoration: underline; text-underline-offset: 2px; }
.acc-link:hover { color: #dfe68a; }
.acc-dialog .acc-link { color: #0D1F3C; }
.acc-dialog .acc-link:hover { color: #1d3a6b; }

.acc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acc-actions .acc-btn--wide { grid-column: 1 / -1; }

/* Accept all and Reject all share ONE style: equal weight by design. */
.acc-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 10px 16px; margin: 0;
    border-radius: 8px; border: 2px solid transparent;
    font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2;
    cursor: pointer; text-align: center; text-decoration: none;
    transition: background-color .15s, color .15s, border-color .15s;
}
.acc-btn:focus-visible, .acc-link:focus-visible, .acc-switch input:focus-visible + .acc-switch__track,
.acc-dialog__close:focus-visible, .acc-details summary:focus-visible, .acc-footer-link:focus-visible {
    outline: 3px solid #E87722; outline-offset: 2px;
}
.acc-btn--choice { background: #C2CC41; color: #0D1F3C; border-color: #C2CC41; }
.acc-btn--choice:hover { background: #d3dc5a; border-color: #d3dc5a; }
.acc-btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.acc-btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

/* ---- settings dialog ---------------------------------------------- */
.acc-dialog {
    color-scheme: light;
    width: 100%; max-width: 640px; max-height: 90vh;
    margin: auto auto 0; padding: 0; border: 0;
    border-radius: 16px 16px 0 0;
    background: #fff; color: #1D1D1B;
    font-family: inherit; font-size: 14px; line-height: 1.55;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    overflow: hidden;
}
.acc-dialog[open] { display: flex; flex-direction: column; }
.acc-dialog::backdrop { background: rgba(13, 31, 60, .6); }
@media (min-width: 640px) {
    .acc-dialog { margin: auto; border-radius: 12px; max-height: 85vh; }
}
/* Fallback for browsers without <dialog>: plain fixed panel */
.acc-dialog[open]:not(:modal) { position: fixed; inset: auto 0 0 0; z-index: 2147483001; }

.acc-dialog__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 18px 20px; background: #0D1F3C; color: #fff;
}
.acc-dialog__title { margin: 0; font-size: 18px; font-weight: 600; color: #fff; outline: none; }
.acc-dialog__close {
    flex: none; width: 44px; height: 44px; margin: -2px -8px -2px 0; border-radius: 8px; border: 0;
    background: transparent; color: #fff; cursor: pointer; font-size: 24px; line-height: 1;
}
.acc-dialog__close:hover { background: rgba(255, 255, 255, .12); }
.acc-dialog__body { padding: 20px; overflow-y: auto; flex: 1 1 auto; }
.acc-dialog__intro { margin: 0 0 6px; color: #374151; }
.acc-dialog__links { margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 4px 16px; }

.acc-cat { border: 1px solid #E5E7EB; border-radius: 10px; padding: 14px 16px; margin: 0 0 12px; }
.acc-cat__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.acc-cat__name { margin: 0; font-size: 15px; font-weight: 600; color: #0D1F3C; }
.acc-cat__desc { margin: 6px 0 0; color: #4B5563; }
.acc-always { flex: none; font-size: 12px; font-weight: 600; color: #3f4a0b; background: #EEF2C6; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }

/* 44x44 hit area around a 44x26 track; the invisible input sits on top and takes the tap. */
.acc-switch { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: -9px 0; cursor: pointer; }
.acc-switch input { position: absolute; inset: 0; z-index: 1; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
/* Off track #6B7280: 4.8:1 on white (WCAG 1.4.11 needs 3:1; #9CA3AF was 2.5:1). */
.acc-switch__track { width: 44px; height: 26px; border-radius: 999px; background: #6B7280; position: relative; transition: background-color .15s; }
.acc-switch__track::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s;
}
.acc-switch input:checked + .acc-switch__track { background: #0D1F3C; }
.acc-switch input:checked + .acc-switch__track::after { transform: translateX(18px); }
.acc-switch__state { font-size: 12px; font-weight: 600; color: #4B5563; min-width: 22px; }

.acc-details { margin-top: 0; }
.acc-details summary { cursor: pointer; color: #0D1F3C; font-weight: 600; font-size: 13px; padding: 12px 0; margin-bottom: -8px; }
.acc-service { margin: 10px 0 0; padding: 10px 12px; background: #F9FAFB; border-radius: 8px; font-size: 13px; }
.acc-service dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; }
.acc-service dt { font-weight: 600; color: #374151; }
.acc-service dd { margin: 0; color: #4B5563; overflow-wrap: anywhere; }
@media (max-width: 420px) { .acc-service dl { grid-template-columns: 1fr; } .acc-service dd { margin-bottom: 6px; } }

.acc-dialog__foot {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #E5E7EB; background: #fff;
}
.acc-dialog__foot .acc-btn--save { grid-column: 1 / -1; }
@media (min-width: 640px) {
    .acc-dialog__foot { grid-template-columns: 1fr 1fr 1fr; }
    .acc-dialog__foot .acc-btn--save { grid-column: auto; }
}
.acc-btn--outline { background: #fff; color: #0D1F3C; border-color: #0D1F3C; }
.acc-btn--outline:hover { background: #F3F4F6; }
.acc-btn--save { background: #0D1F3C; color: #fff; border-color: #0D1F3C; }
.acc-btn--save:hover { background: #1d3a6b; border-color: #1d3a6b; }

.acc-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Keep floating buttons (WhatsApp) above the phone bottom sheet. */
@media (max-width: 639px) {
    .acc-banner-open [data-consent-lift] { transform: translateY(calc(-1 * var(--acc-banner-h, 0px))); transition: transform .2s; }
    /* Let the end of the page (footer, its "Cookie settings" link) scroll out from under the sheet.
       Full-width sheet, so the added strip is always behind it. */
    .acc-banner-open body { padding-bottom: var(--acc-banner-h, 0px); }
}

/* ---- footer link ---------------------------------------------------- */
.acc-footer-link { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; white-space: nowrap; }

/* ---- click-to-load embed placeholder ------------------------------- */
.acc-embed { position: relative; width: 100%; overflow: hidden; background: #F3F4F6; }
.acc-embed > iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.acc-embed__ph {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; padding: 20px; text-align: center; color: #1D1D1B; font-size: 14px; line-height: 1.5;
    background: repeating-linear-gradient(135deg, #F3F4F6 0 12px, #EEF0F3 12px 24px);
}
.acc-embed__ph[hidden] { display: none; }
.acc-embed__title { margin: 0; font-size: 16px; font-weight: 600; color: #0D1F3C; }
.acc-embed__text { margin: 0; max-width: 420px; color: #4B5563; }
.acc-embed__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.acc-embed .acc-btn--embed { background: #0D1F3C; color: #fff; border-color: #0D1F3C; }
.acc-embed .acc-btn--embed:hover { background: #1d3a6b; }
.acc-embed .acc-btn--outline { min-height: 44px; }
.acc-embed .acc-link { color: #0D1F3C; font-size: 13px; display: inline-block; padding: 12px 8px; margin: -8px 0; } /* 44px tap height */

/* ---- /cookie-policy page ------------------------------------------ */
.acc-policy-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.acc-always--optional { color: #1F2937; background: #E5E7EB; }
/* Phone: four columns need ~410px in a ~300px card, so each service becomes a stacked block. */
@media (max-width: 639px) {
    .acc-policy-table, .acc-policy-table tbody, .acc-policy-table tr, .acc-policy-table td { display: block; width: 100%; }
    .acc-policy-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .acc-policy-table tr { padding: 10px 0; }
    .acc-policy-table td { padding: 2px 0 !important; }
    .acc-policy-table td[data-label]:not(:first-child)::before {
        content: attr(data-label); display: block; margin-top: 6px; font-size: 12px; font-weight: 600; color: #374151;
    }
}

@media (prefers-reduced-motion: reduce) {
    .acc-btn, .acc-switch__track, .acc-switch__track::after, .acc-banner-open [data-consent-lift] { transition: none; }
}
