/* ==========================================================================
   Program Application Form (registration)
   Used by: resources/views/auth/register.blade.php
   Pairs with: public/css/slovacademy-layout.css (provides the shell + banner)
   ========================================================================== */

/* Long form: top-align the body instead of vertically centering */
body[data-page="program-application"] .slov-body {
    justify-content: flex-start;
    padding: 32px clamp(16px, 4vw, 56px) 56px;
    max-width: 1680px;
}

/* Use document scroll — nested overflow:hidden on the dashboard panel clips the long form. */
html:has(body[data-page="student-program-application"]),
body[data-page="student-program-application"] {
    height: auto !important;
    max-height: none !important;
    overflow: auto !important;
}

body[data-page="student-program-application"] .student-dashboard-main {
    height: auto !important;
    min-height: 100dvh;
    max-height: none !important;
    overflow: visible !important;
}

body[data-page="student-program-application"] .student-dashboard-main .content-right.student-dashboard__panel {
    overflow: visible !important;
}

body[data-page="student-program-application"] .student-dashboard-main .page-content.student-dashboard__content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible !important;
    padding: 12px clamp(16px, 3vw, 32px) 32px;
}

body[data-page="student-program-application"] .student-dashboard__apply {
    min-height: 0;
    padding-bottom: 24px;
}

body[data-page="student-program-application"] .pa-form__card {
    margin-top: 8px;
}

/* Instalment-only blocks must not reserve space when hidden (full / pay-later). */
[data-pay-card] [hidden],
[data-pa-pay-later-section][hidden] {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    border: none !important;
}

/* Locked program: looks disabled but stays readable (native disabled hides selection in some browsers). */
.pa-field__input--locked {
    pointer-events: none;
    cursor: default;
    background-color: #f3f4f6;
    color: var(--slov-text-dark, #1f2937);
}

.student-dashboard__apply-back {
    margin: 0 0 16px;
}

.student-dashboard__apply-back-link {
    color: var(--blue-normal, #1e3a8a);
    font-weight: 600;
    text-decoration: none;
}

.student-dashboard__apply-back-link:hover {
    text-decoration: underline;
}

.pa-form {
    width: 100%;
    color: var(--slov-text-dark);
}

/* ---------- Outer card wrapper ---------- */

.pa-form__card {
    background: #ffffff;
    border: 1px solid var(--slov-card-border, #e5e7eb);
    border-radius: 6px;
    padding: 32px clamp(20px, 3vw, 40px);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 12px 32px rgba(15, 23, 42, 0.08);
}

/* ---------- Header row: title + language switcher ---------- */

.pa-form__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.pa-form__heading {
    flex: 1 1 auto;
    text-align: center;
    margin: 0 auto;
}

.pa-form__heading h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--slov-text-dark);
    margin: 0 0 6px;
}

.pa-form__heading p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.pa-form__lang {
    flex: 0 0 auto;
    margin-left: auto;
}

.pa-form__lang .btn.language-switcher__toggle {
    background: var(--blue-light);
    border: 1px solid var(--blue-normal);
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 13px;
    box-shadow: none;
}

/* ---------- Form sections (accordion) ---------- */

.pa-section {
    margin-bottom: 14px;
}

.pa-section__header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--blue-normal);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease, border-radius 0.2s ease;
}

.pa-section__header:hover,
.pa-section__header:focus-visible {
    background: var(--blue-normal-hover);
    outline: none;
}

