/* Facilitione Vendor Access – fva.css  v1.0.0
 * Matches the Manrope / glassmorphism design system used across all event pages.
 * Variables are prefixed --fva- to avoid collisions with Divi/theme variables.
 */

/* ── CTA button (outside modal) ──────────────────────────────────────────── */
.fva-open-modal { cursor: pointer; }

/* ── Screen-reader only ───────────────────────────────────────────────────── */
.fva-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Page scroll lock (applied to both html + body when modal is open) ────── */
html.fva-locked,
body.fva-locked {
  overflow: hidden !important;
  /* preserve scroll position — no layout shift */
}

/* ── Modal backdrop + shell ───────────────────────────────────────────────── */
.fva-modal {
  position: fixed;
  inset: 0;
  z-index: 9999999; /* above Divi fixed header (999999) */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(90px, 11vh, 130px) 20px 48px;
  /* NO overflow here — the panel scrolls internally */
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
}
.fva-modal[hidden] { display: none !important; }

.fva-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 21, 52, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fva-fade-in 0.22s ease;
  cursor: pointer;
}

/* ── Modal panel ──────────────────────────────────────────────────────────── */
.fva-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 700px;
  /* Panel is the scroll container — fills available space below the nav */
  max-height: calc(100dvh - clamp(90px, 11vh, 130px) - 48px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;  /* prevents scroll from leaking to the page */
  border-radius: 32px;
  padding: 56px 56px 52px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    0 2px 4px rgba(8, 21, 52, 0.04),
    0 12px 32px rgba(8, 21, 52, 0.10),
    0 48px 100px rgba(8, 21, 52, 0.20);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  animation: fva-slide-up 0.48s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
  scrollbar-color: rgba(8, 21, 52, 0.12) transparent;
}
.fva-modal__panel::-webkit-scrollbar { width: 5px; }
.fva-modal__panel::-webkit-scrollbar-thumb { background: rgba(8, 21, 52, 0.12); border-radius: 99px; }

@media (max-width: 768px) {
  .fva-modal__panel {
    padding: 44px 32px 40px;
    border-radius: 26px;
  }
}

@media (max-width: 480px) {
  .fva-modal__panel {
    padding: 36px 22px 32px;
    border-radius: 22px;
  }
  .fva-modal {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ── Close button ─────────────────────────────────────────────────────────── */
.fva-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(8, 21, 52, 0.06);
  border: none;
  cursor: pointer;
  color: rgba(8, 21, 52, 0.5);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  padding: 0;
}
.fva-modal__close:hover {
  background: rgba(8, 21, 52, 0.12);
  color: rgba(8, 21, 52, 0.85);
  transform: scale(1.06);
}

/* ── Gate: icon, title, description ──────────────────────────────────────── */
.fva-modal__icon {
  margin-bottom: 22px;
}
.fva-modal__icon svg {
  display: block;
}

.fva-modal__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.06;
  color: #081534;
  margin: 0 0 12px;
}

.fva-modal__desc {
  font-size: 0.94rem;
  line-height: 1.76;
  color: rgba(8, 21, 52, 0.56);
  margin: 0 0 32px;
  max-width: 46ch;
}

/* ── Password input ───────────────────────────────────────────────────────── */
.fva-input-wrap {
  position: relative;
  margin-bottom: 12px;
}

.fva-input {
  display: block;
  width: 100%;
  height: 56px;
  padding: 0 54px 0 20px;
  border-radius: 14px;
  border: 1.5px solid rgba(8, 21, 52, 0.14);
  background: rgba(255, 255, 255, 0.78);
  font-family: inherit;
  font-size: 0.96rem;
  color: #081534;
  outline: none;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  box-sizing: border-box;
  -webkit-appearance: none;
}
.fva-input:focus {
  border-color: #1d5fc4;
  box-shadow: 0 0 0 3.5px rgba(29, 95, 196, 0.13);
}
.fva-input::placeholder {
  color: rgba(8, 21, 52, 0.34);
}

.fva-toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  color: rgba(8, 21, 52, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.18s ease;
  line-height: 0;
}
.fva-toggle-pw:hover { color: rgba(8, 21, 52, 0.65); }

