/* ============================================================
   Cookie Consent AQ — Frontend Styles
   Font: Roboto (loaded via Google Fonts)
   ============================================================ */

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

:root {
    --ccaq-primary: #0B5699;
    --ccaq-bg:      #121212;
    --ccaq-txt:     #d0d0d0;
    --ccaq-border:  #2a2a2a;
    --ccaq-card:    #1e1e1e;
    --ccaq-radius:  12px;
    --ccaq-z-fab:   9999999;
    --ccaq-z-over:  9999998;
    --ccaq-z-modal: 9999999;
    --ccaq-z-bann:  9999999;
    --ccaq-font:    'Roboto', sans-serif;
    --ccaq-trans:   0.25s ease;
}

/* ──────────────────────────────────────────────────────────
   DEFENSIVE RESET
   Guards against page-builder ancestors (Elementor sections
   with motion effects, sticky containers, etc.) that set
   filter/perspective/contain on a parent element — any of
   which can silently turn position:fixed into position:relative
   for descendants. JS also re-parents these nodes to <body>,
   this is a CSS-only belt-and-braces fallback. (transform is
   intentionally left alone — we use it for our own animations.)
────────────────────────────────────────────────────────── */
#ccaq-fab,
.ccaq-overlay,
.ccaq-banner,
.ccaq-modal {
    filter: none !important;
    perspective: none !important;
    contain: none !important;
}

/* ──────────────────────────────────────────────────────────
   OVERLAY
────────────────────────────────────────────────────────── */
.ccaq-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: var(--ccaq-z-over);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.ccaq-overlay.ccaq-visible { display: block; }

/* ──────────────────────────────────────────────────────────
   FAB BUTTON — exact markup/style requested by client
────────────────────────────────────────────────────────── */
#ccaq-fab {
  position: fixed !important;
  bottom: 24px !important;
  left: 24px !important;
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  background: #0B5699 !important;
  border: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  transition: transform 0.2s ease !important;
  z-index: var(--ccaq-z-fab) !important;
  padding: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
}
#ccaq-fab:hover {
  transform: scale(1.1) !important;
  box-shadow: none !important;
}
#ccaq-fab img {
  width: 28px !important;
  height: 28px !important;
  object-fit: contain !important;
  display: block !important;
  filter: none !important;
  max-width: none !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

/* Right position variant */
#ccaq-fab.ccaq-fab--bottom-right {
  left: auto !important;
  right: 24px !important;
}

@media (max-width: 768px) {
  #ccaq-fab {
    width: 42px !important;
    height: 42px !important;
    bottom: 24px !important;
  }
  #ccaq-fab img {
    width: 22px !important;
    height: 22px !important;
  }
}

/* ──────────────────────────────────────────────────────────
   INITIAL BANNER (bottom bar – first visit)
────────────────────────────────────────────────────────── */
.ccaq-banner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: var(--ccaq-z-bann) !important;
    background: var(--ccaq-bg);
    color: var(--ccaq-txt);
    font-family: var(--ccaq-font);
    padding: 20px 24px;
    border-top: 1px solid var(--ccaq-border);
    box-shadow: 0 -4px 24px rgba(0,0,0,.45);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(.4,0,.2,1);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.ccaq-banner[aria-hidden="false"] { transform: translateY(0); }

.ccaq-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.ccaq-banner__icon img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ccaq-primary);
    padding: 8px;
    flex-shrink: 0;
}
.ccaq-banner__content { flex: 1; min-width: 200px; }
.ccaq-banner__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #fff;
    font-family: var(--ccaq-font);
}
.ccaq-banner__text {
    font-size: 13px;
    line-height: 1.55;
    margin: 0;
    color: var(--ccaq-txt);
    font-family: var(--ccaq-font);
}
.ccaq-banner__text a {
    color: var(--ccaq-primary) !important;
    text-decoration: underline;
}
.ccaq-banner__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* ──────────────────────────────────────────────────────────
   BUTTONS — force blue color, override Elementor theme styles
