/* =============================================================================
   SevenLakes — consent manager styles (self-contained, sl-consent-* namespace)
   ============================================================================= */

:root {
  --slc-lake: #0e7f96;
  --slc-lake-hover: #0a6477;
  --slc-ink: #0f172a;
  --slc-ink-soft: #334155;
  --slc-muted: #64748b;
  --slc-line: #e2e8f0;
  --slc-radius: 20px;
  --slc-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ----------------------------------------------------------------- banner */
.sl-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147480000;
  padding: 16px;
  pointer-events: none;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.sl-consent__bar {
  pointer-events: auto;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  padding: 20px 22px;
  border-radius: var(--slc-radius);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 24px 70px -12px rgba(2, 8, 23, 0.5);
}
.sl-consent__text {
  flex: 1 1 300px;
  min-width: 0;
}
.sl-consent__title {
  margin: 0 0 5px;
  font-size: 15px;
  font-weight: 700;
  color: var(--slc-ink);
}
.sl-consent__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--slc-ink-soft);
}
.sl-consent__desc a {
  color: var(--slc-lake-hover);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sl-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ----------------------------------------------------------------- buttons */
.sl-consent__btn {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s var(--slc-ease), background 0.2s ease,
    color 0.2s ease, border-color 0.2s ease;
}
.sl-consent__btn--primary {
  color: #fff;
  background: var(--slc-lake);
  box-shadow: 0 10px 24px -10px rgba(14, 127, 150, 0.7);
}
.sl-consent__btn--primary:hover {
  transform: translateY(-1px);
}
.sl-consent__btn--ghost {
  color: var(--slc-ink-soft);
  background: #fff;
  border-color: var(--slc-line);
}
.sl-consent__btn--ghost:hover {
  background: #f8fafc;
}
.sl-consent__btn--link {
  padding: 0;
  background: none;
  border: none;
  color: var(--slc-muted);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sl-consent__btn:focus-visible {
  outline: 2px solid var(--slc-lake);
  outline-offset: 2px;
}

/* ----------------------------------------------------------------- prefs modal */
.sl-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 2147480500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.sl-consent-modal.is-open {
  display: flex;
}
.sl-consent-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 15, 30, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.sl-consent-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--slc-radius);
  padding: 22px 22px 18px;
  box-shadow: 0 24px 70px -12px rgba(2, 8, 23, 0.5);
}
.sl-consent-modal__title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--slc-ink);
}
.sl-consent-modal__intro {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--slc-muted);
}
.sl-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--slc-line);
}
.sl-consent-row__text {
  flex: 1 1 auto;
  min-width: 0;
}
.sl-consent-row__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--slc-ink);
}
.sl-consent-row__desc {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--slc-muted);
}
.sl-consent-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.sl-consent-modal__actions .sl-consent__btn {
  flex: 1 1 auto;
}

/* ----------------------------------------------------------------- switch */
.sl-consent-switch {
  position: relative;
  display: inline-flex;
  flex: none;
  cursor: pointer;
}
.sl-consent-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.sl-consent-switch__track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.2s ease;
}
.sl-consent-switch__thumb {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}
.sl-consent-switch input:checked + .sl-consent-switch__track {
  background: var(--slc-lake);
}
.sl-consent-switch input:checked + .sl-consent-switch__track .sl-consent-switch__thumb {
  transform: translateX(18px);
}
.sl-consent-switch input:disabled + .sl-consent-switch__track {
  opacity: 0.45;
  cursor: not-allowed;
}
.sl-consent-switch input:focus-visible + .sl-consent-switch__track {
  outline: 2px solid var(--slc-lake);
  outline-offset: 2px;
}

/* ----------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .sl-consent__btn,
  .sl-consent-switch__track,
  .sl-consent-switch__thumb {
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 640px) {
  .sl-consent {
    padding: 10px;
  }
  .sl-consent__bar {
    padding: 18px;
    border-radius: 18px;
  }
  .sl-consent__actions {
    width: 100%;
  }
  .sl-consent__btn {
    flex: 1 1 auto;
  }
}
