/* =============================================================================
   Dd Dates — GUEST (logged-out) mode styles
   Every rule is scoped under body.guest-mode (or a guest-only element that is
   never present for members), so a logged-in member is completely unaffected.
   ============================================================================= */

/* ---- Header: the injected Sign in / Enquire buttons are <a> elements ---- */
body.guest-mode .header-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* Enquire = the primary call to action: hot pink so it stands out in the
   dark header. */
body.guest-mode .header-btn.guest-enquire {
  background: #E72170;
  color: #fff;
  border: 1px solid #E72170;
  font-weight: 600;
}
body.guest-mode .header-btn.guest-enquire:hover {
  background: #B5165A;
  border-color: #B5165A;
  color: #fff;
}

/* ---- Refresh: quiet outline (only Enquire is the filled/pink CTA) ---- */
body.guest-mode #refreshBtn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.85);
}
body.guest-mode #refreshBtn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

/* ---- Pink "submit a date" banner (under the header) ---- */
.guest-submit-banner {
  background: #f2d4e0;
  border-bottom: 1px solid #ECE7E4;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.guest-submit-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #15110F;
  margin-bottom: 2px;
}
.guest-submit-text span {
  font-size: 13px;
  color: #7a1a3a;
}
.guest-submit-btn {
  background: #E72170;
  color: #fff;
  border: none;
  padding: 11px 24px;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}
.guest-submit-btn:hover { background: #B5165A; }
@media (max-width: 640px) {
  .guest-submit-banner { flex-direction: column; align-items: flex-start; }
}

/* ---- Expired-member "Membership expired" badge in the header (D-2). Shown
   only for an expired member, next to the Renew button (which replaces Enquire).
   A pink pill so it reads instantly as a status, standing out on the dark
   header without adding a banner to the stack. ---- */
.guest-expired-badge {
  display: inline-flex;
  align-items: center;
  background: #E72170;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 11px;
  white-space: nowrap;
}

/* ---- Info strip under the header ---- */
.guest-info-strip {
  background: white;
  border-bottom: 1px solid #ECE7E4;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #4A4441;
  flex-wrap: wrap;
}
.guest-info-strip a {
  color: #E72170;
  font-weight: 600;
  text-decoration: none;
  font-size: 12px;
}
.guest-info-strip a:hover { text-decoration: underline; }

/* ---- Locked controls: tabs + filters ----
   The container keeps pointer events (so it catches the click → upsell, and
   shows the not-allowed cursor); its children are click-through so the
   container always receives the click. */
body.guest-mode .tabs,
body.guest-mode .filters {
  opacity: 0.55;
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='22'%20height='22'%20viewBox='0%200%2024%2024'%3E%3Crect%20x='5'%20y='11'%20width='14'%20height='9'%20rx='2'%20fill='%2315110F'/%3E%3Cpath%20d='M8%2011V7a4%204%200%200%201%208%200v4'%20fill='none'%20stroke='%2315110F'%20stroke-width='2'/%3E%3C/svg%3E") 11 14, not-allowed;
}
/* Search box: same padlock cursor (its default text cursor would otherwise
   override the .filters cursor). No extra opacity so it isn't double-dimmed. */
body.guest-mode #searchInput {
  cursor: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='22'%20height='22'%20viewBox='0%200%2024%2024'%3E%3Crect%20x='5'%20y='11'%20width='14'%20height='9'%20rx='2'%20fill='%2315110F'/%3E%3Cpath%20d='M8%2011V7a4%204%200%200%201%208%200v4'%20fill='none'%20stroke='%2315110F'%20stroke-width='2'/%3E%3C/svg%3E") 11 14, not-allowed;
}
body.guest-mode .tabs > *,
body.guest-mode .filters > * {
  pointer-events: none;
}

/* ---- Small "Members only" hover hint for locked controls (replaces the
   popup so it doesn't nag on every click). Follows the cursor. ---- */
