/* SettleScan cookie consent UI (banner + modal). First-party, injected by consent.js. */

:root {
  --ss-cc-ink: var(--ink, #2f2b27);
  --ss-cc-panel: var(--panel, #ffffff);
  --ss-cc-border: var(--muted, #e9e5df);
  --ss-cc-dark: var(--brand-dark, #1f1f1f);
  --ss-cc-cta: var(--cta, #5a3411);
}

.ss-cc-noscroll { overflow: hidden; }

/* ------------------------------ banner ------------------------------------ */
/* Compact floating card (Tesla-style sizing), bottom-center, SettleScan theme. */
.ss-cc-banner {
  position: fixed;
  left: 50%;
  bottom: clamp(12px, 2.4vw, 24px);
  width: min(720px, calc(100% - 32px));
  z-index: 2147483000;
  background: var(--ss-cc-panel);
  color: var(--ss-cc-ink);
  border: 1px solid var(--ss-cc-border);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  font-family: var(--font-sans, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  font-size: 14px;
  line-height: 1.55;
  transform: translate(-50%, calc(100% + 28px));
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  padding: 18px 20px;
}
.ss-cc-banner.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.ss-cc-banner__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.ss-cc-banner__body {
  flex: 1 1 320px;
  min-width: 220px;
}

.ss-cc-banner__title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  color: var(--ss-cc-ink);
}

.ss-cc-banner__text {
  color: var(--ss-cc-ink);
  opacity: 0.82;
}
.ss-cc-banner__text a {
  color: var(--ss-cc-cta);
  font-weight: 700;
  text-decoration: underline;
}

.ss-cc-banner__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ------------------------------ buttons ----------------------------------- */
.ss-cc-btn {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid var(--ss-cc-border);
  background: #fff;
  color: var(--ss-cc-ink);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.ss-cc-btn:hover { background: rgba(0, 0, 0, 0.04); }
.ss-cc-btn:active { background: rgba(0, 0, 0, 0.08); }
.ss-cc-btn:focus-visible { outline: 2px solid var(--ss-cc-cta); outline-offset: 2px; }

.ss-cc-btn--primary {
  background: var(--ss-cc-dark);
  border-color: var(--ss-cc-dark);
  color: #fff;
}
.ss-cc-btn--primary:hover { background: #000; border-color: #000; }

.ss-cc-btn--secondary {
  background: #fff;
  border-color: var(--ss-cc-dark);
  color: var(--ss-cc-ink);
}

.ss-cc-btn--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ss-cc-ink);
  text-decoration: underline;
  padding-left: 10px;
  padding-right: 10px;
}
.ss-cc-btn--ghost:hover { background: rgba(0, 0, 0, 0.04); }

/* ------------------------------ modal ------------------------------------- */
.ss-cc-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  font-family: var(--font-sans, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
}
.ss-cc-modal.is-visible { opacity: 1; visibility: visible; }

.ss-cc-modal__card {
  width: 100%;
  max-width: 560px;
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  background: var(--ss-cc-panel);
  color: var(--ss-cc-ink);
  border: 1px solid var(--ss-cc-border);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  transform: translateY(8px) scale(0.99);
  transition: transform 0.2s ease;
}
.ss-cc-modal.is-visible .ss-cc-modal__card { transform: translateY(0) scale(1); }

.ss-cc-modal__head {
  position: relative;
  padding: 20px 22px 12px;
  border-bottom: 1px solid var(--ss-cc-border);
}
.ss-cc-modal__title { margin: 0; font-size: 20px; font-weight: 800; }
.ss-cc-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--ss-cc-ink);
  cursor: pointer;
  border-radius: 8px;
}
.ss-cc-modal__close:hover { background: rgba(0, 0, 0, 0.06); }

.ss-cc-modal__body {
  padding: 16px 22px;
  overflow-y: auto;
}
.ss-cc-modal__intro { margin: 0 0 14px; font-size: 14px; line-height: 1.55; }
.ss-cc-modal__intro a { color: var(--ss-cc-cta); font-weight: 700; text-decoration: underline; }

.ss-cc-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--ss-cc-border);
}
.ss-cc-row:first-of-type { border-top: none; }
.ss-cc-row__main { flex: 1 1 auto; }
.ss-cc-row__title { font-weight: 700; font-size: 15px; margin-bottom: 3px; }
.ss-cc-row__desc { font-size: 13px; line-height: 1.5; color: var(--ss-cc-ink); opacity: 0.75; }

.ss-cc-modal__foot {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--ss-cc-border);
}

/* ------------------------------ switch ------------------------------------ */
.ss-cc-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex: 0 0 auto;
  margin-top: 1px;
}
.ss-cc-switch input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.ss-cc-switch__slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cfc9c0;
  transition: background 0.18s ease;
}
.ss-cc-switch__slider::before {
  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, 0.25);
  transition: transform 0.18s ease;
}
.ss-cc-switch input:checked + .ss-cc-switch__slider { background: var(--ss-cc-dark); }
.ss-cc-switch input:checked + .ss-cc-switch__slider::before { transform: translateX(20px); }
.ss-cc-switch input:focus-visible + .ss-cc-switch__slider { outline: 2px solid var(--ss-cc-cta); outline-offset: 2px; }
.ss-cc-switch.is-locked { opacity: 0.6; }
.ss-cc-switch.is-locked input { cursor: not-allowed; }

/* ------------------------------ responsive -------------------------------- */
@media (max-width: 640px) {
  .ss-cc-banner {
    width: calc(100% - 20px);
    bottom: 10px;
    padding: 16px;
    border-radius: 14px;
  }
  .ss-cc-banner__inner { align-items: stretch; }
  .ss-cc-banner__actions { width: 100%; }
  .ss-cc-banner__actions .ss-cc-btn { flex: 1 1 auto; text-align: center; }
  .ss-cc-modal__foot .ss-cc-btn { flex: 1 1 auto; text-align: center; }
}
