/* ================================
   SUBSCRIPTIONS SECTION
================================ */

.fc-subscriptions {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    margin: 0;
    background: #111410;
    background-color: #111410;
    background-image: none;
    color: #fff;
}

.fc-subscriptions__bg {
    position: absolute;
    inset: 0;
    background: #111410;
    background-color: #111410;
    background-image: none;
    pointer-events: none;   /* ← only addition */
}

.fc-subscriptions__overlay {
    position: absolute;
    inset: 0;
    background: none;
    pointer-events: none;
}

.fc-subscriptions__inner {
    position: relative;
    z-index: 1;
    padding: 72px 48px 64px;
    max-width: 1280px;
    margin: 0 auto;
}

/* ================================
   AUTHOR MODE SAFETY
   Keyed on .fc-subscriptions--author which HTL correctly applies
   when parentComponentEditContext.editMode is true.
================================ */

.fc-subscriptions--author {
    overflow: visible !important;
    border-radius: 0 !important;
}

.fc-subscriptions--author .fc-subscriptions__inner {
    z-index: auto;
}

.fc-subscriptions--author .fc-subscriptions__bg {
    transform: none;
}

/* Dissolve per-card stacking contexts (backdrop-filter creates one per card) */
.fc-subscriptions--author .fc-planCard,
.fc-subscriptions--author .fc-planCard:hover,
.fc-subscriptions--author .fc-planCard.is-featured {
    transform: none !important;
    backdrop-filter: none;
}

.fc-subscriptions--author .fc-planCard:hover {
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

/* Dissolve billing toggle stacking context — was previously missed */
.fc-subscriptions--author .fc-subscriptions__billingToggle {
    backdrop-filter: none;
}

/* ================================
   HEADER
================================ */

.fc-subscriptions__header {
    text-align: center;
    max-width: 860px;
    margin: 0 auto 42px;
}

.fc-subscriptions__eyebrow {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: #AAFF00;
}

.fc-subscriptions__title {
    margin: 0 0 14px;
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1.02;
    font-weight: 800;
}

.fc-subscriptions__intro {
    margin: 0 auto 26px;
    max-width: 760px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 20px;
    line-height: 1.6;
}

/* ================================
   BILLING TOGGLE
================================ */

.fc-subscriptions__billingToggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
}

.fc-subscriptions__billingToggle button {
    border: 0;
    background: transparent;
    color: #fff;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fc-subscriptions__billingToggle button.is-active {
    background: #b7f34a;
    color: #111;
}

/* ================================
   GRID
================================ */

.fc-subscriptions__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

/* ================================
   PLAN CARD
================================ */

.fc-planCard {
    position: relative;
    padding: 28px 26px 28px;
    border-radius: 26px;
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
    transition: all 0.2s ease;
}

.fc-planCard:hover {
    transform: translateY(-4px);
}

.fc-planCard.is-featured {
    border-color: rgba(183, 243, 74, 0.58);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
    transform: translateY(-6px);
}

/* ================================
   RIBBON (IMPROVED)
================================ */

.fc-planCard__ribbon {
    position: absolute;
    top: -12px;
    right: 22px;
    z-index: 2;
    background: #b7f34a;
    color: #111;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 8px 14px;
    border-radius: 999px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(183, 243, 74, 0.25);
}

/* ================================
   BADGE
================================ */

.fc-planCard__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    height: 74px;
    border-radius: 50%;
    margin-bottom: 18px;
    border: 4px solid rgba(183, 243, 74, 0.55);
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    text-align: center;
    line-height: 1.2;
    padding: 8px;
}

/* ================================
   TEXT
================================ */

.fc-planCard__title {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}

.fc-planCard__subtitle {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 15px;
    line-height: 1.5;
}

/* ================================
   PRICE
================================ */

.fc-planCard__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 22px;
}

.fc-planCard__priceMain {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

.fc-planCard__priceSuffix {
    color: rgba(255, 255, 255, 0.72);
    font-size: 15px;
}

/* ================================
   FEATURES (RICH TEXT SUPPORT)
================================ */

.fc-planCard__features {
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.9);
}

/* Paragraph fallback */
.fc-planCard__features--richtext p {
    margin: 0 0 14px;
    line-height: 1.55;
}

/* UL reset */
.fc-planCard__features--richtext ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* LI styling */
.fc-planCard__features--richtext li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 12px;
    line-height: 1.55;
}

/* Bullet */
.fc-planCard__features--richtext li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b7f34a;
}

/* Remove last spacing */
.fc-planCard__features--richtext ul li:last-child {
    margin-bottom: 0;
}

/* ================================
   BUTTONS
================================ */

.fc-planCard__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    font-size: 18px;
    transition: all 0.2s ease;
}

.fc-planCard__button--primary {
    background: #b7f34a;
    color: #111;
}

.fc-planCard__button--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(183, 243, 74, 0.24);
}