.pa-section__header[aria-expanded="true"] {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.pa-section__chevron {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.pa-section__header[aria-expanded="true"] .pa-section__chevron {
    transform: rotate(180deg);
}

.pa-section__body {
    background: #fff;
    border: 1px solid #e2e6dd;
    border-top: none;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    padding: 22px 20px;
}

/* ---------- Fields ---------- */
/* Outlined / notched floating label style: the label sits ON the input
   border at the top-left, with a white background that "notches" the border. */

.pa-field {
    position: relative;
    margin-bottom: 0;
}

.pa-field__wrap {
    position: relative;
}

.pa-field__label {
    position: absolute;
    top: -5px;
    left: 12px;
    z-index: 2;
    margin: 0;
    padding: 0 6px;
    background: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    color: #6b7280;
    letter-spacing: 0.1px;
    pointer-events: none;
}

.pa-req {
    color: #e11d48;
    margin-left: 2px;
}

.pa-field__input.form-control,
.pa-field__input.form-select,
.pa-field .pa-field__input {
    width: 100%;
    height: 50px;
    border: 1px solid #d6d8d3;
    border-radius: 6px;
    padding: 10px 14px 6px;
    font-size: 14px;
    color: var(--slov-text-dark);
    background-color: #fff;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Bootstrap's .form-select needs extra right padding for the caret arrow */
.pa-field__input.form-select {
    padding-right: 36px;
}

.pa-field__input.form-control:focus,
.pa-field__input.form-select:focus {
    border-color: var(--blue-normal);
    box-shadow: 0 0 0 3px rgba(0, 45, 98, 0.12);
    outline: none;
}

.pa-field__input--textarea {
    height: auto !important;
    min-height: 96px;
    resize: vertical;
    padding-top: 20px;
}

/* Error state — show a red border so the invalid field is obvious. */

.pa-field--error .pa-field__input.form-control,
.pa-field--error .pa-field__input.form-select,
.pa-field--phone.pa-field--error .pa-phone,
.pa-field--error .pa-field__input--stripe-iframe {
    border-color: #e11d48;
}

.pa-field--error .pa-field__input.form-control:focus,
.pa-field--error .pa-field__input.form-select:focus,
.pa-field--phone.pa-field--error .pa-phone:focus-within,
.pa-field--error .pa-field__input--stripe-iframe:focus-within {
    border-color: #e11d48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.pa-field__error {
    margin: 6px 0 0;
    font-size: 12px;
    color: #e11d48;
}

/* Parsley error list rendered inside .pa-field */
.pa-field__errors-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pa-field__errors-list .pa-field__error {
    margin-top: 4px;
}

.pa-field__errors-list .pa-field__error:first-child {   
    margin-top: 6px;
}

/* Payment radio + terms checkbox standalone error containers */
.pa-payment__error,
.pa-review__terms-errors {
    display: block;
    width: 100%;
    font-size: 12px;
    color: #e11d48;
}

.pa-payment__error .pa-field__errors-list,
.pa-review__terms-errors .pa-field__errors-list {
    margin: 0;
}

/* When Parsley fails on the radio group / terms checkbox — no red border; message only */

/* Trailing status icons (right side of input) */

.pa-field__status {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.pa-field__status svg {
    width: 18px;
    height: 18px;
}

.pa-field__status--ok {
    color: #16a34a;
}

.pa-field__status--error {
    color: #e11d48;
}

.pa-field__status--icon {
    color: #6b7280;
}

.pa-field__status {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.pa-field--valid .pa-field__status--ok,
.pa-field--phone.pa-field--valid .pa-field__status--ok {
    opacity: 1;
}

.pa-field--phone .pa-field__status {
    right: 10px;
    z-index: 2;
}

/* Autoform organization search dropdown (pay-later section) */
.pa-field--autoform .pa-autoform-combobox {
    position: relative;
}

.pa-autoform-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 2001;
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.pa-autoform-results__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}

.pa-autoform-results__item:last-child {
    border-bottom: 0;
}

.pa-autoform-results__item:hover,
.pa-autoform-results__item:focus {
    background: #f6f7f4;
}

.pa-autoform-results__name {
    font-size: 14px;
    font-weight: 600;
    color: var(--slov-text-dark, #1f2937);
}

.pa-autoform-results__meta {
    font-size: 12px;
    color: #6b7280;
}

.pa-autoform-results__address {
    font-size: 12px;
    color: #6b7280;
}

.pa-autoform-results__status {
    padding: 10px 12px;
    font-size: 13px;
    color: #6b7280;
}

.pa-autoform-notice {
    font-size: 13px;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 8px 12px;
}

/* Make sure inputs with a trailing icon have padding for it */

.pa-field--error .pa-field__input.form-control,
.pa-field__input--date {
    padding-right: 40px;
}

/* ---------- Phone number combo (country selector + input + status) ---------- */

/* Match `.pa-field__input.form-control` height (50px) so phone lines up with email, etc. */
.pa-field--phone .pa-phone {
    display: flex;
    align-items: stretch;
    height: 50px;
    min-height: 50px;
    padding: 0 !important;
    overflow: visible;
    position: relative;
    border-radius: 6px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pa-field__input--success.pa-phone {
    border-color: #d6d8d3;
}

.pa-phone__country {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: none;
    border-right: 1px solid #e2e6dd;
    padding: 0 12px;
    font-size: 14px;
    color: var(--slov-text-dark);
    cursor: pointer;
    flex-shrink: 0;
}

.pa-phone__country:hover,
.pa-phone__country:focus-visible {
    background: #f6f7f4;
    outline: none;
}

.pa-phone__flag {
    width: 22px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    overflow: hidden;
    display: block;
}

.pa-phone__caret {
    width: 10px;
    height: 10px;
    color: #6b7280;
}

.pa-phone__input {
    flex: 1 1 auto;
    border: none;
    padding: 0 36px 0 12px;
    font-size: 14px;
    color: var(--slov-text-dark);
    background: transparent;
    outline: none;
    height: 100%;
}

/* ---------- intl-tel-input integration for the registration phone field ---------- */

/* Outer wrapper must allow the absolutely-positioned country list to extend. */
.pa-field--phone {
    position: relative;
}

/* The library injects .iti as the wrapping element around the visible <input>. */
.pa-field--phone .iti {
    flex: 1 1 auto;
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 100%;
    position: relative;
}

.pa-field--phone .iti__country-container {
    position: relative;
    display: flex;
    align-items: stretch;
    border-right: 1px solid #e2e6dd;
    background: #fff;
}

.pa-field--phone .iti__selected-country {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    background: #fff;
    border: 0;
    cursor: pointer;
}

.pa-field--phone .iti__selected-country:hover,
.pa-field--phone .iti__selected-country:focus-visible {
    background: #f6f7f4;
    outline: none;
}

.pa-field--phone .iti__selected-dial-code {
    font-size: 14px;
    color: var(--slov-text-dark);
    font-weight: 500;
}

.pa-field--phone .iti__tel-input,
.pa-field--phone input.iti__tel-input[type="tel"] {
    flex: 1 1 auto;
    width: 100%;
    border: 0;
    background: transparent;
    /* intl-tel-input injects an inline `padding-left` (the measured width of
       the country selector) because its default layout positions the selector
       absolutely. We render it as a flex sibling instead, so we must override
       that inline style — hence !important. */
    padding: 0 12px !important;
    font-size: 14px;
    color: var(--slov-text-dark);
    outline: none;
    height: 100%;
}

/* Portaled country list (rendered at <body>) — keep above accordion/Bootstrap layers. */
.iti.iti--container.pa-phone-iti {
    z-index: 2000;
}

.pa-field--phone .pa-phone:focus-within {
    border-color: var(--blue-normal);
    box-shadow: 0 0 0 3px rgba(94, 109, 85, 0.12);
}

/* Make the registration date input look interactive even when read-only. */
.pa-field__input--date {
    cursor: pointer;
    background-color: #fff;
}

/* Note: the shared flatpickr theme lives in `public/css/style.css` so every
 * page (admin + registration) inherits the same calendar look. */

/* ==========================================================================
   Upload Documents
   ========================================================================== */

.pa-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    min-height: 130px;
    padding: 28px 20px;
    background : var(--blue-light);
    border: 1.5px dashed var(--blue-light-hover);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pa-dropzone:hover,
.pa-dropzone:focus-within,
.pa-dropzone--dragover {
    border-color: var(--blue-light-hover);
    background: var(--blue-light);
}

.pa-files__notice {
    margin: 12px 0 0;
    font-size: 12px;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 8px 12px;
}

.pa-dropzone__icon {
    color: #6b7280;
    margin-bottom: 8px;
}

.pa-dropzone__icon svg {
    width: 28px;
    height: 28px;
}

.pa-dropzone__title {
    font-size: 14px;
    color: var(--slov-text-dark);
    margin: 0 0 4px;
    font-weight: 500;
}

.pa-dropzone__hint {
    font-size: 12px;
    color: #9aa0a6;
    margin: 0;
}

/* ---------- File list ---------- */

.pa-files {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.pa-file {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
    border: 1px solid #e2e6dd;
    border-radius: 8px;
    padding: 12px 14px;
    min-height: 64px;
}

.pa-file__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    color: #e11d48;
    background: #fff;
}

.pa-file__icon svg {
    width: 22px;
    height: 22px;
}

.pa-file__info {
    flex: 1 1 auto;
    min-width: 0;
}

.pa-file__name {
    font-size: 13px;
    font-weight: 500;
    color: var(--slov-text-dark);
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pa-file__meta {
    font-size: 11px;
    color: #9aa0a6;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pa-file__sep {
    color: #c8ccc4;
}

.pa-file__progress {
    margin-top: 6px;
    height: 3px;
    background: #ebeee8;
    border-radius: 999px;
    overflow: hidden;
}

.pa-file__bar {
    display: block;
    height: 100%;
    background: var(--blue-normal);
    border-radius: 999px;
    transition: width 0.25s ease;
}

.pa-file__remove {
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 4px;
    color: #f97373;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.15s ease, color 0.15s ease;
    align-self: flex-start;
}

.pa-file__remove:hover,
.pa-file__remove:focus-visible {
    background: #fde7e9;
    color: #e11d48;
    outline: none;
}

.pa-file__remove svg {
    width: 16px;
    height: 16px;
    display: block;
}

.pa-file__check {
    flex-shrink: 0;
    color: var(--blue-normal);
    display: inline-flex;
    align-items: center;
    align-self: center;
}

.pa-file__check svg {
    width: 18px;
    height: 18px;
}

/* Failed state — red name + meta */
.pa-file--error .pa-file__name,
.pa-file--error .pa-file__meta {
    color: #e11d48;
}

.pa-file--error .pa-file__sep {
    color: #f5b5be;
}

.pa-file--error .pa-file__icon {
    color: #e11d48;
}

@media (max-width: 768px) {
    .pa-files {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Payment
   ========================================================================== */

.pa-payment__head {
    text-align: center;
    padding: 8px 0 18px;
}

.pa-payment__fee {
    font-size: 20px;
    font-weight: 700;
    color: var(--slov-text-dark);
    margin: 0 0 16px;
}

.pa-payment__fee span {
    margin-left: 4px;
}

/* ---------- Radio options ---------- */

.pa-payment__options {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.pa-radio {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--slov-text-dark);
    user-select: none;
}

.pa-radio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pa-radio__mark {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid #c8ccc4;
    background: #fff;
    position: relative;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pa-radio__mark::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    transform: scale(0);
    transition: transform 0.15s ease;
}

.pa-radio input:checked + .pa-radio__mark {
    border-color: var(--blue-normal);
    background: var(--blue-normal);
}

.pa-radio input:checked + .pa-radio__mark::after {
    transform: scale(1);
}

.pa-radio input:focus-visible + .pa-radio__mark {
    outline: 2px solid rgba(94, 109, 85, 0.4);
    outline-offset: 2px;
}

.pa-radio__label {
    font-weight: 400;
    color: var(--slov-text-dark);
}

/* Payment option present on the program but not allowed by `payment_configuration` */
.pa-radio.pa-radio--disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.pa-radio.pa-radio--disabled .pa-radio__mark {
    border-color: #dfe2db;
    background: #f4f5f3;
}

.pa-radio.pa-radio--disabled .pa-radio__label {
    color: #8a9086;
}

/* ---------- Promo code ---------- */

.pa-promo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 8px;
    row-gap: 6px;
    align-items: end;
    max-width: 360px;
    margin: 0 auto;
}

.pa-promo__field {
    grid-column: 1;
    grid-row: 1;
    text-align: left;
}

.pa-promo__apply {
    grid-column: 2;
    grid-row: 1;
}

.pa-promo__feedback {
    grid-column: 1;
    grid-row: 2;
    display: block;
    width: 100%;
    margin: 0;
    text-align: left;
    font-size: 12px;
    line-height: 1.4;
}

.pa-promo__feedback:empty {
    display: none;
}

.pa-promo__input-wrap {
    position: relative;
}

.pa-promo__field .pa-field__input.form-control {
    padding-right: 42px;
}

.pa-promo__valid-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    line-height: 0;
}

.pa-promo__valid-icon[hidden] {
    display: none !important;
}

.pa-promo__field--success .pa-field__input.form-control {
    border-color: #86efac;
    box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.12);
}


.pa-promo__feedback.pa-promo__feedback--error {
    color: #dc2626;
}

.pa-promo__feedback.pa-promo__feedback--success {
    color: #15803d;
}

.pa-promo .pa-promo__apply.btn {
    /* Match `.pa-field__input` (50px) so input + Apply sit on one line */
    height: 50px;
    min-height: 50px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    background-color: var(--blue-normal);
    border: 1px solid var(--blue-normal);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 0 22px;
    border-radius: 6px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pa-promo .pa-promo__apply.btn:hover,
.pa-promo .pa-promo__apply.btn:focus-visible {
    background-color: var(--blue-normal-hover);
    border-color: var(--blue-normal-hover);
    color: #fff;
    outline: none;
}

/* ---------- Summary ---------- */

.pa-summary {
    margin-top: 18px;
    border: 1px solid var(--blue-light-hover);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.pa-summary__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: var(--blue-light);
    border-bottom: 1px solid var(--blue-light-hover);
    flex-wrap: wrap;
}

.pa-summary__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--slov-text-dark);
    margin: 0;
}

.pa-summary__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #6b7280;
}

.pa-summary__divider {
    display: inline-block;
    width: 1px;
    height: 12px;
    background: #c8ccc4;
}

.pa-summary__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pa-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid #f0f1ec;
    font-size: 13px;
}

.pa-summary__row:last-child {
    border-bottom: none;
}

.pa-summary__discount-suffix {
    font-weight: 400;
    color: #64748b;
    white-space: nowrap;
}

.pa-summary__label {
    color: #5b6160;
}

.pa-summary__value {
    color: var(--slov-text-dark);
    font-weight: 500;
    white-space: nowrap;
}

.pa-summary__value--negative {
    color: var(--blue-normal-hover);
}

.pa-summary__row--total {
    background: var(--blue-light);
    font-weight: 600;
}

.pa-summary__row--total .pa-summary__label,
.pa-summary__row--total .pa-summary__value {
    color: var(--blue-normal-hover);
    font-weight: 700;
}

/* ==========================================================================
   Card Details — program summary strip at the top of the section
   ========================================================================== */

.pa-program-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: var(--blue-light);
    border: 1px solid var(--blue-light-hover);
    border-radius: 6px;
    flex-wrap: wrap;
}

.pa-program-summary__info {
    flex: 1 1 auto;
    min-width: 0;
}

.pa-program-summary__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--slov-text-dark);
    margin: 0 0 4px;
}

