/* ==========================================================================
   MAMASLOVE — PRIVACY POLICY & CUSTOMER TERMS MANDATORY GATE
   Luxury Atelier Aesthetic: Blush Pink, Warm Cream, Deep Ruby & Cacao Brown
   ========================================================================== */

/* 1. BODY LOCK STATE WHEN GATE IS ACTIVE */
body.legal-gate-active {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100dvh !important;
  touch-action: none !important;
}

body.legal-gate-active > *:not(#privacyGate) {
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* 2. FULL-SCREEN SUBDUED OVERLAY */
#privacyGate {
  position: fixed;
  inset: 0;
  z-index: 999990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 36px);
  background: rgba(36, 23, 24, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 1;
  visibility: visible;
  transition: opacity .45s cubic-bezier(.22, .61, .36, 1), visibility .45s cubic-bezier(.22, .61, .36, 1);
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
}

#privacyGate.gate-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* CURSOR INTERACTION OVER GATE */
@media (min-width: 768px) {
  #custom-cursor {
    z-index: 10000005 !important;
  }
  #cursor-follower {
    z-index: 10000004 !important;
  }
  #privacyGate, #privacyGate *, .gate-card, .gate-card *, .gate-btn, .gate-view-link, .reader-btn, .reader-back-btn, #privacyReaderModal, #privacyReaderModal * {
    cursor: none !important;
  }
}

/* 3. MODAL PROMPT & DECLINED CARDS */
.gate-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #FFFFFF;
  border: 1px solid rgba(217, 154, 170, 0.45);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(58, 37, 37, 0.25), 0 0 35px rgba(245, 193, 209, 0.35);
  padding: 0;
  color: #3A2525;
  font-family: 'Plus Jakarta Sans', sans-serif;
  animation: gateCardEnter .55s cubic-bezier(.16, 1, .3, 1) forwards;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.gate-card-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 24px 10px 24px;
  box-sizing: border-box;
}

@keyframes gateCardEnter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gate-brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.gate-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(217, 154, 170, 0.5);
  box-shadow: 0 2px 8px rgba(217, 154, 170, 0.2);
  flex-shrink: 0;
}

.gate-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.gate-brand-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: #3A2525;
  letter-spacing: 0.04em;
}

.gate-brand-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8B263E;
  font-weight: 700;
  margin-top: 2px;
}

.gate-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 3.2vw, 28px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0 0 8px 0;
  color: #3A2525;
}

.gate-desc {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(58, 37, 37, 0.82);
  margin: 0 0 14px 0;
}

/* KEY HIGHLIGHTS BOX */
.gate-summary-box {
  background: #FAF0F3;
  border: 1px solid rgba(217, 154, 170, 0.35);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gate-summary-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11.5px;
  line-height: 1.4;
  color: #3A2525;
}

.gate-summary-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #8B263E;
  stroke: #8B263E;
}

/* VIEW POLICY TRIGGER LINK */
.gate-view-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #8B263E;
  background: #FFFFFF;
  border: 1px solid rgba(217, 154, 170, 0.5);
  border-radius: 12px;
  padding: 9px 12px;
  margin-bottom: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: all .25s ease;
  width: 100%;
  box-sizing: border-box;
  justify-content: space-between;
}

.gate-view-link:hover {
  background: #FAF0F3;
  border-color: #8B263E;
  transform: translateY(-1px);
}

.gate-view-link svg {
  transition: transform .25s ease;
  flex-shrink: 0;
}

.gate-view-link:hover svg {
  transform: translateX(3px);
}

/* BUTTON CONTROLS - FIXED FOOTER INSIDE CARD */
.gate-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px 20px 24px;
  background: #FFFFFF;
  border-top: 1px solid rgba(217, 154, 170, 0.25);
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .gate-card-body {
    padding: 18px 18px 8px 18px;
  }
  .gate-actions {
    padding: 10px 18px 18px 18px;
    gap: 8px;
  }
}

.gate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s cubic-bezier(.16, 1, .3, 1);
  border: none;
  outline: none;
  font-family: 'Montserrat', sans-serif;
  text-align: center;
  box-sizing: border-box;
}

.gate-btn-primary {
  flex: 1.4;
  background: #8B263E;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(139, 38, 62, 0.3);
}

.gate-btn-primary:hover {
  background: #3A2525;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(58, 37, 37, 0.3);
}

