/* ── Cookie Consent Banner ─────────────────────────────── */

.cc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  opacity: 0;
  transition: opacity var(--transition-slow);
  pointer-events: none;
}
.cc-overlay.cc-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Banner (bottom bar) ── */
.cc-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--c-bg-elevated);
  border-top: 1px solid var(--c-border);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
  padding: var(--space-lg) var(--space-xl);
  transform: translateY(100%);
  transition: transform var(--transition-slow);
}
.cc-banner.cc-visible {
  transform: translateY(0);
}

.cc-banner__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
}

.cc-banner__text {
  flex: 1;
}

.cc-banner__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: var(--space-xs);
}

.cc-banner__desc {
  font-size: 0.85rem;
  color: var(--c-text-secondary);
  line-height: 1.5;
}

.cc-banner__desc a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-banner__actions {
  display: flex;
  flex-shrink: 0;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
}

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: var(--font);
}

.cc-btn--accept {
  background: var(--c-primary);
  color: #fff;
}
.cc-btn--accept:hover {
  background: var(--c-primary-hover);
}

.cc-btn--reject {
  background: transparent;
  color: var(--c-text-secondary);
  border: 1px solid var(--c-border);
}
.cc-btn--reject:hover {
  background: var(--c-surface);
  color: var(--c-text);
  border-color: var(--c-border-hover);
}

.cc-btn--settings {
  background: transparent;
  color: var(--c-accent);
  border: none;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0.55rem 0.6rem;
}
.cc-btn--settings:hover {
  color: var(--c-accent-hover);
}

/* ── Settings Modal ── */
.cc-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 10000;
  width: 90%;
  max-width: 520px;
  max-height: 80vh;
  background: var(--c-bg-elevated);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}
.cc-modal.cc-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.cc-modal__header {
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cc-modal__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-text);
}

.cc-modal__close {
  background: none;
  border: none;
  color: var(--c-text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color var(--transition);
}
.cc-modal__close:hover {
  color: var(--c-text);
}

.cc-modal__body {
  padding: var(--space-lg) var(--space-xl);
}

.cc-modal__desc {
  font-size: 0.85rem;
  color: var(--c-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

/* ── Cookie Category ── */
.cc-category {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-md);
  transition: border-color var(--transition);
}
.cc-category:hover {
  border-color: var(--c-border-hover);
}

.cc-category__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xs);
}

.cc-category__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-text);
}

.cc-category__badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--c-success);
  background: var(--c-success-light);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.cc-category__desc {
  font-size: 0.8rem;
  color: var(--c-text-muted);
  line-height: 1.5;
}

/* ── Toggle Switch ── */
.cc-toggle {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.cc-toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition);
}
.cc-toggle__slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  background: var(--c-text-muted);
  border-radius: 50%;
  transition: all var(--transition);
}
.cc-toggle input:checked + .cc-toggle__slider {
  background: var(--c-primary-light);
  border-color: var(--c-primary);
}
.cc-toggle input:checked + .cc-toggle__slider::before {
  background: var(--c-primary);
  transform: translateX(18px);
}
.cc-toggle input:disabled + .cc-toggle__slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.cc-modal__footer {
  padding: var(--space-md) var(--space-xl) var(--space-lg);
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
}

/* ── Floating cookie button (after banner dismissed) ── */
.cc-float {
  position: fixed;
  bottom: var(--space-lg);
  left: var(--space-lg);
  z-index: 9990;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text-secondary);
  font-size: 1.3rem;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}
.cc-float:hover {
  background: var(--c-surface-hover);
  border-color: var(--c-border-hover);
  color: var(--c-text);
}
.cc-float.cc-visible {
  display: flex;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .cc-banner__inner {
    flex-direction: column;
    gap: var(--space-md);
  }
  .cc-banner__actions {
    width: 100%;
    justify-content: stretch;
  }
  .cc-banner__actions .cc-btn {
    flex: 1;
    text-align: center;
  }
  .cc-banner__actions .cc-btn--settings {
    flex: none;
    width: 100%;
    text-align: center;
  }
  .cc-modal {
    width: 95%;
    max-height: 85vh;
  }
  .cc-modal__header,
  .cc-modal__body,
  .cc-modal__footer {
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }
}

/* ════════════════════════════════════════════════════════════════════════
   COMPACT MOBILE BAR — 2026-09-07
   docs/funnel-dropoff-report-2026-09-06.md §10.2.

   Measured live at 393×852 on 2026-09-07: the banner was 231 px on / and
   251 px on /et/ and /lt/ — 27–30 % of the phone screen, sitting on top of
   the hero for the whole visit in 5 of 10 reviewed recordings, and taking
   14 % of all taps on /et/ and 35 % on /lt/.

   The <640px rule above stacked the three buttons full-width, which is most
   of that height. This replaces it below 768 px: title and description stay
   in the DOM and stay readable (same texts, same consent logic, same
   buttons, same ids), the description is clamped to two lines, and accept /
   reject share one row with settings as a text link. Target is ~110 px.
   Rollback = delete this block.
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .cc-banner {
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .cc-banner__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .cc-banner__title {
    font-size: 0.8125rem;
    margin-bottom: 2px;
  }
  .cc-banner__desc {
    font-size: 0.75rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  /* One row: accept + reject side by side, settings as a trailing text link. */
  .cc-banner__actions {
    width: 100%;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
  }
  .cc-banner__actions .cc-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.5rem 0.4rem;
    font-size: 0.8125rem;
    text-align: center;
  }
  .cc-banner__actions .cc-btn--settings {
    flex: 0 0 auto;
    width: auto;
    padding: 0.5rem 0.2rem;
    font-size: 0.75rem;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   EQUAL-WEIGHT REJECT — 2026-09-07
   "Reject all" carried a 1px #E3E5F2 hairline on a white bar: against the
   filled indigo "Accept all" it read as an empty pill, not a button. That
   asymmetry is the pattern CNIL fined Google and Facebook for and the one AKI
   objects to — refusing must be as easy as accepting, and "as easy" includes
   being as visible. Same size as accept, ink-coloured border and text, so
   the two choices weigh the same. Consent logic, ids and texts unchanged.
   Rollback = delete this block.
   ════════════════════════════════════════════════════════════════════════ */
.cc-btn--reject {
  color: var(--pt-ink, var(--c-text, #171A34));
  border: 1.5px solid var(--pt-ink, var(--c-text, #171A34));
  background: transparent;
}
.cc-btn--reject:hover,
.cc-btn--reject:focus-visible {
  background: var(--pt-ink, var(--c-text, #171A34));
  color: #fff;
  border-color: var(--pt-ink, var(--c-text, #171A34));
}