.pa-program-summary__meta {
    font-size: 12px;
    color: #5b6160;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pa-program-summary__sep {
    color: #c8ccc4;
}

.pa-program-summary__price {
    text-align: right;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.pa-program-summary__price-original {
    font-size: 12px;
    color: #9aa0a6;
    text-decoration: line-through;
}

.pa-program-summary__price-final {
    font-size: 18px;
    font-weight: 700;
    color: var(--blue-normal-hover);
}

@media (max-width: 576px) {
    .pa-program-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .pa-program-summary__price {
        align-items: flex-start;
        text-align: left;
    }
}

/* ==========================================================================
   Instalment schedule + instalment reminder (Card Details, instalment mode)
   ========================================================================== */

.pa-instalments {
    background: var(--blue-light);
    border: 1px solid var(--blue-light-hover);
    border-radius: 6px;
    padding: 14px 18px;
    color: var(--slov-text-dark);
}

.pa-instalments__heading {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--slov-text-dark);
}

.pa-instalments__list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: #5b6160;
}

.pa-instalments__list li {
    padding: 2px 0;
}

.pa-instalments__list strong {
    color: var(--slov-text-dark);
    font-weight: 600;
}

.pa-instalment-reminder {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--blue-light);
    border: 1px solid var(--blue-light-hover);
    border-radius: 6px;
    padding: 14px 16px;
}

