/*
 * Rizmo shell — Silktide Consent Manager theme
 * Mirrors @propspace/ui Button, Card, and globals shell-surface tokens.
 */

#silktide-wrapper {
  --rizmo-brand-500: #3b82f6;
  --rizmo-brand-600: #2563eb;
  --rizmo-brand-700: #1d4ed8;
  --rizmo-focus: 0 0 0 2px #fff, 0 0 0 4px rgba(120, 152, 196, 0.45), 0 0 0 6px #fff;
  --rizmo-card-bg: rgba(255, 255, 255, 0.76);
  --rizmo-card-border: rgba(203, 213, 225, 0.65);
  --rizmo-card-shadow:
    0 24px 50px rgba(15, 23, 42, 0.1),
    0 6px 16px rgba(15, 23, 42, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);

  --focus: var(--rizmo-focus);
  --boxShadow: var(--rizmo-card-shadow);
  --fontFamily: var(--font-shell), "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --primaryColor: #0f172a;
  --backgroundColor: var(--rizmo-card-bg);
  --textColor: #0f172a;
  --backdropBackgroundColor: rgba(15, 23, 42, 0.52);
  --backdropBackgroundBlur: 2px;
  --cookieIconColor: rgba(255, 255, 255, 0.82);
  --cookieIconBackgroundColor: var(--rizmo-brand-600);
  --buttonBackground: rgba(255, 255, 255, 0.82);
  --buttonBackgroundHover: #ffffff;
  --buttonGradient: linear-gradient(
    to bottom,
    var(--rizmo-brand-600) 0%,
    var(--rizmo-brand-700) 100%
  );
  --buttonGradientHover: linear-gradient(
    to bottom,
    var(--rizmo-brand-500) 0%,
    var(--rizmo-brand-600) 100%
  );
}

/* ── Links (in copy + footer) ───────────────────────────── */
#silktide-wrapper a {
  color: var(--rizmo-brand-600);
  font-weight: 500;
  font-size: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.35);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

#silktide-wrapper a:hover {
  color: var(--rizmo-brand-700);
  text-decoration-color: rgba(29, 78, 216, 0.55);
}

/* ── Default / secondary buttons (reject, etc.) ─────────── */
#silktide-wrapper .st-button {
  color: #334155;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--rizmo-card-border);
  padding: 10px 18px;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

#silktide-wrapper .st-button:hover {
  color: #0f172a;
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.75);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

#silktide-wrapper .st-button--primary:hover {
  transform: translateY(-1px);
}

/* Accept all — solid white */
#silktide-wrapper .accept-all.st-button,
#silktide-wrapper .preferences-accept-all.st-button {
  color: #0f172a;
  background: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.9);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06),
    0 4px 12px rgba(15, 23, 42, 0.06);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#silktide-wrapper .accept-all.st-button:hover,
#silktide-wrapper .preferences-accept-all.st-button:hover {
  color: #0f172a;
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.85);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.06),
    0 8px 20px rgba(15, 23, 42, 0.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Reject — transparent / ghost */
#silktide-wrapper .reject-all.st-button,
#silktide-wrapper .preferences-reject-all.st-button {
  color: #475569;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#silktide-wrapper .reject-all.st-button:hover,
#silktide-wrapper .preferences-reject-all.st-button:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(100, 116, 139, 0.55);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ── Floating banner — Card-like glass ──────────────────── */
#silktide-banner {
  font-family: var(--fontFamily);
  color: #0f172a;
  background: var(--rizmo-card-bg);
  border: 1px solid var(--rizmo-card-border);
  border-radius: 1rem;
  box-shadow: var(--rizmo-card-shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 1.25rem 1.35rem 1.35rem;
}

@media (min-width: 640px) {
  #silktide-banner {
    padding: 1.5rem 1.75rem;
  }
}

#silktide-banner:focus {
  border-radius: 1rem;
}

#silktide-banner p {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5rem;
  font-weight: 400;
  color: #475569;
}

#silktide-banner p:last-of-type {
  margin-bottom: 0;
}

#silktide-banner a {
  color: var(--rizmo-brand-600);
  font-weight: 500;
}

#silktide-banner a:hover {
  color: var(--rizmo-brand-700);
}

#silktide-banner .actions {
  gap: 0.65rem;
  margin-top: 1.1rem;
}

@media (min-width: 600px) {
  #silktide-banner .actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
  }
}

#silktide-banner .actions-row {
  gap: 0.75rem;
  margin-top: 0.25rem;
}

/* Preferences = ghost text control */
#silktide-banner .preferences {
  color: #64748b;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

#silktide-banner .preferences span {
  text-decoration: underline;
  text-decoration-color: rgba(100, 116, 139, 0.45);
  text-underline-offset: 3px;
}

#silktide-banner .preferences span:hover {
  color: #0f172a;
  text-decoration-color: rgba(15, 23, 42, 0.35);
}

#silktide-banner .preferences:after {
  color: #94a3b8;
  font-weight: 500;
}

#silktide-banner a.silktide-logo {
  opacity: 0.4;
  transition: opacity 0.15s ease;
}

#silktide-banner a.silktide-logo:hover {
  opacity: 0.65;
}

/* ── Modal — same surface language ─────────────────────── */
#silktide-modal {
  border: 1px solid var(--rizmo-card-border);
  border-radius: 1rem;
  background: var(--rizmo-card-bg);
  color: #0f172a;
  box-shadow: var(--rizmo-card-shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 1.35rem 1.35rem 1.25rem;
}

@media (min-width: 640px) {
  #silktide-modal {
    padding: 1.5rem 1.75rem 1.35rem;
  }
}

#silktide-modal header {
  margin-bottom: 0.35rem;
}

#silktide-modal h1 {
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0f172a;
}

#silktide-modal .modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.6);
  color: #64748b;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

#silktide-modal .modal-close:hover {
  border-color: #cbd5e1;
  color: #0f172a;
  background: #fff;
}

#silktide-modal .modal-close svg {
  fill: currentColor;
}

#silktide-modal p {
  font-size: 0.875rem;
  line-height: 1.5rem;
  color: #475569;
  font-weight: 400;
}

#silktide-modal legend {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0f172a;
}

#silktide-modal footer {
  gap: 0.65rem;
}

@media (min-width: 600px) {
  #silktide-modal footer {
    gap: 0.75rem;
  }
}

#silktide-modal footer a {
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Switches — calmer track, brand when on */
#silktide-modal .switch__pill {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
}

#silktide-modal .switch__dot {
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

#silktide-modal .switch__off,
#silktide-modal .switch__on {
  color: #64748b;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

#silktide-modal .switch input:checked + .switch__pill {
  background: var(--buttonGradient);
  border: 1px solid rgba(37, 99, 235, 0.4);
}

#silktide-modal .switch input:checked ~ .switch__off,
#silktide-modal .switch input:checked ~ .switch__on {
  color: rgba(255, 255, 255, 0.95);
}

#silktide-modal .switch input:disabled + .switch__pill {
  opacity: 0.55;
}

#silktide-modal section::-webkit-scrollbar-thumb {
  background-color: rgba(115, 136, 168, 0.38);
  border-radius: 999px;
}

#silktide-cookie-icon {
  border: 1px solid var(--rizmo-card-border);
  box-shadow: var(--rizmo-card-shadow);
}

#silktide-cookie-icon svg {
  fill: var(--rizmo-brand-600);
}