────────────────────────────────────────────────────────── */
.ccaq-btn,
.ccaq-modal .ccaq-btn,
.ccaq-banner .ccaq-btn {
    font-family: var(--ccaq-font) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    padding: 10px 18px !important;
    cursor: pointer !important;
    transition: opacity var(--ccaq-trans), transform var(--ccaq-trans) !important;
    border: 2px solid var(--ccaq-primary) !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    box-shadow: none !important;
    text-decoration: none !important;
}
.ccaq-btn:hover { opacity: .88; transform: translateY(-1px); }
.ccaq-btn:active { transform: translateY(0); }

.ccaq-btn--primary,
.ccaq-modal .ccaq-btn--primary,
.ccaq-banner .ccaq-btn--primary {
    background: var(--ccaq-primary) !important;
    color: #fff !important;
}
.ccaq-btn--outline,
.ccaq-modal .ccaq-btn--outline,
.ccaq-banner .ccaq-btn--outline {
    background: transparent !important;
    color: var(--ccaq-txt) !important;
}
.ccaq-btn--outline:hover {
    color: #fff !important;
}

/* ──────────────────────────────────────────────────────────
   MODAL (preference center)
────────────────────────────────────────────────────────── */
.ccaq-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: var(--ccaq-z-modal) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--ccaq-trans);
    height: 100vh;
    height: 100dvh;
}
.ccaq-modal[aria-hidden="false"] {
    pointer-events: auto;
    opacity: 1;
}
.ccaq-modal__dialog {
    background: var(--ccaq-bg);
    color: var(--ccaq-txt);
    font-family: var(--ccaq-font);
    border-radius: var(--ccaq-radius);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    max-height: 90dvh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.7);
    border: 1px solid #2a2a2a;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Header */
.ccaq-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--ccaq-border);
    flex-shrink: 0;
}
.ccaq-modal__title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    color: #fff;
    line-height: 1.3;
    padding-right: 12px;
    font-family: var(--ccaq-font);
}
.ccaq-modal__close {
    background: none !important;
    border: none !important;
    color: var(--ccaq-txt) !important;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color var(--ccaq-trans);
    box-shadow: none !important;
}
.ccaq-modal__close:hover { color: #fff !important; }

/* Body */
.ccaq-modal__body {
    overflow-y: auto;
    padding: 20px 24px;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}
.ccaq-modal__body::-webkit-scrollbar { width: 6px; }
.ccaq-modal__body::-webkit-scrollbar-thumb { background:#444; border-radius:3px; }

.ccaq-modal__intro {
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 16px;
    color: var(--ccaq-txt);
    font-family: var(--ccaq-font);
}
.ccaq-modal__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid var(--ccaq-border);
}
.ccaq-modal__legal a {
    font-size: 12px;
    color: var(--ccaq-primary) !important;
    text-decoration: underline;
}

/* Footer */
.ccaq-modal__footer {
    padding: 16px 24px;
    border-top: 1px solid var(--ccaq-border);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* ──────────────────────────────────────────────────────────
   ACCORDION
────────────────────────────────────────────────────────── */
.ccaq-accordion {
    border: 1px solid var(--ccaq-border);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}
.ccaq-accordion__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    gap: 12px;
}
.ccaq-accordion__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none !important;
    border: none !important;
    color: var(--ccaq-txt) !important;
    font-family: var(--ccaq-font) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer;
    padding: 0 !important;
    text-align: left;
    flex: 1;
    box-shadow: none !important;
}
.ccaq-accordion__toggle:hover { color: #fff !important; }
.ccaq-accordion__chevron {
    flex-shrink: 0;
    transition: transform 0.2s ease;
    color: var(--ccaq-txt);
}
.ccaq-accordion[aria-expanded] .ccaq-accordion__chevron,
.ccaq-accordion--open .ccaq-accordion__chevron {
    transform: rotate(90deg);
}
.ccaq-accordion__label { flex: 1; }

.ccaq-accordion__desc {
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--ccaq-txt);
    padding: 0 16px 12px;
    margin-top: -4px;
    font-family: var(--ccaq-font);
}

.ccaq-accordion__body {
    border-top: 1px solid var(--ccaq-border);
    padding: 12px 16px;
    background: #1a1a1a;
}
.ccaq-accordion__body[hidden] { display: none; }

