/*
 * Privé Lounge V1.14.0 — final theme correction layer
 * Loaded after app.css and all legacy inline component rules.
 * Purpose: one authoritative Light/Dark presentation for safety cards,
 * event detail/application, event editor modals, terms and audience controls.
 */

/* ---------- Global dark-mode surface/token correction ---------- */
body.prive-theme-dark{
  --prive-v114-bg:#0d0920;
  --prive-v114-surface:#15102d;
  --prive-v114-surface-2:#1b1437;
  --prive-v114-surface-3:#221740;
  --prive-v114-border:rgba(232,219,255,.14);
  --prive-v114-text:#f8f5ff;
  --prive-v114-muted:#c8bfd4;
  --prive-v114-subtle:#a89db7;
  --prive-v114-violet:#bc86ff;
  --prive-v114-gold:#e4c36d;
  --prive-v114-danger:#ff91c1;
}

/* ---------- Homepage: Local community + Privacy card ---------- */
body.prive-theme-dark .sc-section-soft{
  background:linear-gradient(180deg,#17112d 0%,#151027 100%)!important;
  color:var(--prive-v114-text)!important;
}
body.prive-theme-dark .sc-section-soft .sc-eyebrow{color:var(--prive-v114-violet)!important}
body.prive-theme-dark .sc-section-soft h2{color:var(--prive-v114-text)!important}
body.prive-theme-dark .sc-section-soft .sc-lead-sm{color:var(--prive-v114-muted)!important}
body.prive-theme-dark .sc-location-chips a{
  background:#21183b!important;
  border-color:rgba(226,208,255,.16)!important;
  color:#f4effa!important;
  box-shadow:none!important;
}
body.prive-theme-dark .sc-location-chips a:hover{
  background:#2c1d4f!important;
  color:#fff!important;
  border-color:rgba(190,132,255,.34)!important;
}
body.prive-theme-dark .sc-safety-card{
  background:linear-gradient(145deg,#20163d,#17102f)!important;
  border:1px solid rgba(227,208,255,.15)!important;
  color:var(--prive-v114-text)!important;
  box-shadow:0 24px 70px rgba(2,1,12,.30)!important;
}
body.prive-theme-dark .sc-safety-card .sc-eyebrow{color:#c893ff!important}
body.prive-theme-dark .sc-safety-card h3{color:#fff!important}
body.prive-theme-dark .sc-safety-card p{color:#cec5d8!important}
body.prive-theme-dark .sc-safety-card a{color:#e5c979!important}
body.prive-theme-dark .sc-safety-icon{
  background:#2c2050!important;
  color:#cf9cff!important;
  border:1px solid rgba(210,177,255,.20)!important;
}

/* ---------- Event detail page ---------- */
body.prive-theme-dark .prive-event-feature-v113,
body.prive-theme-dark .prive-feature-event-left,
body.prive-theme-dark .prive-feature-application-card,
body.prive-theme-dark .prive-feature-workflow{
  color:var(--prive-v114-text)!important;
}
body.prive-theme-dark .prive-feature-event-left,
body.prive-theme-dark .prive-feature-application-card,
body.prive-theme-dark .prive-feature-workflow,
body.prive-theme-dark .prive-feature-about{
  background:linear-gradient(145deg,#18112f,#120d27)!important;
  border-color:var(--prive-v114-border)!important;
}
body.prive-theme-dark .prive-feature-event-copy>p,
body.prive-theme-dark .prive-feature-about>p,
body.prive-theme-dark .prive-feature-facts small,
body.prive-theme-dark .prive-feature-application-card p,
body.prive-theme-dark .prive-feature-workflow p,
body.prive-theme-dark .prive-feature-workflow span,
body.prive-theme-dark .prive-feature-important p{
  color:var(--prive-v114-muted)!important;
}
body.prive-theme-dark .prive-feature-event-copy h1,
body.prive-theme-dark .prive-feature-about h2,
body.prive-theme-dark .prive-feature-application-card h2,
body.prive-theme-dark .prive-feature-workflow h2,
body.prive-theme-dark .prive-feature-workflow strong,
body.prive-theme-dark .prive-feature-facts b{
  color:var(--prive-v114-text)!important;
}
body.prive-theme-dark .prive-feature-form-preview label,
body.prive-theme-dark .prive-feature-form-preview strong{
  color:#f8f5ff!important;
}
body.prive-theme-dark .prive-feature-form-preview input,
body.prive-theme-dark .prive-feature-form-preview textarea,
body.prive-theme-dark .prive-feature-form-preview select{
  background:#100b25!important;
  border-color:rgba(226,209,255,.17)!important;
  color:#f8f5ff!important;
  -webkit-text-fill-color:#f8f5ff!important;
  opacity:1!important;
}
body.prive-theme-dark .prive-feature-form-preview input::placeholder,
body.prive-theme-dark .prive-feature-form-preview textarea::placeholder{color:#978ca5!important;opacity:1!important}
body.prive-theme-dark .prive-feature-form-preview .sc-check{
  color:#e7dfed!important;
  background:transparent!important;
}
body.prive-theme-dark .prive-feature-form-preview .sc-check input[type="checkbox"]{
  width:17px!important;height:17px!important;min-width:17px!important;max-width:17px!important;
  flex:0 0 17px!important;margin:2px 0 0!important;padding:0!important;accent-color:#9145ff!important;
}
body.prive-theme-dark .prive-inline-rules-button{
  background:#20163d!important;
  border-color:rgba(208,178,255,.20)!important;
  color:#eee6f6!important;
}
body.prive-theme-dark .prive-inline-rules-button:hover{background:#2a1c4b!important;color:#fff!important}

/* ---------- Modal backdrop and solid modal shells ---------- */
.prive-business-modal,
.prive-event-apply-modal{isolation:isolate!important}
.prive-business-modal-backdrop,
.prive-event-modal-backdrop{
  position:absolute!important;inset:0!important;
  background:rgba(10,7,18,.78)!important;
  backdrop-filter:blur(18px) saturate(.72)!important;
  -webkit-backdrop-filter:blur(18px) saturate(.72)!important;
  opacity:1!important;
}
body.prive-theme-dark .prive-business-modal-backdrop,
body.prive-theme-dark .prive-event-modal-backdrop{
  background:rgba(4,2,12,.94)!important;
}
.prive-business-modal-dialog,
.prive-event-modal-card{
  opacity:1!important;
  background-image:none!important;
  isolation:isolate!important;
}
body.prive-theme-dark .prive-business-modal-dialog{
  background:#100b25!important;
  border:1px solid rgba(232,219,255,.18)!important;
  box-shadow:0 50px 160px rgba(0,0,0,.75)!important;
}
body.prive-theme-dark .prive-business-modal-brand{
  background-color:#22103e!important;
  background-image:radial-gradient(circle at 18% 15%,rgba(130,56,255,.32),transparent 35%),radial-gradient(circle at 82% 82%,rgba(218,45,145,.22),transparent 38%)!important;
  color:#fff!important;
  opacity:1!important;
}
body.prive-theme-dark .prive-business-modal-form{
  background:#100b25!important;
  color:#f8f5ff!important;
  opacity:1!important;
}
body.prive-theme-dark .prive-event-modal-card{
  background:#110c27!important;
  color:#f8f5ff!important;
  border:1px solid rgba(232,219,255,.18)!important;
  box-shadow:0 50px 160px rgba(0,0,0,.75)!important;
}
body.prive-theme-dark .prive-business-modal-close,
body.prive-theme-dark .prive-modal-close{
  background:#f7f3fb!important;
  color:#17111e!important;
  border-color:rgba(255,255,255,.18)!important;
}

/* ---------- Edit Event form: every label/help/control readable ---------- */
body.prive-theme-dark .prive-business-modal-form .sc-create-form,
body.prive-theme-dark .prive-business-modal-form .sc-create-form label,
body.prive-theme-dark .prive-business-modal-form .sc-create-form legend,
body.prive-theme-dark .prive-business-modal-form .sc-create-form strong,
body.prive-theme-dark .prive-business-modal-form .sc-create-form h2,
body.prive-theme-dark .prive-business-modal-form .sc-create-form h3{
  color:#f8f5ff!important;
}
body.prive-theme-dark .prive-business-modal-form .sc-create-form small,
body.prive-theme-dark .prive-business-modal-form .sc-create-form p{
  color:#c9bfd3!important;
}
body.prive-theme-dark .prive-business-modal-form input:not([type="checkbox"]):not([type="radio"]),
body.prive-theme-dark .prive-business-modal-form select,
body.prive-theme-dark .prive-business-modal-form textarea{
  background:#0d0920!important;
  border:1px solid rgba(226,209,255,.18)!important;
  color:#f8f5ff!important;
  -webkit-text-fill-color:#f8f5ff!important;
  opacity:1!important;
  box-shadow:none!important;
}
body.prive-theme-dark .prive-business-modal-form input:disabled,
body.prive-theme-dark .prive-business-modal-form select:disabled,
body.prive-theme-dark .prive-business-modal-form textarea:disabled{
  background:#17112f!important;color:#cfc6d8!important;-webkit-text-fill-color:#cfc6d8!important;opacity:1!important;
}
body.prive-theme-dark .prive-business-modal-form input::placeholder,
body.prive-theme-dark .prive-business-modal-form textarea::placeholder{color:#8f849d!important;opacity:1!important}
body.prive-theme-dark .prive-business-modal-form select option{background:#0d0920!important;color:#f8f5ff!important}

/* All event audience/promotion fieldsets are themed as a group, regardless of legacy class interactions. */
body.prive-theme-dark .prive-business-modal-form fieldset,
body.prive-theme-dark .prive-promo-channel-fieldset{
  background:#17112f!important;
  border:1px solid rgba(226,209,255,.18)!important;
  color:#f8f5ff!important;
  opacity:1!important;
}
body.prive-theme-dark .prive-business-modal-form fieldset legend,
body.prive-theme-dark .prive-promo-channel-fieldset legend{
  background:#17112f!important;
  color:#c995ff!important;
  padding:0 8px!important;
}
body.prive-theme-dark .prive-business-modal-form fieldset label,
body.prive-theme-dark .prive-promo-channel-fieldset label{
  color:#f0eaf5!important;
  opacity:1!important;
  display:flex!important;
  align-items:flex-start!important;
  gap:10px!important;
}
body.prive-theme-dark .prive-business-modal-form fieldset input[type="checkbox"],
body.prive-theme-dark .prive-promo-channel-fieldset input[type="checkbox"]{
  width:17px!important;height:17px!important;min-width:17px!important;max-width:17px!important;
  flex:0 0 17px!important;margin:2px 0 0!important;padding:0!important;accent-color:#9145ff!important;
}
body.prive-theme-dark .prive-business-modal-form .sc-notice{
  background:#211832!important;
  border-color:rgba(225,186,83,.24)!important;
  color:#e7ddc4!important;
}
body.prive-theme-dark .prive-business-modal-form .sc-notice strong{color:#f5df9e!important}

/* ---------- Event application + legal terms ---------- */
body.prive-theme-dark .prive-event-modal-card>h2,
body.prive-theme-dark .prive-event-modal-card>p,
body.prive-theme-dark .prive-event-modal-card label,
body.prive-theme-dark .prive-event-modal-card strong,
body.prive-theme-dark .prive-event-organiser-preview h3{
  color:#f8f5ff!important;
}
body.prive-theme-dark .prive-event-modal-card>p,
body.prive-theme-dark .prive-event-organiser-preview>p{color:#c9bfd3!important}
body.prive-theme-dark .prive-event-modal-rules>div,
body.prive-theme-dark .prive-event-preview-rule-grid>div,
body.prive-theme-dark .prive-application-profile-note{
  background:#1a1334!important;
  border-color:rgba(226,209,255,.15)!important;
  color:#f8f5ff!important;
}
body.prive-theme-dark .prive-event-modal-rules span,
body.prive-theme-dark .prive-event-preview-rule-grid span,
body.prive-theme-dark .prive-application-profile-note span{color:#c9bfd3!important}
body.prive-theme-dark .prive-terms-details{
  background:#18112f!important;
  border-color:rgba(226,209,255,.17)!important;
  color:#f8f5ff!important;
}
body.prive-theme-dark .prive-terms-details summary{color:#f8f5ff!important;background:#1c1437!important}
body.prive-theme-dark .prive-terms-details .prive-legal-scroll{
  background:#0c081c!important;
  border-color:rgba(226,209,255,.12)!important;
}
body.prive-theme-dark .prive-terms-details .prive-legal-scroll pre{
  color:#e4dce9!important;
  background:transparent!important;
}
body.prive-theme-dark .prive-event-application-form textarea,
body.prive-theme-dark .prive-event-application-form select{
  background:#0d0920!important;
  color:#f8f5ff!important;
  border-color:rgba(226,209,255,.17)!important;
  -webkit-text-fill-color:#f8f5ff!important;
}
body.prive-theme-dark .prive-event-application-form textarea::placeholder{color:#8f849d!important;opacity:1!important}
body.prive-theme-dark .prive-event-application-form .sc-check,
body.prive-theme-dark .prive-event-organiser-preview .sc-check{
  color:#eee7f4!important;
  opacity:1!important;
}
body.prive-theme-dark .prive-event-application-form .sc-check input[type="checkbox"],
body.prive-theme-dark .prive-event-organiser-preview .sc-check input[type="checkbox"]{
  appearance:auto!important;
  width:17px!important;height:17px!important;min-width:17px!important;max-width:17px!important;
  flex:0 0 17px!important;margin:2px 0 0!important;padding:0!important;accent-color:#9145ff!important;opacity:1!important;
}
body.prive-theme-dark .prive-event-organiser-preview .sc-notice{
  background:#211832!important;
  border-color:rgba(225,186,83,.24)!important;
  color:#e7ddc4!important;
}
body.prive-theme-dark .prive-event-organiser-preview .sc-notice strong{color:#f5df9e!important}

/* ---------- Light mode keeps premium but never washed out ---------- */
body.prive-theme-light .sc-safety-card{
  background:linear-gradient(145deg,#fff,#f4ecff)!important;
  border:1px solid #e7d8f7!important;
  color:#201a29!important;
}
body.prive-theme-light .sc-safety-card h3{color:#201a29!important}
body.prive-theme-light .sc-safety-card p{color:#625a69!important}
body.prive-theme-light .sc-safety-card a{color:#6f2cff!important}
body.prive-theme-light .prive-business-modal-dialog,
body.prive-theme-light .prive-business-modal-form,
body.prive-theme-light .prive-event-modal-card{background:#fff!important;opacity:1!important}

/* ---------- Responsive modal integrity ---------- */
@media(max-width:760px){
  .prive-business-modal-dialog{grid-template-columns:1fr!important}
  .prive-business-modal-brand{position:relative!important;min-height:auto!important}
  .prive-event-modal-card{width:calc(100vw - 18px)!important;max-height:calc(100vh - 20px)!important}
}
