/*
 * FundEDU v2 lead slide-in (D2, ruled 2026-10-09): the full pop-up and gold tab (the stored snippet's look, with the
 * accessibility fixes), and the slide-in panel. Enqueued by implementation/mu-plugins/fundedu-v2-lead-popup.php.
 * Plan: docs/superpowers/plans/2026-10-08-v2-cutover.md, Task B7 Step 4.
 */

#fe-lead-modal-root { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }

.felm-overlay {
  position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(8, 16, 32, .74); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility 0s linear .28s;
}
/* Visible at once on open (so focus can move in on the same click); hidden only after the fade on close. */
.felm-overlay.felm-open { opacity: 1; visibility: visible; transition: opacity .28s ease, visibility 0s; }
.felm-card {
  position: relative; width: 100%; max-width: 632px; max-height: 92vh; overflow: auto;
  background: linear-gradient(158deg, #20476e 0%, #122c4b 55%, #0d2038 100%);
  border-radius: 24px; border-top: 5px solid #ecb731; padding: 44px 40px 34px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, .55), 0 0 0 1px rgba(236, 183, 49, .18), 0 0 120px rgba(236, 183, 49, .12);
  transform: translateY(26px) scale(.96); opacity: 0;
  transition: transform .34s cubic-bezier(.2, .9, .3, 1.2), opacity .34s ease;
}
.felm-overlay.felm-open .felm-card { transform: none; opacity: 1; }
.felm-card:focus { outline: none; }
.felm-x {
  position: absolute; top: 14px; right: 16px; width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .08); cursor: pointer; transition: background .2s, transform .2s;
}
.felm-x:before, .felm-x:after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 16px; height: 2.5px; background: #d6e2f0; border-radius: 2px;
}
.felm-x:before { transform: translate(-50%, -50%) rotate(45deg); }
.felm-x:after { transform: translate(-50%, -50%) rotate(-45deg); }
.felm-x:hover { background: rgba(255, 255, 255, .18); transform: rotate(90deg); }
.felm-badge {
  display: inline-block; background: linear-gradient(90deg, #f4c542, #e0a413); color: #0f2540; font-size: 12px;
  font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 7px 15px; border-radius: 999px;
  margin-bottom: 18px; box-shadow: 0 4px 14px rgba(236, 183, 49, .35);
}
.felm-title { color: #fff; font-size: 29px; line-height: 1.16; font-weight: 800; margin: 0 0 14px; letter-spacing: -.01em; }
.felm-sub { color: #c4d2e4; font-size: 15.5px; line-height: 1.6; margin: 0 0 20px; }
.felm-list { list-style: none; margin: 0 0 26px; padding: 0; }
.felm-list li { position: relative; color: #eaf1f9; font-size: 15px; font-weight: 600; padding: 7px 0 7px 32px; }
.felm-list li:before {
  content: ""; position: absolute; left: 0; top: 8px; width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, #f4c542, #e0a413);
}
.felm-list li:after {
  content: ""; position: absolute; left: 6px; top: 11px; width: 5px; height: 9px; border: solid #0f2540;
  border-width: 0 2.5px 2.5px 0; transform: rotate(43deg);
}
.felm-cta {
  display: flex; align-items: center; justify-content: center; gap: 11px; text-decoration: none;
  background: linear-gradient(92deg, #f7c948, #e6a812); color: #10233f; font-size: 18.5px; font-weight: 800;
  letter-spacing: .01em; padding: 19px 26px; border-radius: 999px; box-shadow: 0 12px 30px rgba(236, 183, 49, .42);
  transition: transform .18s ease, box-shadow .18s ease;
}
/* The glow pulses twice when the pop-up opens and then stops (it used to loop forever). */
.felm-overlay.felm-open .felm-cta { animation: felmpulse 2.4s ease-in-out 2; }
.felm-cta:hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(236, 183, 49, .6); color: #10233f; }
.felm-arrow {
  width: 9px; height: 9px; border-top: 2.5px solid currentColor; border-right: 2.5px solid currentColor;
  transform: rotate(45deg); transition: transform .18s ease; display: inline-block; margin-left: 1px;
}
.felm-cta:hover .felm-arrow { transform: rotate(45deg) translate(2px, -2px); }
@keyframes felmpulse {
  0%, 100% { box-shadow: 0 12px 30px rgba(236, 183, 49, .42), 0 0 0 0 rgba(236, 183, 49, .35); }
  50% { box-shadow: 0 12px 30px rgba(236, 183, 49, .42), 0 0 0 12px rgba(236, 183, 49, 0); }
}
.felm-fine { color: #8fa3ba; font-size: 12.5px; text-align: center; margin: 14px 0 0; }
.felm-tab {
  position: fixed; right: -1px; top: 50%; transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl;
  z-index: 2147482000; background: linear-gradient(180deg, #f4c542, #e0a413); color: #10233f;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  border: 0; border-radius: 0 0 10px 10px; padding: 16px 9px; cursor: pointer; box-shadow: -3px 3px 16px rgba(0, 0, 0, .28);
  transition: padding .2s ease, filter .2s ease;
}
.felm-tab:hover { padding-left: 13px; filter: brightness(1.06); }
.felm-tab span { display: block; }

.felm-tab:focus-visible { outline: 3px solid #10233f; outline-offset: 2px; }
.felm-x:focus-visible, .felm-cta:focus-visible { outline: 3px solid #f4c542; outline-offset: 3px; }

/* The slide-in panel: bottom-left, opposite the gold tab on the right edge; no backdrop, no scroll lock. */
.felsi {
  position: fixed; left: 24px; bottom: 24px; z-index: 2147481000; box-sizing: border-box;
  width: 33vw; min-width: 300px; max-width: 420px; padding: 22px 24px 22px;
  background: linear-gradient(158deg, #20476e 0%, #122c4b 55%, #0d2038 100%);
  border-radius: 16px; border-top: 4px solid #ecb731; color: #fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(16px); transition: opacity .25s ease, transform .25s ease;
}
.felsi[hidden] { display: none !important; }
.felsi.felsi-in { opacity: 1; transform: none; }
.felsi-line { margin: 0 34px 16px 0; font-size: 17px; line-height: 1.3; font-weight: 700; color: #fff; }
.felsi-cta {
  display: block; text-align: center; text-decoration: none; background: linear-gradient(92deg, #f7c948, #e6a812);
  color: #10233f; font-size: 16px; font-weight: 800; padding: 13px 18px; border-radius: 999px;
}
.felsi-cta:hover { color: #10233f; filter: brightness(1.05); }
.felsi-close {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .1); cursor: pointer;
}
.felsi-close:before, .felsi-close:after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 2.5px; background: #d6e2f0; border-radius: 2px;
}
.felsi-close:before { transform: translate(-50%, -50%) rotate(45deg); }
.felsi-close:after { transform: translate(-50%, -50%) rotate(-45deg); }
.felsi-close:hover { background: rgba(255, 255, 255, .2); }
.felsi-cta:focus-visible, .felsi-close:focus-visible { outline: 3px solid #f4c542; outline-offset: 3px; }

@media (max-width: 600px) {
  .felm-card { padding: 38px 24px 28px; border-radius: 20px; }
  .felm-title { font-size: 24px; }
  .felm-cta { font-size: 16.5px; padding: 17px 20px; }
  .felm-tab { font-size: 11px; padding: 13px 7px; }
}

/* At 980px and below the panel is a slim one-line bar at the bottom: the Book link and the close button. */
@media (max-width: 980px) {
  .felsi {
    left: 0; right: 0; bottom: 0; width: auto; min-width: 0; max-width: none; display: flex; align-items: center;
    padding: 10px 58px calc(10px + env(safe-area-inset-bottom)) 14px; border-radius: 0; border-top-width: 3px;
  }
  .felsi-line {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
  .felsi-cta { flex: 1; font-size: 15px; padding: 11px 14px; }
  .felsi-close { top: 50%; transform: translateY(-50%); right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .felm-overlay, .felm-card, .felm-x, .felm-cta, .felm-arrow, .felm-tab, .felsi { transition: none; }
  .felm-cta, .felm-overlay.felm-open .felm-cta { animation: none; }
}

@media print {
  #fe-lead-modal-root, #fe-lead-slidein { display: none !important; }
}