.guest-lock-tip {
  position: fixed;
  z-index: 4000;
  display: none;
  background: #15110F;
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ---- Legend: hide the Favourited + My dates keys (guests have neither) ---- */
body.guest-mode .calendar-legend span:nth-child(4),
body.guest-mode .calendar-legend span:nth-child(5) {
  display: none;
}

/* ---- Members-only upsell modal (injected only in guest mode) ---- */
.members-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.members-modal.open { display: flex; }
.members-modal-box {
  background: white;
  border-radius: 8px;
  padding: 28px;
  max-width: 400px;
  width: 100%;
  position: relative;
  box-sizing: border-box;
}
.members-modal-close {
  position: absolute;
  top: 14px; right: 16px;
  font-size: 22px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}
.members-modal-close:hover { color: #15110F; }
.members-modal-box h3 {
  font-size: 18px;
  font-weight: 600;
  color: #15110F;
  margin: 0 0 10px;
  padding-right: 24px;
}
.members-modal-box p {
  font-size: 14px;
  color: #4A4441;
  line-height: 1.6;
  margin: 0 0 18px;
}
.members-modal-cta {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 13px;
  background: #E72170;
  color: white;
  border: none;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}
.members-modal-cta:hover { background: #B5165A; }
.members-modal-signin {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  color: #E72170;
  text-decoration: none;
}
.members-modal-signin:hover { text-decoration: underline; }

/* Submit-focused variant (shown when a guest clicks an actual event) */
.members-modal-sub {
  font-size: 13px;
  font-weight: 600;
  color: #15110F;
  line-height: 1.5;
  margin: 0 0 16px;
}
/* Enquire as an outline button (not a plain link) */
.members-modal-enquire-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 13px;
  margin-bottom: 4px;
  background: #fff;
  color: #15110F;
  border: 1.5px solid #15110F;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.members-modal-enquire-btn:hover { background: #15110F; color: #fff; }
/* Divider between the membership section and the submit section */
.members-modal-divider {
  border: none;
  border-top: 1px solid #ECE7E4;
  margin: 18px 0;
}

/* =============================================================================
   The blocks below are NOT guest-scoped. They style elements that are injected
   by JS only in the situation named — a member-only banner, a guest/expired
   toggle, a guest email gate — so they never appear for the wrong audience.
   (Kept here so calendar.css stays untouched; guest.css loads for both.)
   ============================================================================= */

/* ---- MEMBER "submit a date" banner (member view only; injected by
   injectMemberSubmitBanner in calendar.js). Mirrors the guest submit banner. --- */
.member-submit-banner {
  background: #f2d4e0;
  border-bottom: 1px solid #ECE7E4;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.member-submit-text strong {
  font-size: 14px;
  font-weight: 700;
  color: #15110F;
  margin-right: 6px;
}
.member-submit-text span {
  font-size: 13px;
  color: #7a1a3a;
}
.member-submit-btn {
  background: #E72170;
  color: #fff;
  border: none;
  padding: 11px 24px;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
  flex-shrink: 0;
}
.member-submit-btn:hover { background: #B5165A; }
@media (max-width: 640px) {
  .member-submit-banner { flex-direction: column; align-items: flex-start; }
}

/* ---- "Hide awareness days" toggle (guests + expired members only; injected by
   injectGuestAwarenessToggle). Floated to the right of the "Showing X dates"
   row. A working control, so NOT locked like the filters. Guest-only element,
   so the member count row is untouched. ---- */
.guest-awareness-toggle {
  float: right;
}
.guest-awareness-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #15110F;
  cursor: pointer;
  user-select: none;
}
.guest-awareness-toggle input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #E72170;
  cursor: pointer;
}

/* ---- Guest email gate — deliberately styled to MATCH the login page (light
   background, white card with the same border/shadow, the Dd logo, the same
   Montserrat/Raleway type, centred fields, pink button). Shown only when
   GUEST_EMAIL_GATE is on and the guest has no stored email. ---- */
.guest-email-gate {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #f0f0f0;
  z-index: 3500;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.guest-email-gate-box {
  background: #fff;
  border: 1.5px solid #ECE7E4;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 32px;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  text-align: center;
}
.guest-email-gate-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: white;
  display: block;
  margin: 0 auto 12px;
}
.guest-email-gate-box h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #15110F;
  margin: 0 0 4px;
}
.guest-email-gate-heading {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #15110F;
  margin-bottom: 4px;
}
.guest-email-gate-sub {
  display: block;
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #4A4441;
  margin-bottom: 24px;
}
.guest-email-gate-box input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1.5px solid #D9D2CD;
  border-radius: 6px;
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  text-align: center;
  letter-spacing: 0.04em;
  color: #15110F;
  background: #fff;
  margin-bottom: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.guest-email-gate-box input[type="email"]::placeholder { color: #aaa; }
.guest-email-gate-box input[type="email"]:focus {
  outline: none;
  border-color: #E72170;
  box-shadow: 0 0 0 3px rgba(231, 33, 112, 0.15);
}
.guest-email-gate-error {
  display: none;
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  color: #B5165A;
  margin-bottom: 10px;
}
.guest-email-gate-btn {
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
  background: #E72170;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.guest-email-gate-btn:hover { background: #B5165A; }
.guest-email-gate-privacy {
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  color: #999999;
  line-height: 1.5;
  margin: 16px 0 0;
}
.guest-email-gate-privacy a {
  color: #E72170;
  text-decoration: none;
}
.guest-email-gate-privacy a:hover { text-decoration: underline; }
