/* pass-card.css — The Pass sign-up card for Resources pages (Academy, Playbooks, guides).
   Tokens come from site-nav.css / academy.css: navy #0a1930 / #16213e, gold #d4a84b,
   gold ink #9a6b12, ink #374151, dim #9ca3af, radius 16px, ease (0.22,1,0.36,1).

   NO-JS FLOOR: without JavaScript the card renders as a static block at the end of
   the article. pass-card.js adds .edc-pass--float, which turns the same markup into
   a bottom-right card (desktop) or bottom sheet (phone) that slides in once the
   reader is a good way through the page. Nothing is injected; JS only toggles classes. */
.edc-pass {
  --p-navy: #0a1930; --p-navy2: #16213e; --p-gold: #d4a84b; --p-gold-ink: #9a6b12;
  --p-ink: #1f2937; --p-ink-2: #4b5563; --p-line: rgba(10, 25, 48, 0.1);
  --p-ease: cubic-bezier(0.22, 1, 0.36, 1); --p-radius: 16px;
  font-family: 'Montserrat', 'Montserrat Fallback', 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--p-ink); box-sizing: border-box; margin: 3rem auto; padding: 0 1rem; max-width: 672px; width: 100%;
}
.edc-pass *, .edc-pass *::before, .edc-pass *::after { box-sizing: inherit; }
.edc-pass-card {
  position: relative; background: #fff; border: 1px solid var(--p-line); border-radius: var(--p-radius);
  padding: 1.5rem 1.5rem 1.25rem; box-shadow: 0 14px 36px rgba(22, 33, 62, 0.12); overflow: hidden;
}
/* the "order ticket" edge: a thin gold rail along the top, like the ticket rail on a pass */
.edc-pass-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--p-gold) 0 70%, var(--p-navy) 70% 100%);
}
.edc-pass-kicker {
  display: inline-flex; align-items: center; gap: 0.45rem; margin: 0 0 0.85rem; padding: 0.3rem 0.7rem 0.3rem 0.55rem;
  background: var(--p-navy); color: var(--p-gold); border-radius: 999px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1;
}
.edc-pass-bell { width: 14px; height: 14px; fill: currentColor; transform-origin: 50% 10%; }
.edc-pass-title {
  font-family: 'Playfair Display', 'Playfair Display Fallback', Georgia, serif;
  font-size: 1.45rem; line-height: 1.2; font-weight: 700; color: var(--p-navy); margin: 0 0 0.6rem; letter-spacing: -0.005em;
  /* legacy pages style every h2 (rules, padding, caps): the card's title ignores them */
  border: 0; padding: 0; background: none; text-transform: none; text-align: left;
}
.edc-pass-title::before, .edc-pass-title::after { content: none; }
.edc-pass-text { font-size: 0.92rem; text-align: left; line-height: 1.55; color: var(--p-ink-2); margin: 0 0 1.1rem; }
.edc-pass-form { margin: 0; }
.edc-pass-row { display: flex; gap: 0.5rem; }
.edc-pass-input {
  flex: 1 1 auto; min-width: 0; height: 48px; padding: 0 0.95rem; font: inherit; font-size: 1rem; color: var(--p-ink);
  background: #fff; border: 1.5px solid rgba(10, 25, 48, 0.22); border-radius: 10px; -webkit-appearance: none; appearance: none;
}
.edc-pass-input::placeholder { color: #9ca3af; }
.edc-pass-input:focus { outline: none; border-color: var(--p-gold); box-shadow: 0 0 0 4px rgba(212, 168, 75, 0.25); }
.edc-pass-submit {
  flex: 0 0 auto; height: 48px; padding: 0 1.15rem; font: inherit; font-size: 0.92rem; font-weight: 700; white-space: nowrap;
  color: var(--p-navy); background: var(--p-gold); border: 0; border-radius: 10px; cursor: pointer;
}
.edc-pass-submit:focus-visible, .edc-pass-close:focus-visible, .edc-pass-later:focus-visible { outline: 3px solid var(--p-gold); outline-offset: 2px; }
.edc-pass-submit[disabled] { opacity: 0.7; cursor: progress; }
.edc-pass .edc-news-msg { margin: 0.6rem 0 0; font-size: 0.85rem; line-height: 1.45; color: var(--p-ink-2); min-height: 0; }
.edc-pass .edc-news-msg[data-state="ok"] { color: var(--p-gold-ink); font-weight: 600; }
.edc-pass .edc-news-msg[data-state="error"] { color: #b42318; }
.edc-pass-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 0.9rem; }
.edc-pass-fine { font-size: 0.72rem; color: #6b7280; margin: 0; }
.edc-pass-later {
  font: inherit; font-size: 0.8rem; font-weight: 600; color: var(--p-ink-2); background: none; border: 0; padding: 0.5rem 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: rgba(10, 25, 48, 0.25); text-underline-offset: 3px; white-space: nowrap;
}
.edc-pass-close {
  position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; display: none; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 50%; color: var(--p-ink-2); cursor: pointer;
}
.edc-pass-close svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; }
.edc-pass-done { display: none; }
.edc-pass.is-done .edc-pass-ask { display: none; }
.edc-pass.is-done .edc-pass-done { display: block; }

/* ---------- floating state (JS on) ---------- */
.edc-pass--float {
  position: fixed; z-index: 9980; right: 24px; bottom: 24px; left: auto; margin: 0; padding: 0; width: min(400px, calc(100vw - 48px));
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity 600ms var(--p-ease), transform 600ms var(--p-ease);
}
.edc-pass--float .edc-pass-card { box-shadow: 0 24px 60px rgba(10, 25, 48, 0.28), 0 2px 8px rgba(10, 25, 48, 0.08); }
.edc-pass--float .edc-pass-close { display: inline-flex; }
.edc-pass--float.is-in { opacity: 1; transform: none; pointer-events: auto; }
.edc-pass--float.is-parked { opacity: 0; transform: translateY(8px); pointer-events: none; transition-duration: 300ms; }
.edc-pass--float[hidden] { display: none; }
/* one ring of the bell as the card lands — fires once, from the entrance, never loops */
.edc-pass--float.is-in .edc-pass-bell { animation: edc-pass-ring 900ms var(--p-ease) 350ms 1 both; }
@keyframes edc-pass-ring {
  0% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(11deg); }
  60% { transform: rotate(-7deg); } 80% { transform: rotate(4deg); } 100% { transform: rotate(0); }
}
@media (pointer: fine) {
  .edc-pass-submit { transition: transform 220ms var(--p-ease), background-color 220ms var(--p-ease); }
  .edc-pass-submit:hover { transform: translateY(-1px); background: #ddb45e; }
  .edc-pass-close:hover, .edc-pass-later:hover { color: var(--p-navy); }
  .edc-pass-close:hover { background: rgba(10, 25, 48, 0.06); }
}
/* the back-to-top button shares the corner: step aside while the card is up */
body:has(.edc-pass--float.is-in:not(.is-parked)) #back-to-top { opacity: 0 !important; pointer-events: none !important; }
/* phones: a bottom sheet that leaves the article visible and scrollable behind it */
@media (max-width: 640px) {
  .edc-pass-card { padding: 1.25rem 1.1rem 1rem; }
  .edc-pass-title { font-size: 1.3rem; }
  .edc-pass-row { flex-direction: column; }
  .edc-pass-submit { width: 100%; }
  .edc-pass--float .edc-pass-fine { display: none; }
  .edc-pass--float .edc-pass-foot { justify-content: center; margin-top: 0.5rem; }
  .edc-pass--float .edc-pass-text { margin-bottom: 0.85rem; }
  .edc-pass--float {
    right: 0; bottom: 0; left: 0; width: auto; transform: translateY(100%);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .edc-pass--float .edc-pass-card { border-radius: var(--p-radius) var(--p-radius) 0 0; border-bottom: 0; padding-right: 3.25rem; }
  .edc-pass--float .edc-pass-more { display: none; }   /* shorter line on a phone, same sentence */
  .edc-pass--float.is-in { transform: none; }
  .edc-pass--float.is-parked { transform: translateY(100%); }
}
@media (max-height: 520px) and (orientation: landscape) { .edc-pass--float { display: none !important; } }
@media (prefers-reduced-motion: reduce) {
  .edc-pass--float, .edc-pass-submit { transition: none !important; }
  .edc-pass--float.is-in .edc-pass-bell { animation: none !important; }
}