.pa-instalment-reminder__icon {
    flex-shrink: 0;
    font-size: 1.15rem;
    line-height: 1.35;
    margin-top: 1px;
}

.pa-instalment-reminder__text {
    margin: 0;
    font-size: 12.5px;
    font-weight: 400;
    color: #3d4540;
    line-height: 1.55;
}

.pa-instalment-plan__total-note {
    line-height: 1.45;
}

.pa-instalment-due-today {
    background: var(--blue-light);
    border: 1px solid var(--blue-light-hover);
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 12px;
    color: var(--slov-text-dark);
}

.pa-instalment-due-today--deferred {
    background: var(--blue-light);
    border-color: var(--blue-light-hover);
}

.pa-instalment-due-today__eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blue-normal);
    margin: 0;
}

.pa-instalment-due-today--deferred .pa-instalment-due-today__eyebrow {
    color: var(--gray-normal);
}

.pa-instalment-due-today__amount {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--slov-text-dark);
    margin: 0;
    line-height: 1.2;
}

.pa-instalment-due-today__hint {
    font-size: 12.5px;
    color: #4a524c;
    line-height: 1.5;
    margin: 0;
}

.pa-instalments--schedule {
    margin-top: 0;
}

.pa-instalments__list-item--today {
    font-weight: 500;
    color: var(--slov-text-dark);
}