/* ── Error message ────────────────────────────────────────────────────────── */
.fva-error {
  font-size: 0.83rem;
  color: #b83232;
  background: rgba(184, 50, 50, 0.07);
  border: 1px solid rgba(184, 50, 50, 0.16);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 14px;
  line-height: 1.5;
}
.fva-error[hidden] { display: none; }

/* ── Submit button spinner ────────────────────────────────────────────────── */
.fva-submit-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fva-submit-spinner[hidden] { display: none; }

/* ── Footer note ──────────────────────────────────────────────────────────── */
.fva-modal__footer-note {
  margin-top: 18px;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(8, 21, 52, 0.38);
  line-height: 1.5;
}

/* ── Content area (revealed after correct password) ──────────────────────── */
.fva-modal__gate[hidden],
.fva-modal__content[hidden] { display: none; }

.fva-modal__content-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(8, 21, 52, 0.08);
}

.fva-modal__content .fva-modal__title {
  font-size: 1.3rem;
  margin-top: 8px;
}

.fva-modal__content-body {
  font-size: 0.91rem;
  line-height: 1.74;
  color: rgba(8, 21, 52, 0.78);
}

/* Basic typography resets for injected WP content */
.fva-modal__content-body h2,
.fva-modal__content-body h3 {
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #081534;
  margin-top: 28px;
  margin-bottom: 10px;
}
.fva-modal__content-body h2 { font-size: 1.18rem; }
.fva-modal__content-body h3 { font-size: 1.0rem; }
.fva-modal__content-body p  { margin-bottom: 14px; }
.fva-modal__content-body ul { padding-left: 20px; margin-bottom: 14px; }
.fva-modal__content-body li { margin-bottom: 6px; }
.fva-modal__content-body a  { color: #1d5fc4; text-decoration: underline; }
.fva-modal__content-body strong { color: #081534; }

/* Table for vendor listings */
.fva-modal__content-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  margin-bottom: 20px;
}
.fva-modal__content-body th {
  text-align: left;
  padding: 8px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(8, 21, 52, 0.5);
  border-bottom: 1.5px solid rgba(8, 21, 52, 0.08);
}
.fva-modal__content-body td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(8, 21, 52, 0.06);
  vertical-align: top;
}
.fva-modal__content-body tr:last-child td { border-bottom: none; }

/* ── Shared btn styles (mirrors event pages — only if Divi isn't global) ─── */
.fva-modal .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  cursor: pointer;
  transition:
    transform 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.22s ease,
    border-color 0.22s ease,
    opacity 0.22s ease;
}
.fva-modal .btn:hover  { transform: translateY(-2px); }
.fva-modal .btn:active { transform: translateY(0); }
.fva-modal .btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
}

.fva-modal .btn-gold {
  background: linear-gradient(135deg, #c88b46 0%, #af7232 100%);
  color: #fff;
  box-shadow: 0 14px 32px rgba(184, 125, 58, 0.28);
}
.fva-modal .btn-gold:hover { box-shadow: 0 20px 42px rgba(184, 125, 58, 0.38); }

.fva-modal .btn-outline {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(8, 21, 52, 0.14);
  color: #081534;
}
.fva-modal .btn-outline:hover {
  background: #fff;
  border-color: rgba(29, 95, 196, 0.28);
  color: #1d5fc4;
}

.fva-modal .btn-blue {
  background: #1d5fc4;
  color: #fff;
  box-shadow: 0 14px 32px rgba(29, 95, 196, 0.24);
}
.fva-modal .btn-blue:hover { box-shadow: 0 20px 42px rgba(29, 95, 196, 0.34); }

/* label utility (matches event page .label) */
.fva-modal .label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #1d5fc4;
}
.fva-modal .label::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes fva-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fva-slide-up {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.975);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fva-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-7px); }
  60%       { transform: translateX(7px); }
  80%       { transform: translateX(-3px); }
}

@keyframes fva-spin {
  to { transform: rotate(360deg); }
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .fva-modal__backdrop,
  .fva-modal__panel,
  .fva-modal__content { animation: none !important; transition: none !important; }
}