/* Always active badge */
.ccaq-always-active {
    font-size: 12px;
    font-weight: 600;
    color: #4caf50;
    flex-shrink: 0;
    white-space: nowrap;
    font-family: var(--ccaq-font);
}

/* ──────────────────────────────────────────────────────────
   TOGGLE SWITCH — force blue color
────────────────────────────────────────────────────────── */
.ccaq-switch {
    position: relative;
    display: inline-flex;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}
.ccaq-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.ccaq-switch__slider {
    position: absolute;
    inset: 0;
    background: #444 !important;
    border-radius: 24px;
    transition: background var(--ccaq-trans);
}
.ccaq-switch__slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff !important;
    border-radius: 50%;
    transition: transform var(--ccaq-trans);
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.ccaq-switch input:checked + .ccaq-switch__slider {
    background: var(--ccaq-primary) !important;
}
.ccaq-switch input:checked + .ccaq-switch__slider::before {
    transform: translateX(20px);
}
.ccaq-switch input:focus-visible + .ccaq-switch__slider {
    outline: 2px solid var(--ccaq-primary);
    outline-offset: 2px;
}

/* ──────────────────────────────────────────────────────────
   COOKIE TABLE
────────────────────────────────────────────────────────── */
.ccaq-cookie-table { display: flex; flex-direction: column; gap: 12px; }
.ccaq-cookie-row {
    background: var(--ccaq-card);
    border: 1px solid var(--ccaq-border);
    border-radius: 6px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.ccaq-cookie-row__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ccaq-cookie-row__item--desc { grid-column: 1 / -1; }
.ccaq-cookie-row__label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #888;
    font-weight: 600;
}
.ccaq-cookie-row__value { font-size: 12.5px; color: var(--ccaq-txt); }
.ccaq-cookie-row__value code {
    background: rgba(255,255,255,.06);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
}
.ccaq-no-cookies { font-size: 13px; color: #666; margin: 0; }

/* ──────────────────────────────────────────────────────────
   RESPONSIVE
────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ccaq-banner {
        padding: 14px 16px !important;
        max-height: 60vh !important;
        max-height: 60dvh !important;
    }
    .ccaq-banner__inner { gap: 10px; }
    .ccaq-banner__icon { display: none; }
    .ccaq-banner__title { font-size: 14px !important; margin-bottom: 4px !important; }
    .ccaq-banner__text { font-size: 12.5px !important; line-height: 1.45 !important; }
    .ccaq-banner__actions { width: 100%; margin-top: 4px; }
    .ccaq-btn { font-size: 13px !important; padding: 9px 14px !important; flex: 1; text-align: center; }

    .ccaq-modal {
        align-items: center !important;
        justify-content: center !important;
        padding: 20px 14px !important;
    }
    .ccaq-modal__dialog {
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        max-width: 480px !important;
        max-height: 80vh !important;
        max-height: 80dvh !important;
        height: auto !important;
        border-radius: 14px !important;
        margin: 0 auto !important;
    }
    .ccaq-modal__header { padding: 14px 16px; flex-shrink: 0; }
    .ccaq-modal__title { font-size: 15px; }
    .ccaq-modal__body {
        padding: 16px;
        -webkit-overflow-scrolling: touch;
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto !important;
    }
    .ccaq-modal__footer {
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
        justify-content: stretch;
        flex-wrap: wrap;
        flex-shrink: 0;
    }
    .ccaq-modal__footer .ccaq-btn { flex: 1 1 100%; text-align: center; font-size: 13px !important; padding: 10px 8px !important; }

    .ccaq-cookie-row { grid-template-columns: 1fr; }
    .ccaq-cookie-row__item--desc { grid-column: 1; }
}

/* Extra-small phones: slightly tighter padding */
@media (max-width: 380px) {
    .ccaq-modal { padding: 14px 10px !important; }
    .ccaq-modal__dialog { max-height: 78vh !important; max-height: 78dvh !important; }
    .ccaq-modal__title { font-size: 14px; }
}

/* Landscape phones: vertical space is scarce, shrink the dialog further */
@media (max-width: 900px) and (max-height: 450px) and (orientation: landscape) {
    .ccaq-modal { padding: 10px !important; }
    .ccaq-modal__dialog { max-height: 90vh !important; max-height: 90dvh !important; }
}