.pa-instalments__today-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--blue-normal);
    background: var(--yellow-normal);
    border-radius: 4px;
    vertical-align: middle;
}

/* ==========================================================================
   Terms + submit (single-page application footer)
   ========================================================================== */

.pa-review__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.pa-review__actions--single-page {
    margin-top: 20px;
    padding-top: 4px;
}

body[data-page="student-program-application"] .pa-review__actions--single-page {
    margin-top: 16px;
    padding-bottom: 8px;
}

.pa-review__terms {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--slov-text-dark);
    user-select: none;
}

.pa-review__terms input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pa-review__terms-mark {
    width: 16px;
    height: 16px;
    border: 1.5px solid #c8ccc4;
    border-radius: 3px;
    background: #fff;
    position: relative;
    flex-shrink: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pa-review__terms-mark::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.15s ease;
}

.pa-review__terms input:checked + .pa-review__terms-mark {
    background: var(--blue-normal);
    border-color: var(--blue-normal);
}

.pa-review__terms input:checked + .pa-review__terms-mark::after {
    transform: rotate(45deg) scale(1);
}

.pa-review__terms input:focus-visible + .pa-review__terms-mark {
    outline: 2px solid rgba(94, 109, 85, 0.4);
    outline-offset: 2px;
}

.pa-review__submit {
    flex-shrink: 0;
}

