/* ==========================================================================
   Program registration modal (page-builder "register" buttons).
   Markup: resources/views/frontend/builder/parts/register-modal.blade.php
   Behaviour: public/assets/js/program-register-modal.js
   Built on the Oxford 2026 tokens; written for older mobile browsers too
   (no :where/:is/:has, no `inset`, no `aspect-ratio`, no flex `gap` for layout).
   ========================================================================== */

.prm {
    --prm-ink: var(--ox-primary-700, #0a3258);
    --prm-brand: var(--ox-primary, #0F4C81);
    --prm-teal: var(--ox-secondary, #2C9AB7);
    --prm-gold: var(--ox-accent, #F7B733);
    --prm-soft: var(--ox-gray-50, #f8fafc);
    --prm-line: var(--ox-gray-200, #e2e8f0);
    --prm-muted: var(--ox-gray-500, #64748b);
    --prm-danger: var(--ox-danger, #EF4444);
    --prm-radius: 18px;
    position: fixed; top: 0; right: 0; bottom: 0; left: 0;
    z-index: 1300;
    display: flex; align-items: flex-end; justify-content: center;
    font-family: var(--ox-font-body, 'Plus Jakarta Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif);
    color: var(--ox-gray-800, #1e293b);
}
.prm[hidden] { display: none; }
.prm [hidden] { display: none !important; }
.prm [lang="ar"] { font-family: 'IBM Plex Sans Arabic', 'Cairo', system-ui, sans-serif; }
html.prm-lock, html.prm-lock body { overflow: hidden; }

/* ---------- backdrop + sheet (slides up from the bottom) ---------- */
.prm__backdrop {
    position: absolute; top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(6, 11, 20, .62);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    opacity: 0; transition: opacity .35s ease;
}
.prm.is-open .prm__backdrop { opacity: 1; }

.prm__sheet {
    position: relative;
    display: flex; flex-direction: column;
    width: 100%; max-width: 900px;
    max-height: 94vh; max-height: 94dvh;
    margin-top: 48px;
    background: #fff;
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -24px 60px -12px rgba(8, 39, 66, .35);
    -webkit-transform: translateY(110%); transform: translateY(110%);
    transition: -webkit-transform .48s cubic-bezier(.16, 1, .3, 1), transform .48s cubic-bezier(.16, 1, .3, 1), opacity .35s ease;
}
.prm.is-open .prm__sheet { -webkit-transform: translateY(0); transform: translateY(0); }

@media (min-width: 768px) {
    .prm { align-items: center; padding: 24px; }
    .prm__sheet {
        margin-top: 36px;
        max-width: 900px;
        max-height: calc(100vh - 64px);
        border-radius: 28px;
        box-shadow: 0 35px 85px -15px rgba(8, 39, 66, .45), 0 0 0 1px rgba(255, 255, 255, .15) inset;
        -webkit-transform: translateY(24px) scale(.98); transform: translateY(24px) scale(.98);
        opacity: 0;
        transition: -webkit-transform .42s cubic-bezier(.16, 1, .3, 1), transform .42s cubic-bezier(.16, 1, .3, 1), opacity .35s ease;
    }
    .prm.is-open .prm__sheet {
        -webkit-transform: translateY(0) scale(1); transform: translateY(0) scale(1);
        opacity: 1;
    }
}
@media (min-width: 1200px) {
    .prm__sheet { max-width: 940px; }
}

.prm__close {
    position: absolute; top: 16px; right: 16px; z-index: 10;
    width: 38px; height: 38px; border: 0; border-radius: 50%;
    background: var(--prm-soft); color: var(--prm-ink); font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s ease, -webkit-transform .25s ease, transform .25s ease, color .2s ease;
}
.prm__close:hover {
    background: var(--ox-primary-050, #e7eef5);
    color: var(--prm-brand);
    -webkit-transform: rotate(90deg) scale(1.05); transform: rotate(90deg) scale(1.05);
}

/* ---------- header: step name · logo · step number ---------- */
.prm__head {
    display: -ms-grid; display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 16px 72px 14px 72px; /* clear of the close button, which now sits beside the step number */
    direction: ltr;
    position: relative;
}
.prm__count { text-align: right; line-height: 1; }
.prm__count-num {
    font-size: 34px; font-weight: 800; letter-spacing: -.02em;
    background: linear-gradient(135deg, var(--prm-brand), var(--prm-teal));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.prm__count-of { margin-left: 4px; font-size: 14px; font-weight: 700; color: var(--prm-muted); }

/* Transparent logos (one to three, side by side) riding over the top edge of the sheet, with an even white
   outline hugging every letter (SVG filter #prm-logo-outline in the markup) and a soft shadow below. */
.prm__defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.prm__logos {
    display: -webkit-box; display: flex;
    -webkit-box-align: center; align-items: center;
    -webkit-box-pack: center; justify-content: center;
    -ms-grid-row-align: center; align-self: center;
    margin-top: -50px; padding: 0 10px;
    min-width: 0;
    gap: 16px;
}
.prm__logo {
    display: block;
    height: 86px; width: auto; max-width: 200px;
    -o-object-fit: contain; object-fit: contain;
    border-radius: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-filter: url(#prm-logo-outline) drop-shadow(0 10px 22px rgba(8, 39, 66, .3));
    filter: url(#prm-logo-outline) drop-shadow(0 10px 22px rgba(8, 39, 66, .3));
    transition: transform .3s ease;
    -webkit-animation: prm-logo-in .7s .18s cubic-bezier(.34, 1.56, .64, 1) both;
    animation: prm-logo-in .7s .18s cubic-bezier(.34, 1.56, .64, 1) both;
}
.prm__logo:hover {
    -webkit-transform: translateY(-2px) scale(1.02); transform: translateY(-2px) scale(1.02);
}
.prm__logo + .prm__logo { margin-left: 14px; }
.prm__logo:nth-child(2) { -webkit-animation-delay: .26s; animation-delay: .26s; }
.prm__logo:nth-child(3) { -webkit-animation-delay: .34s; animation-delay: .34s; }
.prm__logos[data-logos="2"] .prm__logo { height: 76px; max-width: 160px; }
.prm__logos[data-logos="3"] .prm__logo { height: 66px; max-width: 130px; }
@-webkit-keyframes prm-logo-in { from { opacity: 0; -webkit-transform: translateY(18px) scale(.8); } to { opacity: 1; -webkit-transform: none; } }
@keyframes prm-logo-in { from { opacity: 0; transform: translateY(18px) scale(.8); } to { opacity: 1; transform: none; } }

.prm__step-name { text-align: left; line-height: 1.15; font-size: 17px; font-weight: 800; color: var(--prm-ink); }
.prm__step-kicker {
    display: block; margin-bottom: 3px;
    font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--prm-teal);
}

.prm__progress { height: 4px; margin: 0 24px; border-radius: 99px; background: var(--ox-gray-100, #f1f5f9); overflow: hidden; }
@media (min-width: 768px) { .prm__progress { margin: 0 32px; } }
.prm__progress-fill {
    display: block; height: 100%; width: 20%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--prm-brand), var(--prm-teal) 60%, var(--prm-gold));
    box-shadow: 0 0 10px rgba(44, 154, 183, .45);
    transition: width .5s cubic-bezier(.16, 1, .3, 1);
    position: relative; overflow: hidden;
}
/* a light sweep along the bar each time the step changes */
.prm__progress-fill:after {
    content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .9), rgba(255, 255, 255, 0));
    opacity: 0;
}
.prm__progress.is-glint .prm__progress-fill:after { -webkit-animation: prm-glint .8s .12s cubic-bezier(.16, 1, .3, 1) both; animation: prm-glint .8s .12s cubic-bezier(.16, 1, .3, 1) both; }
@-webkit-keyframes prm-glint { 0% { opacity: 1; left: -40%; } 100% { opacity: 0; left: 110%; } }
@keyframes prm-glint { 0% { opacity: 1; left: -40%; } 100% { opacity: 0; left: 110%; } }
.prm__progress[data-total="5"][data-step="2"] .prm__progress-fill { width: 40%; }
.prm__progress[data-total="5"][data-step="3"] .prm__progress-fill { width: 60%; }
.prm__progress[data-total="5"][data-step="4"] .prm__progress-fill { width: 80%; }
.prm__progress[data-total="5"][data-step="5"] .prm__progress-fill { width: 100%; }
.prm__progress[data-total="4"][data-step="1"] .prm__progress-fill { width: 25%; }
.prm__progress[data-total="4"][data-step="2"] .prm__progress-fill { width: 50%; }
.prm__progress[data-total="4"][data-step="3"] .prm__progress-fill { width: 75%; }
.prm__progress[data-total="4"][data-step="4"] .prm__progress-fill { width: 100%; }
.prm__progress[data-step="done"] .prm__progress-fill { width: 100%; }

/* ---------- body ---------- */
.prm__body {
    -webkit-box-flex: 1; flex: 1 1 auto; min-height: 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    padding: 20px 24px 24px;
}
@media (min-width: 768px) {
    .prm__body { padding: 24px 32px 28px; }
}
.prm__lead { margin: 0 0 20px; font-size: 15px; color: var(--prm-muted); line-height: 1.5; }
.prm__lead [lang="ar"] { display: block; margin-top: 3px; font-size: 14px; color: var(--prm-ink); }
.prm__subhead { margin: 24px 0 12px; font-size: 16px; font-weight: 800; color: var(--prm-ink); }
.prm__subhead i { color: var(--prm-teal); margin-right: 6px; }

/* ---------- step transitions ----------
   Modern, fluid transition with subtle scale, silky slide, and staggered cascade for contents. */
.prm__step.is-leaving {
    -webkit-animation: prm-out .22s cubic-bezier(.4, 0, 1, 1) both;
    animation: prm-out .22s cubic-bezier(.4, 0, 1, 1) both;
    pointer-events: none;
}
.prm__step.is-leaving.is-back {
    -webkit-animation-name: prm-out-back;
    animation-name: prm-out-back;
}
.prm__step.is-entering {
    -webkit-animation: prm-in .48s cubic-bezier(.16, 1, .3, 1) both;
    animation: prm-in .48s cubic-bezier(.16, 1, .3, 1) both;
}
.prm__step.is-entering.is-back {
    -webkit-animation-name: prm-in-back;
    animation-name: prm-in-back;
}
.prm__step.is-entering > * {
    -webkit-animation: prm-rise .52s cubic-bezier(.16, 1, .3, 1) both;
    animation: prm-rise .52s cubic-bezier(.16, 1, .3, 1) both;
}
.prm__step.is-entering > :nth-child(2) { -webkit-animation-delay: .04s; animation-delay: .04s; }
.prm__step.is-entering > :nth-child(3) { -webkit-animation-delay: .08s; animation-delay: .08s; }
.prm__step.is-entering > :nth-child(4) { -webkit-animation-delay: .12s; animation-delay: .12s; }
.prm__step.is-entering > :nth-child(5) { -webkit-animation-delay: .16s; animation-delay: .16s; }
.prm__step.is-entering > :nth-child(n+6) { -webkit-animation-delay: .20s; animation-delay: .20s; }
.prm__step.is-entering .prm-card {
    -webkit-animation: prm-card-in .56s cubic-bezier(.16, 1, .3, 1) both;
    animation: prm-card-in .56s cubic-bezier(.16, 1, .3, 1) both;
}
.prm__step.is-entering .prm-card:nth-child(2) { -webkit-animation-delay: .08s; animation-delay: .08s; }
.prm__step.is-entering .prm-card:nth-child(n+3) { -webkit-animation-delay: .16s; animation-delay: .16s; }

@-webkit-keyframes prm-out {
    to { opacity: 0; -webkit-transform: translateX(-24px) scale(.98); -webkit-filter: blur(2px); }
}
@keyframes prm-out {
    to { opacity: 0; transform: translateX(-24px) scale(.98); filter: blur(2px); }
}
@-webkit-keyframes prm-out-back {
    to { opacity: 0; -webkit-transform: translateX(24px) scale(.98); -webkit-filter: blur(2px); }
}
@keyframes prm-out-back {
    to { opacity: 0; transform: translateX(24px) scale(.98); filter: blur(2px); }
}
@-webkit-keyframes prm-in {
    from { opacity: 0; -webkit-transform: translateX(32px) scale(.98); -webkit-filter: blur(3px); }
    to { opacity: 1; -webkit-transform: none; -webkit-filter: none; }
}
@keyframes prm-in {
    from { opacity: 0; transform: translateX(32px) scale(.98); filter: blur(3px); }
    to { opacity: 1; transform: none; filter: none; }
}
@-webkit-keyframes prm-in-back {
    from { opacity: 0; -webkit-transform: translateX(-32px) scale(.98); -webkit-filter: blur(3px); }
    to { opacity: 1; -webkit-transform: none; -webkit-filter: none; }
}
@keyframes prm-in-back {
    from { opacity: 0; transform: translateX(-32px) scale(.98); filter: blur(3px); }
    to { opacity: 1; transform: none; filter: none; }
}
@-webkit-keyframes prm-rise {
    from { opacity: 0; -webkit-transform: translateY(14px); }
    to { opacity: 1; -webkit-transform: none; }
}
@keyframes prm-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
@-webkit-keyframes prm-card-in {
    from { opacity: 0; -webkit-transform: translateY(20px) scale(.97); }
    to { opacity: 1; -webkit-transform: none; }
}
@keyframes prm-card-in {
    from { opacity: 0; transform: translateY(20px) scale(.97); }
    to { opacity: 1; transform: none; }
}

/* header: the step number and name roll in from below on every change */
.prm__count-num, #prm-step-name { display: inline-block; }
.prm__count-num.is-swap, #prm-step-name.is-swap {
    -webkit-animation: prm-roll .45s cubic-bezier(.16, 1, .3, 1) both;
    animation: prm-roll .45s cubic-bezier(.16, 1, .3, 1) both;
}
@-webkit-keyframes prm-roll {
    from { opacity: 0; -webkit-transform: translateY(50%); }
    to { opacity: 1; -webkit-transform: none; }
}
@keyframes prm-roll {
    from { opacity: 0; transform: translateY(50%); }
    to { opacity: 1; transform: none; }
}

/* ---------- fields ---------- */
.prm__grid { display: -ms-grid; display: grid; grid-template-columns: 1fr; grid-gap: 16px 20px; gap: 16px 20px; }
@media (min-width: 560px) {
    .prm__grid { grid-template-columns: 1fr 1fr; }
    .prm__field--wide { grid-column: 1 / -1; }
}
.prm__field { min-width: 0; }
.prm__field + .prm__field { margin-top: 0; }
.prm__step > .prm__field { margin-top: 20px; }
.prm__field label, .prm__label {
    display: block; margin-bottom: 7px;
    font-size: 13.5px; font-weight: 700; color: var(--prm-ink);
}
.prm__field label [lang="ar"], .prm__label [lang="ar"] { font-weight: 500; color: var(--prm-muted); }
.prm__field input[type="text"], .prm__field input[type="tel"], .prm__field input[type="email"],
.prm__field input[type="number"], .prm__field select, .prm__field textarea, .prm__dob select {
    display: block; width: 100%; min-height: 48px;
    padding: 11px 14px;
    font: inherit; font-size: 15px; color: var(--ox-gray-800, #1e293b);
    background: var(--prm-soft);
    border: 1.5px solid var(--prm-line); border-radius: 14px;
    -webkit-appearance: none; appearance: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.prm__field select, .prm__dob select {
    padding-right: 34px;
    background-image: linear-gradient(45deg, transparent 50%, var(--prm-muted) 50%), linear-gradient(135deg, var(--prm-muted) 50%, transparent 50%);
    background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
    background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.prm__field textarea { min-height: 84px; resize: vertical; }
.prm__field input:focus, .prm__field select:focus, .prm__field textarea:focus, .prm__dob select:focus {
    outline: none; background: #fff; border-color: var(--prm-teal);
    box-shadow: 0 0 0 4px rgba(44, 154, 183, .16);
}
.prm__dob { display: -ms-grid; display: grid; grid-template-columns: .8fr 1fr 1fr; grid-gap: 8px; gap: 8px; }
.prm__field.is-invalid input, .prm__field.is-invalid select, .prm__field.is-invalid textarea,
.prm__field.is-invalid .prm__dob select, .prm__field.is-invalid .prm__upload { border-color: var(--prm-danger); background: #fff5f5; }
.prm__field.is-invalid .prm__chips .prm__chip span, .prm__field.is-invalid .prm__segmented span { border-color: var(--prm-danger); }
.prm__msg { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--prm-danger); }
.prm__hint { display: block; margin-top: 6px; font-size: 12.5px; color: var(--prm-muted); }

/* segmented yes/no + chips (radio inputs styled as pills) */
.prm__segmented { display: -ms-grid; display: grid; grid-template-columns: 1fr 1fr; grid-gap: 10px; gap: 10px; max-width: 360px; }
.prm__segmented label, .prm__chip { position: relative; margin: 0; cursor: pointer; }
.prm__segmented input, .prm__chip input, .prm-card input, .prm-method input {
    position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}
.prm__segmented span, .prm__chip span {
    display: block; padding: 11px 16px; text-align: center;
    font-size: 14px; font-weight: 700; color: var(--prm-ink);
    background: #fff; border: 1.5px solid var(--prm-line); border-radius: 14px;
    transition: background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.prm__segmented input:checked + span, .prm__chip input:checked + span {
    color: #fff; border-color: transparent;
    background: linear-gradient(135deg, var(--prm-brand), var(--prm-teal));
    box-shadow: 0 10px 22px -10px rgba(15, 76, 129, .7);
}
.prm__segmented input:focus + span, .prm__chip input:focus + span { box-shadow: 0 0 0 4px rgba(44, 154, 183, .2); }
.prm__chips { display: -webkit-box; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; margin: -4px; }
.prm__chip { margin: 4px; }
.prm__chip span { min-width: 64px; }
.prm__chips--wide .prm__chip { -webkit-box-flex: 1; flex: 1 1 200px; }
.prm__chip.is-disabled { opacity: .45; pointer-events: none; }

.prm__guardian {
    margin-top: 22px; padding: 16px 20px 20px;
    border-radius: 20px; background: var(--ox-accent-050, #fef6e4);
    border: 1px dashed rgba(247, 183, 51, .7);
}

/* ---------- program cards ----------
   The poster stands beside the details at its own 4:5 proportions (programme posters are portrait,
   with their own text on them), so it is never cut into a strip. Phones show it as a thumbnail
   beside the title. Status chip, title and description sit on white, in the page's ink. */
.prm__programs { display: -ms-grid; display: grid; grid-template-columns: 1fr; grid-gap: 16px; gap: 16px; margin-bottom: 24px; }
@media (min-width: 860px) { .prm__programs.has-many { grid-template-columns: 1fr 1fr; } }

.prm-card {
    position: relative; display: -webkit-box; display: flex; -webkit-box-align: stretch; align-items: stretch;
    margin: 0; cursor: pointer;
    border-radius: 22px; overflow: hidden; background: #fff;
    border: 1.5px solid var(--prm-line);
    box-shadow: 0 10px 30px -18px rgba(15, 76, 129, .35);
    transition: -webkit-transform .3s cubic-bezier(.16, 1, .3, 1), transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s ease, border-color .3s ease;
}
.prm-card:hover {
    -webkit-transform: translateY(-3px); transform: translateY(-3px);
    box-shadow: 0 20px 45px -18px rgba(15, 76, 129, .5);
}
.prm-card.is-selected {
    border-color: transparent;
    box-shadow: 0 0 0 3px var(--prm-gold), 0 0 0 5.5px var(--prm-brand), 0 22px 45px -18px rgba(15, 76, 129, .65);
}
.prm-card.is-closed { cursor: not-allowed; background: #fcfcfd; }
.prm-card.is-closed:hover { -webkit-transform: none; transform: none; box-shadow: 0 10px 30px -18px rgba(15, 76, 129, .35); }
.prm-card.is-closed .prm-card__media img { -webkit-filter: grayscale(.85); filter: grayscale(.85); opacity: .7; }

/* poster column: width fixed, height from padding (4:5) — no aspect-ratio for older browsers */
.prm-card__media {
    position: relative; -webkit-box-flex: 0; flex: 0 0 34%; max-width: 250px; min-width: 170px;
    overflow: hidden; background: linear-gradient(135deg, var(--prm-brand), var(--prm-teal));
}
.prm-card__media::before { content: ''; display: block; padding-top: 125%; }
.prm-card__media img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center top;
    transition: -webkit-transform .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
}
.prm-card:hover .prm-card__media img { -webkit-transform: scale(1.04); transform: scale(1.04); }
.prm-card.is-closed:hover .prm-card__media img { -webkit-transform: none; transform: none; }
.prm-card__ph {
    position: absolute; top: 50%; left: 50%; font-size: 44px; color: rgba(255, 255, 255, .55);
    -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);
}

.prm-card__check {
    position: absolute; top: 12px; left: 12px; z-index: 3;
    width: 34px; height: 34px; border-radius: 50%;
    display: -webkit-box; display: flex; align-items: center; justify-content: center;
    font-size: 17px; color: var(--prm-ink); background: var(--prm-gold);
    box-shadow: 0 6px 16px -2px rgba(247, 183, 51, .6);
    -webkit-transform: scale(0); transform: scale(0);
    transition: -webkit-transform .3s cubic-bezier(.34, 1.56, .64, 1), transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.prm-card.is-selected .prm-card__check { -webkit-transform: scale(1); transform: scale(1); }

.prm-card__body {
    -webkit-box-flex: 1; flex: 1 1 auto; min-width: 0;
    display: -webkit-box; display: flex; -webkit-box-orient: vertical; flex-direction: column; align-items: flex-start;
    padding: 18px 20px 20px;
}
.prm-card__status {
    display: inline-block; margin-bottom: 10px; padding: 5px 12px; border-radius: 99px;
    font-size: 12px; font-weight: 800; line-height: 1.3; color: #0f5132; background: #e4f7ec;
}
.prm-card__status::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #22C55E; vertical-align: 1px; }
.prm-card.is-closed .prm-card__status { color: #842029; background: #fdecec; }
.prm-card.is-closed .prm-card__status::before { background: var(--prm-danger); }

.prm-card__title {
    margin: 0 0 6px; font-size: 20px; font-weight: 800; line-height: 1.3; color: var(--prm-ink);
    letter-spacing: -.01em; overflow-wrap: anywhere;
}
.prm-card__sub {
    margin: 0 0 12px; font-size: 13.5px; color: var(--prm-muted); line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.prm-card__facts { display: -webkit-box; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; margin: -3px -3px 14px; padding: 0; list-style: none; }
.prm-card__facts li {
    margin: 3px; padding: 5px 11px; border-radius: 99px;
    font-size: 12px; font-weight: 700; color: var(--prm-ink); background: var(--ox-primary-050, #e7eef5);
}
.prm-card__facts i { margin-right: 4px; color: var(--prm-teal); }

/* price row sits at the foot of the column */
.prm-card__price {
    display: -webkit-box; display: flex; align-items: center; -ms-flex-wrap: wrap; flex-wrap: wrap;
    width: 100%; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--prm-line);
}
.prm-card__total { display: inline-block; margin-right: 10px; white-space: nowrap; }
.prm-card__amount {
    font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--prm-ink);
    background: linear-gradient(transparent 62%, rgba(247, 183, 51, .55) 62%);
}
.prm-card__cur { margin-left: 6px; font-size: 14px; font-weight: 800; color: var(--prm-muted); }
.prm-card__first {
    margin: 6px 0; padding: 5px 10px; border-radius: 10px;
    font-size: 12px; font-weight: 700; color: #7a5300; background: var(--ox-accent-050, #fef6e4);
}
.prm-card__lines { width: 100%; margin: 10px 0 0; padding: 0; list-style: none; }
.prm-card__lines li { display: -webkit-box; display: flex; justify-content: space-between; padding: 3px 0; font-size: 13px; color: var(--ox-gray-600, #475569); }
.prm-card__lines b { margin-left: 12px; white-space: nowrap; color: var(--prm-ink); }
.prm-card__warn {
    display: -webkit-box; display: flex; align-items: flex-start;
    width: 100%; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px;
    font-size: 13px; font-weight: 600; line-height: 1.6; color: #842029; background: #fdecec;
}
.prm-card__warn i { margin-right: 8px; margin-top: 2px; }
.prm-card__warn span { -webkit-box-flex: 1; flex: 1 1 auto; min-width: 0; }

/* two programs side by side: poster on top, cut at 16:10 from the top of the poster */
.prm__programs.has-many .prm-card { -webkit-box-orient: vertical; flex-direction: column; }
.prm__programs.has-many .prm-card__media { -webkit-box-flex: 0; flex: 0 0 auto; max-width: none; min-width: 0; }
.prm__programs.has-many .prm-card__media::before { padding-top: 62.5%; }

/* phones: a thumbnail beside the chip and title, the details full width below */
@media (max-width: 559.98px) {
    .prm-card, .prm__programs.has-many .prm-card { display: block; }
    .prm-card__media, .prm__programs.has-many .prm-card__media {
        float: left; width: 92px; min-width: 0; max-width: none; margin: 16px 14px 6px 16px; border-radius: 14px;
    }
    .prm-card__media::before, .prm__programs.has-many .prm-card__media::before { padding-top: 125%; }
    .prm-card__check { top: 6px; left: 6px; width: 28px; height: 28px; font-size: 14px; }
    .prm-card__ph { font-size: 30px; }
    .prm-card__body { display: block; padding: 16px 16px 18px; }
    .prm-card__title { font-size: 18px; }
    .prm-card__sub { clear: both; padding-top: 6px; }
    .prm-card__facts { clear: both; }
    .prm-card__price { clear: both; }
}

/* ---------- payment ---------- */
.prm__due {
    display: -webkit-box; display: flex; align-items: center; -ms-flex-wrap: wrap; flex-wrap: wrap;
    margin-bottom: 20px; padding: 16px 20px; border-radius: 20px;
    color: #fff; background: linear-gradient(135deg, var(--ox-primary-800, #082742), var(--prm-brand) 60%, var(--prm-teal));
    box-shadow: 0 12px 28px -10px rgba(8, 39, 66, .4);
}
.prm__due-label { -webkit-box-flex: 1; flex: 1 1 auto; font-size: 13.5px; opacity: .88; }
.prm__due-label strong { display: block; font-size: 17px; opacity: 1; margin-bottom: 2px; }
.prm__due-amount { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.prm__due-amount small { font-size: 13px; margin-left: 4px; opacity: .8; }

.prm__methods { display: -ms-grid; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-gap: 12px; gap: 12px; margin-bottom: 16px; }
.prm-method { position: relative; display: block; margin: 0; cursor: pointer; }
.prm-method span {
    display: -webkit-box; display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 94px; padding: 12px; text-align: center;
    font-size: 13px; font-weight: 700; color: var(--prm-ink);
    background: #fff; border: 1.5px solid var(--prm-line); border-radius: 16px;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.prm-method img { display: block; max-width: 110px; max-height: 38px; margin-bottom: 8px; object-fit: contain; }
.prm-method i { display: block; margin-bottom: 6px; font-size: 26px; color: var(--prm-teal); }
.prm-method input:checked + span { border-color: var(--prm-brand); box-shadow: 0 0 0 3px rgba(15, 76, 129, .18); }
.prm__creds { margin-bottom: 18px; padding: 14px; border-radius: 20px; background: var(--prm-soft); border: 1px solid var(--prm-line); }
.prm-cred { display: -webkit-box; display: flex; align-items: center; padding: 8px 6px; border-bottom: 1px dashed var(--prm-line); direction: ltr; }
.prm-cred:last-child { border-bottom: 0; }
.prm-cred__label { min-width: 120px; font-size: 12.5px; font-weight: 700; color: var(--prm-muted); }
.prm-cred__value { -webkit-box-flex: 1; flex: 1 1 auto; font-weight: 800; color: var(--prm-ink); word-break: break-all; }
.prm-cred__copy {
    margin-left: 8px; padding: 6px 10px; border: 0; border-radius: 10px; cursor: pointer;
    font-size: 12px; font-weight: 700; color: var(--prm-brand); background: var(--ox-primary-050, #e7eef5);
}
.prm-cred__copy.is-done { color: #0f5132; background: #d1f2df; }

.prm__upload {
    position: relative; display: -webkit-box; display: flex; align-items: center; justify-content: center;
    min-height: 74px; padding: 14px; cursor: pointer;
    font-size: 14px; font-weight: 700; color: var(--prm-brand);
    border: 2px dashed rgba(44, 154, 183, .55); border-radius: 16px; background: rgba(44, 154, 183, .06);
    transition: background .2s ease, border-color .2s ease;
}
.prm__upload:hover { background: rgba(44, 154, 183, .12); }
.prm__upload i { margin-right: 10px; font-size: 24px; }
.prm__upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.prm__upload.has-file { color: #0f5132; border-color: #22C55E; background: #effaf3; }

/* ---------- review + terms ---------- */
.prm__review {
    display: -ms-grid; display: grid; grid-template-columns: auto 1fr; grid-gap: 10px 18px; gap: 10px 18px;
    margin: 0 0 22px; padding: 18px 22px; border-radius: 20px;
    background: var(--prm-soft); border: 1px solid var(--prm-line);
}
.prm__review dt { font-size: 13px; font-weight: 700; color: var(--prm-muted); }
.prm__review dd { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--prm-ink); word-break: break-word; }
.prm__agree {
    display: -webkit-box; display: flex; align-items: flex-start; margin-top: 20px; padding: 16px 20px; cursor: pointer;
    border-radius: 20px; background: #fff; border: 1.5px solid var(--prm-line);
    border-left: 4px solid var(--prm-gold);
}
.prm__agree input { -ms-flex-negative: 0; flex-shrink: 0; width: 22px; height: 22px; margin: 2px 12px 0 0; accent-color: var(--prm-brand); }
.prm__agree strong { display: block; margin-bottom: 4px; font-size: 14.5px; color: var(--prm-ink); }
.prm__agree a { color: var(--prm-brand); text-decoration: underline; }
.prm__agree [lang="ar"] { display: block; font-size: 13px; color: var(--prm-muted); }
.prm__agree.is-invalid { border-color: var(--prm-danger); }

/* ---------- notices, error bar, done ---------- */
.prm__notice {
    display: -webkit-box; display: flex; align-items: flex-start;
    margin-bottom: 16px; padding: 14px 16px; border-radius: var(--prm-radius);
    font-size: 14px; color: #842029; background: #fdecec;
}
.prm__notice i { margin-right: 10px; font-size: 20px; }
.prm__notice p { margin: 0; }
.prm__notice--soft { color: var(--prm-ink); background: var(--ox-primary-050, #e7eef5); }
/* every seat is booked: amber, not the red "closed" */
.prm__notice.is-full { color: #7a4b00; background: #fff6e0; border: 1px solid #f6d58a; }
.prm__notice p { line-height: 1.7; }
.prm__notice-title { display: block; margin-bottom: 6px; font-weight: 800; }
.prm__notice-ar { display: block; text-align: right; }
.prm__notice--soft [lang="ar"] { display: block; margin-top: 4px; }

/* registration closed — the card that replaces the form (margins, not flex gap: old mobile Safari) */
.prm__closed {
    --prm-tone: #c0392b; --prm-tone-bg: #fdecec; --prm-tone-line: #f6d3d3; --prm-tone-tint: #fff8f8;
    display: -webkit-box; display: flex; align-items: flex-start;
    margin: 4px 0 16px; padding: 22px 24px; border-radius: 22px;
    background: linear-gradient(135deg, var(--prm-tone-tint) 0%, #fff 70%);
    border: 1px solid var(--prm-tone-line);
    box-shadow: 0 10px 30px -18px rgba(10, 50, 88, .35);
}
.prm__closed.is-time,
.prm__closed.is-day { --prm-tone: var(--prm-brand); --prm-tone-bg: var(--ox-primary-050, #e7eef5); --prm-tone-line: #d5e3f0; --prm-tone-tint: #f3f8fc; }
.prm__closed.is-full { --prm-tone: #b7791f; --prm-tone-bg: #ffefc7; --prm-tone-line: #f6d58a; --prm-tone-tint: #fffaf0; }
.prm__closed-icon {
    -ms-flex-negative: 0; flex-shrink: 0;
    display: -webkit-inline-box; display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; margin-right: 18px; border-radius: 18px;
    font-size: 24px; color: var(--prm-tone); background: var(--prm-tone-bg);
    box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .55);
}
.prm__closed-body { -webkit-box-flex: 1; flex: 1 1 auto; min-width: 0; }
.prm__closed-title { display: block; margin: 2px 0 6px; font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--prm-ink); }
.prm__closed-text { margin: 0 0 6px; font-size: 14px; line-height: 1.75; color: var(--prm-muted); }
.prm__closed-chips { display: -webkit-box; display: flex; flex-wrap: wrap; margin: 12px -4px 0; }
.prm__closed-chip {
    display: -webkit-inline-box; display: inline-flex; align-items: center;
    margin: 4px; padding: 8px 14px; border-radius: 999px;
    background: #fff; border: 1px solid var(--prm-line);
    font-size: 13px; color: var(--prm-ink);
}
.prm__closed-chip i { margin-right: 8px; font-size: 15px; color: var(--prm-tone); }
.prm__closed-chip small { margin-right: 8px; font-size: 11.5px; font-weight: 700; color: var(--prm-muted); }
.prm__closed-chip b { font-size: 14px; font-weight: 800; letter-spacing: .01em; }
.prm__closed-next {
    display: -webkit-box; display: flex; align-items: center;
    margin-top: 14px; padding: 12px 16px; border-radius: 16px;
    background: var(--prm-tone-bg); color: var(--prm-ink);
}
.prm__closed-next > i { -ms-flex-negative: 0; flex-shrink: 0; margin-right: 12px; font-size: 18px; color: var(--prm-tone); }
.prm__closed-next b { font-size: 14px; font-weight: 800; }
@media (max-width: 575px) {
    .prm__closed { display: block; padding: 18px 16px; }
    .prm__closed-icon { width: 46px; height: 46px; margin: 0 0 12px; border-radius: 14px; font-size: 20px; }
    .prm__closed-title { font-size: 16px; }
}

.prm__error {
    margin: 0 24px; padding: 12px 16px; border-radius: 14px;
    font-size: 13.5px; font-weight: 700; color: #842029; background: #fdecec;
}
@media (min-width: 768px) { .prm__error { margin: 0 32px; } }

.prm__done { padding: 36px 12px 14px; text-align: center; }
.prm__done-mark {
    display: -webkit-inline-box; display: inline-flex; align-items: center; justify-content: center;
    width: 86px; height: 86px; margin-bottom: 18px; border-radius: 50%;
    font-size: 44px; color: #fff; background: linear-gradient(135deg, #22C55E, var(--prm-teal));
    box-shadow: 0 18px 40px -14px rgba(34, 197, 94, .7);
    -webkit-animation: prm-pop .55s cubic-bezier(.34, 1.56, .64, 1) both; animation: prm-pop .55s cubic-bezier(.34, 1.56, .64, 1) both;
}
.prm__done h3 { margin: 0 0 10px; font-size: 24px; font-weight: 800; color: var(--prm-ink); }
.prm__done p { margin: 0 auto 24px; max-width: 480px; font-size: 15px; color: var(--prm-muted); line-height: 1.5; }
@-webkit-keyframes prm-pop { from { -webkit-transform: scale(.3); opacity: 0; } to { -webkit-transform: none; opacity: 1; } }
@keyframes prm-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- footer ---------- */
.prm__foot {
    display: -webkit-box; display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--prm-line); background: #fff;
    border-radius: 0 0 28px 28px;
}
@media (min-width: 768px) {
    .prm__foot { padding: 18px 32px; }
}
.prm__btn {
    display: -webkit-inline-box; display: inline-flex; align-items: center; justify-content: center;
    min-height: 50px; padding: 12px 24px; border: 0; border-radius: 16px; cursor: pointer;
    font: inherit; font-size: 15px; font-weight: 800;
    transition: -webkit-transform .2s ease, transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.prm__btn i { margin: 0 6px; }
.prm__btn--primary {
    margin-left: auto; color: #fff;
    background: linear-gradient(135deg, var(--prm-brand), var(--prm-teal));
    box-shadow: 0 14px 28px -14px rgba(15, 76, 129, .8);
}
.prm__btn--primary:hover { -webkit-transform: translateY(-2px); transform: translateY(-2px); }
.prm__btn--primary.is-submit { color: var(--prm-ink); background: linear-gradient(135deg, var(--prm-gold), #f9912b); }
.prm__btn--ghost { color: var(--prm-ink); background: var(--prm-soft); }
.prm__btn[disabled] { opacity: .6; cursor: progress; }
.prm__btn.is-busy::after {
    content: ''; width: 16px; height: 16px; margin-left: 10px; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent;
    -webkit-animation: prm-spin .7s linear infinite; animation: prm-spin .7s linear infinite;
}
@-webkit-keyframes prm-spin { to { -webkit-transform: rotate(360deg); } }
@keyframes prm-spin { to { transform: rotate(360deg); } }

/* ---------- test appointments (date cards) ---------- */
.prm__sessions { display: -ms-grid; display: grid; grid-template-columns: 1fr; grid-gap: 12px; gap: 12px; }
@media (min-width: 560px) { .prm__sessions { grid-template-columns: 1fr 1fr; } }
.prm-session {
    position: relative;
    display: -webkit-box; display: flex; -webkit-box-align: center; align-items: center;
    padding: 12px 44px 12px 12px;
    border: 1.5px solid var(--prm-line); border-radius: 18px;
    background: #fff; cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, -webkit-transform .2s ease, transform .2s ease;
}
.prm-session > input { position: absolute; opacity: 0; pointer-events: none; }
.prm-session:hover { border-color: var(--prm-teal); -webkit-transform: translateY(-2px); transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(15, 76, 129, .55); }
.prm-session.is-selected { border-color: var(--prm-brand); box-shadow: 0 0 0 3px rgba(15, 76, 129, .12), 0 16px 34px -20px rgba(15, 76, 129, .6); }
.prm-session.is-full { cursor: not-allowed; opacity: .55; }
.prm-session.is-full:hover { -webkit-transform: none; transform: none; box-shadow: none; border-color: var(--prm-line); }
.prm-session__date {
    -ms-flex-negative: 0; flex-shrink: 0;
    display: -webkit-box; display: flex; -webkit-box-orient: vertical; flex-direction: column; -webkit-box-align: center; align-items: center; -webkit-box-pack: center; justify-content: center;
    width: 62px; height: 66px; margin-right: 14px;
    border-radius: 14px; color: #fff; line-height: 1;
    background: linear-gradient(150deg, var(--prm-brand), var(--prm-teal));
}
.prm-session.is-selected .prm-session__date { background: linear-gradient(150deg, var(--prm-gold), #f59e0b); color: var(--prm-ink); }
.prm-session__month { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.prm-session__day { margin-top: 4px; font-size: 26px; font-weight: 800; }
.prm-session__info { display: -webkit-box; display: flex; -webkit-box-orient: vertical; flex-direction: column; min-width: 0; }
.prm-session__weekday { font-size: 15px; font-weight: 800; color: var(--prm-ink); }
.prm-session__time { margin-top: 3px; font-size: 14px; font-weight: 600; color: var(--prm-muted); }
.prm-session__seats { margin-top: 5px; font-size: 12px; font-weight: 700; color: var(--prm-teal); }
.prm-session.is-full .prm-session__seats { color: #dc2626; }
.prm-session__check {
    position: absolute; top: 50%; right: 14px; width: 22px; height: 22px; margin-top: -11px;
    border: 2px solid var(--prm-line); border-radius: 50%;
    transition: border-color .2s ease, background .2s ease;
}
.prm-session.is-selected .prm-session__check { border-color: var(--prm-brand); background: var(--prm-brand); box-shadow: inset 0 0 0 4px #fff; }
/* the card is a <label> inside .prm__field: keep it a row, not the block field-label style */
.prm__sessions .prm-session { display: -webkit-box; display: flex; margin-bottom: 0; font-size: inherit; font-weight: inherit; color: inherit; }

/* phones: the logos get their own row over the sheet edge; step number and step name share the row below,
   so two or three logos never squeeze them */
@media (max-width: 479.98px) {
    .prm__sheet .prm__head { grid-template-columns: 1fr 1fr; grid-row-gap: 6px; row-gap: 6px; padding-right: 62px; }
    .prm__head .prm__logos { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
    .prm__head .prm__step-name { grid-column: 1; grid-row: 2; }
    .prm__head .prm__count { grid-column: 2; grid-row: 2; }
}

/* ---------- phones ---------- */
@media (max-width: 479.98px) {
    .prm__head { padding: 12px 48px 10px 48px; }
    .prm__count-num { font-size: 28px; }
    .prm__logos { margin-top: -38px; gap: 10px; }
    .prm__logo { height: 64px; max-width: 120px; }
    .prm__logo + .prm__logo { margin-left: 8px; }
    .prm__logos[data-logos="2"] .prm__logo { height: 52px; max-width: 90px; }
    .prm__logos[data-logos="3"] .prm__logo { height: 42px; max-width: 68px; }
    .prm__step-name { font-size: 14.5px; }
    .prm__progress { margin: 0 16px; }
    .prm__body { padding: 16px 16px 20px; }
    .prm__foot { padding-left: 16px; padding-right: 16px; }
    .prm__btn { padding: 12px 18px; }
    .prm__error { margin: 0 16px; }
    .prm__review { grid-template-columns: 1fr; }
    .prm__review dt { margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    .prm__sheet, .prm__backdrop, .prm__step, .prm__step > *, .prm-card, .prm__done-mark, .prm__logo,
    .prm__count-num, #prm-step-name, .prm__progress-fill:after { transition: none; -webkit-animation: none; animation: none; }
}

/* off-screen buffer used to copy bank details on browsers without the Clipboard API */
.prm-copy-buffer { position: fixed; top: -1000px; left: 0; width: 1px; height: 1px; opacity: 0; }

/* terms: the error sits under the text, not beside it */
.prm__agree { -ms-flex-wrap: wrap; flex-wrap: wrap; }
.prm__agree > span { -webkit-box-flex: 1; flex: 1 1 0; min-width: 0; }
.prm__agree .prm__msg { -ms-flex-preferred-size: 100%; flex-basis: 100%; margin: 8px 0 0 34px; }
