/*
 * SalamXP PDPA cookie consent -- banner + settings modal.
 *
 * Hand-written, self-contained CSS, NOT Tailwind utility classes -- same reason as
 * assets/tag-filter.css in this directory: the theme's compiled stylesheet
 * (assets/css/app.css) is a static, pre-built Tailwind output whose content-scan only covers
 * *.php files inside the theme itself. A mu-plugin's markup/JS is never scanned, so any Tailwind
 * class referenced only here would compile to nothing and render unstyled. Values below are
 * literal translations of the salamxp brand tokens (docs/knowledge/trip-design.md §"Color"):
 * primary emerald #059669, primary-400 #66d898, neutral #111827, font Inter, rounded-2xl/pill.
 */
.sx-consent { position: fixed; inset: 0; z-index: 9990; pointer-events: none; font-family: Inter, system-ui, sans-serif; }
.sx-consent[hidden] { display: none !important; }

.sx-consent-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 9991;
  max-width: 860px; margin: 0 auto; pointer-events: auto;
  background: #ffffff; color: #111827;
  border: 1px solid #e5e7eb; border-radius: 1rem;
  box-shadow: 0 12px 40px rgba(17, 24, 39, .18);
  padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center;
  transform: translateY(0); opacity: 1; transition: transform .25s ease, opacity .25s ease;
}
.sx-consent-banner.is-hiding { transform: translateY(16px); opacity: 0; }
@media (prefers-reduced-motion: reduce) { .sx-consent-banner { transition: none; } }

/* Desktop: compact bottom-right toast, not a full-width bar, so it never overlaps centered content. */
@media (min-width: 801px) {
  .sx-consent-banner { left: auto; right: 24px; bottom: 24px; max-width: 420px; margin: 0; }
}

.sx-consent-copy { flex: 1 1 340px; min-width: 0; }
.sx-consent-title { font-weight: 700; color: #059669; font-size: 17px; margin: 0 0 4px; }
.sx-consent-desc { font-size: 13.5px; line-height: 1.5; color: #4b5563; margin: 0; }

.sx-consent-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.sx-consent-btn {
  font: inherit; font-size: 13.5px; font-weight: 600; border-radius: 9999px;
  padding: 10px 18px; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.sx-consent-btn--primary { background: #059669; color: #ffffff; }
.sx-consent-btn--primary:hover { background: #047857; }
/* Equal visual prominence for reject (PDPA: must carry the same weight as accept, not a thin
   ghost outline) -- same solid-fill treatment as the primary button, different neutral color. */
.sx-consent-btn--ghost { background: #111827; color: #ffffff; }
.sx-consent-btn--ghost:hover { background: #1f2937; }
.sx-consent-btn--text { background: transparent; color: #059669; border-color: #d1d5db; }
.sx-consent-btn--text:hover { background: #f0fdf4; }

.sx-consent-modal {
  position: fixed; inset: 0; z-index: 9992; pointer-events: auto;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(17, 24, 39, .5);
}
.sx-consent-modal[hidden] { display: none; }
.sx-consent-modal-card {
  background: #ffffff; border-radius: 1.25rem; max-width: 480px; width: 100%;
  padding: 24px; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(17, 24, 39, .3);
}
.sx-consent-cat { margin: 16px 0; display: flex; flex-direction: column; gap: 16px; }
.sx-consent-cat-row { display: flex; gap: 12px; align-items: flex-start; }
.sx-consent-cat-title { font-weight: 600; color: #111827; font-size: 14px; margin: 0 0 2px; }
.sx-consent-cat-desc { font-size: 13px; color: #6b7280; margin: 0; line-height: 1.4; }

.sx-consent-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; margin-top: 2px; }
.sx-consent-switch input { opacity: 0; width: 0; height: 0; }
.sx-consent-switch span {
  position: absolute; inset: 0; background: #d1d5db; border-radius: 9999px;
  transition: background .15s ease; cursor: pointer;
}
.sx-consent-switch span::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px;
  background: #ffffff; border-radius: 50%; transition: transform .15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.sx-consent-switch input:checked + span { background: #059669; }
.sx-consent-switch input:checked + span::before { transform: translateX(18px); }
.sx-consent-switch.is-locked span { background: #a7f3d0; cursor: not-allowed; }
.sx-consent-switch.is-locked input:checked + span::before { transform: translateX(18px); }

.sx-consent-actions--modal { margin-top: 20px; justify-content: flex-end; }