.pa-review__submit.is-loading,
.pa-form--submitting .pa-review__submit {
    opacity: 0.72;
    cursor: wait;
}

.pa-form--submitting {
    pointer-events: none;
}

.pa-form--submitting .pa-review__submit {
    pointer-events: none;
}

@media (max-width: 768px) {
    .pa-review__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .pa-review__submit {
        width: 100%;
    }
}

.pa-form__errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 1.25rem;
}

/* Client-side API errors (same markup as .pa-form__errors, injected by JS) */
.pa-form__errors-host:not([hidden]) {
    margin-bottom: 1.25rem;
}

.pa-form__errors-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #991b1b;
}

.pa-form__errors-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 13px;
    line-height: 1.45;
    color: #7f1d1d;
}

.pa-form__submit {
    background-color: var(--blue-normal);
    border-color: var(--blue-normal);
    color: #fff;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pa-form__submit:hover,
.pa-form__submit:focus-visible {
    background-color: var(--blue-normal-hover);
    border-color: var(--blue-normal-hover);
    color: #fff;
    outline: none;
}

/* ---------- Post-submit success panel ---------- */

.pa-form__success {
    text-align: center;
    padding: 24px 16px 8px;
}

.pa-form__success-icon {
    color: var(--blue-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.1);
    margin-bottom: 16px;
}

.pa-form__success-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--slov-text-dark);
    margin: 0 0 8px;
}