.gate-btn-secondary {
  flex: 1;
  background: #FAF0F3;
  color: #3A2525;
  border: 1px solid rgba(217, 154, 170, 0.4);
}

.gate-btn-secondary:hover {
  background: rgba(245, 193, 209, 0.4);
  border-color: #8B263E;
  color: #8B263E;
  transform: translateY(-2px);
}

/* CARD DISPLAY TOGGLE */
#gatePromptCard {
  display: flex;
}

#gatePromptCard.gate-card-hidden {
  display: none !important;
}

#gateDeclinedCard {
  display: none !important;
}

#gateDeclinedCard.active {
  display: flex !important;
  animation: gateCardEnter .45s cubic-bezier(.16, 1, .3, 1) forwards;
}

.gate-alert-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8B263E;
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 12px;
  font-family: 'Montserrat', sans-serif;
}

/* 4. FULL PRIVACY POLICY READER MODAL */
#privacyReader {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 3vw, 36px);
  background: rgba(36, 23, 24, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s cubic-bezier(.16, 1, .3, 1);
}

#privacyReader.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.reader-dialog {
  position: relative;
  width: 100%;
  max-width: 880px;
  height: 90vh;
  height: 90dvh;
  background: #FFFFFF;
  border: 1px solid rgba(217, 154, 170, 0.5);
  border-radius: 24px;
  box-shadow: 0 35px 90px rgba(58, 37, 37, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #3A2525;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.reader-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(217, 154, 170, 0.35);
  background: #FAF0F3;
  z-index: 2;
  flex-shrink: 0;
  gap: 12px;
}

.reader-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.reader-header-left h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(15px, 2.2vw, 20px);
  font-weight: 700;
  margin: 0;
  color: #3A2525;
  line-height: 1.2;
}

.reader-header-left span {
  font-size: 10px;
  letter-spacing: .08em;
  color: #8B263E;
  text-transform: uppercase;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  display: block;
}

.reader-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid rgba(217, 154, 170, 0.5);
  color: #3A2525;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s ease;
  font-family: 'Montserrat', sans-serif;
  flex-shrink: 0;
}

.reader-back-btn:hover {
  background: #8B263E;
  color: #FFFFFF;
  border-color: #8B263E;
  transform: translateY(-1px);
}

.reader-content {
  flex: 1;
  overflow-y: auto;
  padding: clamp(16px, 3vw, 36px) clamp(16px, 3.5vw, 44px);
  font-size: 13.5px;
  line-height: 1.75;
  color: rgba(58, 37, 37, 0.88);
  overscroll-behavior: contain;
}

.reader-content h1,
.reader-content h2,
.reader-content h3 {
  font-family: 'Playfair Display', Georgia, serif;
  color: #3A2525;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 10px;
}

.reader-content h1 {
  font-size: 24px;
  margin-top: 0;
  border-bottom: 1px solid rgba(217, 154, 170, 0.4);
  padding-bottom: 12px;
}

.reader-content h2 {
  font-size: 18px;
  color: #8B263E;
  border-top: 1px solid rgba(217, 154, 170, 0.3);
  padding-top: 20px;
}

.reader-content h3 {
  font-size: 15px;
  color: #3A2525;
}

.reader-content p {
  margin: 0 0 12px 0;
}

.reader-content ul {
  margin: 0 0 16px 0;
  padding-left: 20px;
  list-style-type: disc;
}

.reader-content li {
  margin-bottom: 5px;
}

.reader-content strong {
  color: #3A2525;
  font-weight: 600;
}

.reader-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid rgba(217, 154, 170, 0.35);
  background: #FAF0F3;
  z-index: 2;
  flex-shrink: 0;
  gap: 12px;
}

.reader-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s cubic-bezier(.16, 1, .3, 1);
  border: none;
  outline: none;
  font-family: 'Montserrat', sans-serif;
  white-space: nowrap;
}

.reader-btn-primary {
  background: #8B263E;
  color: #FFFFFF;
  box-shadow: 0 3px 12px rgba(139, 38, 62, 0.3);
}

.reader-btn-primary:hover {
  background: #3A2525;
  transform: translateY(-1px);
}

.reader-btn-secondary {
  background: #FFFFFF;
  color: #3A2525;
  border: 1px solid rgba(217, 154, 170, 0.5);
}

.reader-btn-secondary:hover {
  background: #FAF0F3;
  border-color: #8B263E;
  color: #8B263E;
  transform: translateY(-1px);
}