.fc-planCard__button--secondary {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.fc-planCard__button--secondary:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* ================================
   REGISTRATION MODAL
================================ */

/* Prevent body scroll while modal is open */
.fc-modal-body-lock {
    overflow: hidden;
}

/* ── Overlay ── */
/*
 * AUTHORING COMPATIBILITY NOTE
 * Using visibility:hidden (not just opacity:0 + pointer-events:none).
 * visibility:hidden removes the element from browser hit-testing *and*
 * from stacking-context participation, so the fixed z-index:1000 layer
 * does not block the Aegis XP authoring overlay (typically z-index 200-600)
 * when the modal is closed.
 * The transition delay on visibility (matching the opacity duration) keeps
 * the fade-out animation intact on close.
 */
.fc-modal__overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;

    /* Hidden by default — JS adds .is-open */
    visibility: hidden;                                  /* ← kills hit-testing entirely */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease,
    visibility 0s linear 0.22s;              /* ← hide only after fade-out completes */
}

.fc-modal__overlay.is-open {
    visibility: visible;                                 /* ← immediate on open */
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.22s ease,
    visibility 0s linear 0s;                 /* ← no delay on open */
}

/* ── Modal box ── */
.fc-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;

    transform: translateY(12px);
    transition: transform 0.25s ease;
}

.fc-modal__overlay.is-open .fc-modal {
    transform: translateY(0);
}

/* ── Header ── */
.fc-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: #111;
    border-radius: 20px 20px 0 0;
}

.fc-modal__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit; /* uses Barlow Condensed from page */
    font-weight: 800;
    font-size: 17px;
    letter-spacing: 1px;
    color: #fff;
}

.fc-modal__logoMark {
    width: 16px;
    height: 16px;
    background: #b7ff43;
    display: block;
    flex-shrink: 0;
}

.fc-modal__close {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.fc-modal__close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* ── Progress bar ── */
.fc-modal__progressTrack {
    height: 3px;
    background: #eee;
}

.fc-modal__progressFill {
    height: 100%;
    background: #b7ff43;
    transition: width 0.35s ease;
    width: 50%; /* JS updates this */
}

/* ── Body (steps) ── */
.fc-modal__body {
    padding: 28px 28px 24px;
    display: none;
}

.fc-modal__body.is-active {
    display: block;
}

.fc-modal__heading {
    font-size: 24px;
    font-weight: 800;
    color: #111;
    margin: 0 0 6px;
    line-height: 1.15;
}

.fc-modal__sub {
    font-size: 14px;
    color: #666;
    margin: 0 0 22px;
    line-height: 1.55;
}

/* ── Success step ── */
.fc-modal__body--success {
    text-align: center;
}

.fc-modal__successIcon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 2.5px solid #b7ff43;
    background: #f6fff0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #3aaa5a;
    margin: 0 auto 20px;
}

/* ── Submit button ── */
.fc-modal__submit {
    display: block;
    width: 100%;
    padding: 13px;
    border-radius: 999px;
    border: none;
    background: #b7ff43;
    color: #111;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.18s, opacity 0.18s;
    margin-top: 6px;
}

.fc-modal__submit:hover {
    background: #c8ff6e;
}

.fc-modal__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Legal / hint text ── */
.fc-modal__legal {
    font-size: 12px;
    color: #bbb;
    text-align: center;
    margin-top: 14px;
    line-height: 1.6;
}

.fc-modal__legal a {
    color: #6a9a00;
    text-decoration: none;
}

.fc-modal__legal a:hover {
    text-decoration: underline;
}

/* ================================
   FORM ELEMENTS
================================ */

.fc-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.fc-form__group {
    margin-bottom: 14px;
}

.fc-form__label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 6px;
}

.fc-form__input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e3e3df;
    border-radius: 9px;
    font-family: inherit;
    font-size: 14px;
    color: #111;
    background: #fff;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.fc-form__input::placeholder {
    color: #ccc;
}

.fc-form__input:focus {
    border-color: #7dc400;
    box-shadow: 0 0 0 3px rgba(124, 196, 0, 0.14);
}

/* Validation states */
.fc-form__input.is-ok {
    border-color: #3aaa5a;
}

.fc-form__input.is-error {
    border-color: #e74c3c;
}

/* ── Password strength meter ── */
.fc-form__pwdMeter {
    height: 3px;
    border-radius: 2px;
    background: #eee;
    margin-top: 7px;
    overflow: hidden;
}

.fc-form__pwdBar {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}

/* ── Inline field messages ── */
.fc-form__msg {
    display: block;
    font-size: 12px;
    margin-top: 5px;
    min-height: 16px;
    line-height: 1.4;
}

.fc-form__msg--ok   { color: #3aaa5a; }
.fc-form__msg--err  { color: #e74c3c; }
.fc-form__msg--info { color: #888; }

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 520px) {
    .fc-modal {
        border-radius: 16px;
        max-height: 95vh;
    }

    .fc-modal__body {
        padding: 22px 18px 20px;
    }

    .fc-form__row {
        grid-template-columns: 1fr;
    }
}

/* ================================
   UTILITIES
================================ */

.is-hidden {
    display: none !important;
}

/* ================================
   RESPONSIVE
================================ */

@media (max-width: 1024px) {
    .fc-subscriptions__grid {
        grid-template-columns: 1fr;
    }

    .fc-planCard.is-featured {
        transform: none;
    }
}

@media (max-width: 768px) {
    .fc-subscriptions__inner {
        padding: 54px 20px 48px;
    }

    .fc-subscriptions__title {
        font-size: 34px;
    }

    .fc-planCard {
        padding: 24px 20px;
    }

    .fc-planCard__title {
        font-size: 24px;
    }

    .fc-planCard__priceMain {
        font-size: 40px;
    }
}