.pa-form__success-body + .pa-form__success-note {
    margin-top: 12px;
    margin-bottom:40px;
}

.pa-form__success-note {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #5b6160;
}

.pa-form__success-note--warn {
    color: #9a3412;
}

.pa-form__success-body {
    font-size: 14px;
    color: var(--slov-text);
    line-height: 1.6;
    margin: 0 auto 24px;
    max-width: 520px;
}

.pa-form__success-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    body[data-page="program-application"] .slov-body {
        padding: 20px 16px 40px;
    }

    .pa-form__card {
        padding: 20px 16px;
        border-radius: 6px;
    }

    .pa-form__top {
        flex-direction: column;
        align-items: stretch;
    }

    .pa-form__heading {
        text-align: left;
    }

    .pa-form__lang {
        margin-left: 0;
    }

    .pa-section__header {
        padding: 12px 16px;
        font-size: 14px;
    }

    .pa-section__body {
        padding: 18px 14px;
    }

    .pa-form__submit {
        width: 100%;
    }
}

/* Stripe Elements: mount divs use `.pa-field--stripe` + `.pa-field__input--stripe-iframe`. */

[data-pay-card] .pa-card-fields-row {
    margin-top: 1rem;
    overflow: visible;
}

.pa-field.pa-field--stripe {
    overflow: visible;
}

.pa-field.pa-field--stripe > .pa-field__label {
    z-index: 6;
    line-height: 1.25;
    padding-top: 1px;
    padding-bottom: 1px;
}

.pa-field--stripe .pa-field__wrap {
    position: relative;
    z-index: 4;
    overflow: visible;
}

.pa-field--stripe .pa-field__input--stripe-iframe {
    position: relative;
    z-index: 1;
    pointer-events: auto;
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    padding-top: 12px;
    padding-bottom: 8px;
    padding-left: 14px;
    padding-right: 14px;
    overflow: hidden;
}

[data-pay-card] .pa-card-fields-row > [class*='col-'] {
    min-width: 0;
}

.pa-field--stripe .pa-field__input--stripe-iframe > .StripeElement,
.pa-field--stripe .pa-field__input--stripe-iframe .StripeElement {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 24px;
}


.pa-stripe-gate-wrap{
    border-top: 1px solid lightgray;
    margin-top:6px;
}

.pa-stripe-gate-wrap.pa-field--error {

    margin-bottom: 0;
}

.pa-stripe-gate-wrap.pa-field--error #pa-stripe-parsley-errors {
    margin-top: 6px;
}

.pa-typed-documents {
    display: grid;
    gap: 1.25rem;
}

.pa-typed-documents__required-row,
.student-profile-documents__required-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

@media (max-width: 767.98px) {
    .pa-typed-documents__required-row,
    .student-profile-documents__required-row {
        grid-template-columns: 1fr;
    }
}

.pa-typed-documents__required-row .pa-dropzone,
.student-profile-documents__required-row .pa-dropzone {
    min-height: 120px;
}

.pa-upload-field--boxed {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1rem 0.875rem;
}

.pa-upload-field--boxed .pa-dropzone {
    background: #fff;
    border-color: #cbd5e1;
}

.pa-upload-field__label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--slov-text-dark, #1e293b);
}

.pa-upload-field__optional {
    font-weight: 400;
    font-size: 0.8125rem;
    color: #64748b;
}

.pa-upload-field__hint {
    margin-bottom: 0.75rem;
    font-size: 0.8125rem;
    /* line-height: 1.45; */
}

.pa-typed-documents__formats {
    margin-top: 0.875rem;
    font-size: 0.8125rem;
}

.pa-typed-document__label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    color: var(--text-primary, #111827);
}

.pa-typed-document__optional {
    font-weight: 400;
    color: var(--text-muted, #6b7280);
}

.pa-typed-document__hint {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
}

.pa-typed-document__input {
    max-width: 100%;
}

.pa-typed-document__formats,
.pa-typed-documents__intro {
    font-size: 0.875rem;
}
