/*
 * APPLY-MODAL.CSS - Shared assessment modal styles
 * Source: extracted from listings.css apply-modal section.
 */

/* Apply modal (global assessment flow) */
body.gud-modal-open {
    overflow: hidden;
}

#gud-custom-apply-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(2px);
}

#gud-custom-apply-modal[hidden] {
    display: none !important;
}

#gud-custom-apply-modal:not([hidden]) {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

#gud-custom-apply-modal .gud-modal__content {
    width: 100%;
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    position: relative;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border-radius: 0;
    box-shadow: none;
}

#gud-custom-apply-modal .ga-apply-modal__header {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    padding: calc(env(safe-area-inset-top) + 0.9rem) 0.95rem 0.85rem;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #dbe2ea;
    backdrop-filter: blur(8px);
}

#gud-custom-apply-modal .ga-apply-modal__header-main {
    min-width: 0;
    flex: 1 1 auto;
}

#gud-custom-apply-modal .gud-modal__close-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.85rem;
    height: 2.85rem;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: #334155;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

#gud-custom-apply-modal .gud-modal__close-btn:hover,
#gud-custom-apply-modal .gud-modal__close-btn:focus-visible {
    background: #e2e8f0;
    color: #111827;
}

#gud-custom-apply-modal .gud-modal__title {
    margin: 0;
    padding: 0;
    font-size: clamp(1.06rem, 4.8vw, 1.3rem);
    line-height: 1.3;
    letter-spacing: 0.01em;
    color: #472d6f;
}

#gud-custom-apply-modal .ga-apply-modal__description {
    margin: 0.38rem 0 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: #475569;
}

#gud-custom-apply-modal .ga-apply-modal__trust-chips {
    margin: 0.6rem 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 0.42rem;
    flex-wrap: wrap;
}

#gud-custom-apply-modal .ga-apply-modal__trust-chip {
    padding: 0.3rem 0.58rem;
    border-radius: 999px;
    border: 1px solid #dbeafe;
    background: #f0f9ff;
    color: #155e75;
    font-size: 0.72rem;
    font-weight: 600;
}

#gud-custom-apply-modal .gud-modal__body {
    padding: 0.95rem 0.85rem calc(env(safe-area-inset-bottom) + 1.1rem);
}

#gud-custom-apply-modal .applyform-container {
    font-family: "Poppins", sans-serif;
    margin: 0 auto;
    width: min(100%, 920px);
}

#gud-custom-apply-modal .applyform {
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
}

#gud-custom-apply-modal .applyform-autofillnotice {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-left: 4px solid #22c55e;
    color: #166534;
    border-radius: 14px;
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 0.8rem 0.95rem;
    display: flex;
    gap: 0.4rem;
    align-items: flex-start;
}

#gud-custom-apply-modal .applyform-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.05rem 1rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

#gud-custom-apply-modal .applyform-section__header {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.85rem;
}

#gud-custom-apply-modal .applyform-section__eyebrow {
    margin: 0;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
}

#gud-custom-apply-modal .applyform-section__body {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

#gud-custom-apply-modal .applyform-section--intro {
    border-color: #dbeafe;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

#gud-custom-apply-modal .applyform-section__title {
    margin: 0;
    font-size: 1.04rem;
    line-height: 1.4;
    font-weight: 700;
    color: #312e81 !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#gud-custom-apply-modal .applyform-section__title i {
    color: #f59e0b;
    font-size: 0.92em;
}

#gud-custom-apply-modal .applyform-section__description {
    margin: 0;
    color: #475569 !important;
    font-size: 0.87rem;
    line-height: 1.55;
}

#gud-custom-apply-modal .applyform-intro__list {
    margin: 0.85rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.55rem;
}

#gud-custom-apply-modal .applyform-intro__item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.84rem;
    color: #334155;
    line-height: 1.5;
}

#gud-custom-apply-modal .applyform-intro__item i {
    color: #0ea5e9;
    margin-top: 0.1rem;
}

#gud-custom-apply-modal .applyform-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 1fr;
}

#gud-custom-apply-modal .applyform-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

#gud-custom-apply-modal .applyform-field__label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.28rem;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.4;
    color: #1e293b !important;
}

#gud-custom-apply-modal .applyform-field__required {
    color: #dc2626;
    font-weight: 700;
}

#gud-custom-apply-modal .applyform-field__input,
#gud-custom-apply-modal .applyform-field__select,
#gud-custom-apply-modal .applyform-field__textarea {
    width: 100% !important;
    min-height: 44px;
    border: 1px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 0.68rem 0.8rem !important;
    font-size: 0.95rem !important;
    line-height: 1.45;
    color: #111827 !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

#gud-custom-apply-modal .applyform-field__input::placeholder,
#gud-custom-apply-modal .applyform-field__textarea::placeholder {
    color: #9aa4b2;
}

#gud-custom-apply-modal .applyform-field__textarea {
    min-height: 132px;
    resize: vertical;
}

#gud-custom-apply-modal .applyform-field__input:focus,
#gud-custom-apply-modal .applyform-field__select:focus,
#gud-custom-apply-modal .applyform-field__textarea:focus {
    outline: none !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18) !important;
}

#gud-custom-apply-modal .applyform-field__helpertext {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #64748b;
}

#gud-custom-apply-modal .applyform-field__errormessage {
    display: none;
    border-radius: 8px;
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    color: #991b1b !important;
    font-size: 0.8rem;
    line-height: 1.45;
    padding: 0.4rem 0.56rem;
}

#gud-custom-apply-modal .applyform-field.has-error .applyform-field__label {
    color: #991b1b !important;
}

#gud-custom-apply-modal .applyform-field.has-error .applyform-field__input,
#gud-custom-apply-modal .applyform-field.has-error .applyform-field__select,
#gud-custom-apply-modal .applyform-field.has-error .applyform-field__textarea {
    border-color: #dc2626 !important;
    background: #fef2f2 !important;
}

#gud-custom-apply-modal .applyform-field.has-error .applyform-field__errormessage {
    display: block;
}

#gud-custom-apply-modal .applyform-subsection {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.85rem 0.8rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

#gud-custom-apply-modal .applyform-subsection__header {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

#gud-custom-apply-modal .applyform-subsection__title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

#gud-custom-apply-modal .applyform-subsection__description {
    margin: 0;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.5;
}

#gud-custom-apply-modal .applyform-subsection__body {
    display: grid;
    gap: 0.85rem;
}

#gud-custom-apply-modal .applyform-checkgroup__title {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: #1e293b;
}

#gud-custom-apply-modal .applyform-checkgroup {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: 1fr;
}

#gud-custom-apply-modal .applyform-checkitem {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.6rem 0.7rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#gud-custom-apply-modal .applyform-checkitem:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

#gud-custom-apply-modal .applyform-checkitem:focus-within {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

#gud-custom-apply-modal .applyform-checkitem__input {
    width: 1.05rem !important;
    height: 1.05rem !important;
    margin: 0 !important;
    accent-color: #4f46e5 !important;
}

#gud-custom-apply-modal .applyform-checkitem__label {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.5;
    color: #1f2937;
}

#gud-custom-apply-modal .applyform-honeypot {
    display: none !important;
}

#gud-custom-apply-modal .applyform-credits-note {
    margin: 0.4rem 0 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #475569;
}

#gud-custom-apply-modal .applyform-recaptcha__note {
    font-size: 0.75rem;
    text-align: center;
    color: #64748b;
}

#gud-custom-apply-modal .applyform-actions {
    position: sticky;
    bottom: calc(env(safe-area-inset-bottom));
    z-index: 2;
    margin-top: 0.3rem;
    padding: 0.85rem 0 0.2rem;
    background: linear-gradient(180deg, rgba(238, 242, 247, 0) 0%, rgba(248, 250, 252, 0.98) 35%);
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    display: flex;
    flex-direction: column;
    gap: 0.56rem;
}

#gud-custom-apply-modal .applyform-message {
    width: 100%;
    display: none;
    border-radius: 10px;
    padding: 0.72rem 0.82rem;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.45;
}

#gud-custom-apply-modal .applyform-message--success {
    background: #ecfdf3;
    border: 1px solid #86efac;
    color: #166534;
}

#gud-custom-apply-modal .applyform-message--error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

#gud-custom-apply-modal .applyform-actions__submitbtn {
    width: 100%;
    min-height: 48px;
    border: 0 !important;
    border-radius: 999px !important;
    padding: 0.74rem 1rem !important;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important;
    color: #111827 !important;
    font-size: 0.98rem !important;
    font-weight: 700 !important;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.56rem;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(249, 115, 22, 0.28);
}

#gud-custom-apply-modal .applyform-actions__submitbtn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

#gud-custom-apply-modal .applyform-actions__submitbtn .applyform-spinner {
    display: none;
    width: 1.05rem;
    height: 1.05rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: gud-form-spin 0.8s linear infinite;
}

#gud-custom-apply-modal .applyform-actions__submitbtn.is-loading .applyform-spinner {
    display: inline-block;
}

#gud-custom-apply-modal .applyform-oneclick-apply {
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    text-align: left;
    padding: 0.95rem 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    position: relative;
}

#gud-custom-apply-modal .applyform-oneclick-apply__header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#gud-custom-apply-modal .applyform-oneclick-apply__eyebrow {
    margin: 0;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4338ca;
    font-weight: 700;
    background: #eef2ff;
    border: 1px solid #e0e7ff;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    width: fit-content;
}

#gud-custom-apply-modal .applyform-oneclick-apply__title {
    margin: 0;
    font-size: 1rem;
    color: #1e293b !important;
}

#gud-custom-apply-modal .applyform-oneclick-apply__description {
    margin: 0;
    font-size: 0.84rem;
    color: #475569 !important;
    line-height: 1.5;
}

#gud-custom-apply-modal .applyform-oneclick-apply__toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    margin-top: 0.35rem;
    padding: 0.6rem 0.7rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

#gud-custom-apply-modal .applyform-oneclick-apply__toggle-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

#gud-custom-apply-modal .applyform-oneclick-apply__toggle-label {
    font-size: 0.86rem;
    color: #0f172a;
    font-weight: 600;
}

#gud-custom-apply-modal .applyform-oneclick-apply__toggle-switch {
    position: relative;
    width: 54px;
    height: 30px;
    flex-shrink: 0;
}

#gud-custom-apply-modal .applyform-oneclick-apply__toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

#gud-custom-apply-modal .applyform-oneclick-apply__slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background-color 0.2s ease;
}

#gud-custom-apply-modal .applyform-oneclick-apply__slider::before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    top: 4px;
    left: 4px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 0.2s ease;
}

#gud-custom-apply-modal .applyform-oneclick-apply__toggle-switch input:checked + .applyform-oneclick-apply__slider {
    background: #16a34a;
}

#gud-custom-apply-modal .applyform-oneclick-apply__toggle-switch input:checked + .applyform-oneclick-apply__slider::before {
    transform: translateX(24px);
}

#gud-custom-apply-modal .applyform-oneclick-apply__expand {
    border: 1px solid #dbe2ea;
    background: #f8fafc;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

#gud-custom-apply-modal .applyform-oneclick-apply__expand:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
}

#gud-custom-apply-modal .applyform-oneclick-apply__expand:focus-visible {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

#gud-custom-apply-modal .applyform-oneclick-apply__expand i {
    transition: transform 0.2s ease;
}

#gud-custom-apply-modal .applyform-oneclick-apply__details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    pointer-events: none;
    transition: max-height 0.25s ease, opacity 0.25s ease, margin-top 0.25s ease;
}

#gud-custom-apply-modal .applyform-oneclick-apply.is-expanded .applyform-oneclick-apply__details {
    max-height: 480px;
    opacity: 1;
    margin-top: 0.65rem;
    pointer-events: auto;
}

#gud-custom-apply-modal .applyform-oneclick-apply.is-expanded .applyform-oneclick-apply__expand i {
    transform: rotate(180deg);
}

#gud-custom-apply-modal .applyform-oneclick-apply__status-area,
#gud-custom-apply-modal .applyform-oneclick-apply__benefits-loggedout {
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.75rem;
}

#gud-custom-apply-modal .applyform-oneclick-apply__benefits-loggedout h4 {
    margin: 0 0 0.46rem;
    font-size: 0.85rem;
    color: #0f172a;
}

#gud-custom-apply-modal .applyform-oneclick-apply__benefits-loggedout ul {
    margin: 0;
    padding-left: 1.1rem;
    color: #334155;
}

#gud-custom-apply-modal .applyform-oneclick-apply__benefits-loggedout li {
    font-size: 0.8rem;
    line-height: 1.5;
}

#gud-custom-apply-modal .applyform-oneclick-apply__message {
    margin: 0.6rem 0 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #475569;
}

#gud-custom-apply-modal .applyform-oneclick-apply__message--success {
    color: #166534;
    font-weight: 600;
}

#gud-custom-apply-modal .applyform-oneclick-apply__message--info {
    color: #475569;
}

#gud-custom-apply-modal .applyform-oneclick-apply__progress-bar-area {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.56rem;
}

#gud-custom-apply-modal .applyform-oneclick-apply__progress-bar-container {
    flex: 1 1 auto;
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

#gud-custom-apply-modal .applyform-oneclick-apply__progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #f97316);
    color: transparent;
}

#gud-custom-apply-modal .applyform-oneclick-apply__progress-percentage-text {
    font-size: 0.77rem;
    font-weight: 700;
    color: #0f172a;
}

#gud-custom-apply-modal .applyform-oneclick-apply__missing-fields-list {
    margin: 0.4rem 0 0;
    padding-left: 1rem;
}

#gud-custom-apply-modal .applyform-oneclick-apply__missing-fields-list li {
    font-size: 0.8rem;
    line-height: 1.45;
    color: #334155;
}

#gud-custom-apply-modal .applyform-oneclick-apply__cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.56rem;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid #dbe2ea;
    background: #eef2ff;
    color: #3730a3 !important;
    text-decoration: none !important;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 0.45rem 0.85rem;
}

#gud-custom-apply-modal .gud-tooltip-trigger {
    border: 0;
    border-radius: 999px;
    width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    color: #475569;
    cursor: pointer;
    font-size: 0.7rem;
}

#gud-custom-apply-modal .gud-tooltip-content {
    position: absolute;
    z-index: 30;
    width: min(260px, 86vw);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(4px);
    left: 50%;
    bottom: calc(100% + 8px);
    padding: 0.6rem 0.65rem;
    border-radius: 8px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 0.74rem;
    line-height: 1.45;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
}

#gud-custom-apply-modal .gud-tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
}

#gud-custom-apply-modal .gud-tooltip-content.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════
   CONFIRM OVERLAY SYSTEM
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Form blur when confirm is open ────────────────────────────── */
#gud-custom-apply-modal.ga-apply-modal--confirm-open .ga-apply-modal__header,
#gud-custom-apply-modal.ga-apply-modal--confirm-open .gud-modal__body {
    filter: blur(4px);
    opacity: 0.38;
    pointer-events: none;
    user-select: none;
    transition: filter 0.22s ease, opacity 0.22s ease;
}

/* ─── Confirm overlay backdrop ──────────────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(10, 16, 36, 0.64);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    overflow-y: auto;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

#gud-custom-apply-modal .ga-apply-modal__confirm[hidden] {
    display: none !important;
}

/* ─── Confirm card — mobile: bottom sheet ───────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: calc(100dvh - 2.5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background: #ffffff;
    border: 1px solid #dde3ef;
    border-bottom: none;
    border-radius: 24px 24px 0 0;
    box-shadow:
        0 -20px 64px rgba(15, 23, 42, 0.28),
        0 -4px 16px rgba(15, 23, 42, 0.12);
    padding: 0 1.375rem calc(env(safe-area-inset-bottom) + 1.875rem);
    display: flex;
    flex-direction: column;
    gap: 1.375rem;
    animation: ga-confirm-slidein 0.34s cubic-bezier(0.34, 1.1, 0.64, 1) both;
}

/* ─── Mobile drag handle pill ───────────────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-card::before {
    content: "";
    display: block;
    width: 48px;
    height: 5px;
    border-radius: 999px;
    background: #cbd5e1;
    margin: 0.875rem auto 0;
    flex-shrink: 0;
    pointer-events: none;
}

/* ─── Desktop gradient accent bar (hidden on mobile) ────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-card::after {
    content: "";
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3730a3 0%, #6366f1 55%, #818cf8 100%);
    border-radius: 24px 24px 0 0;
    pointer-events: none;
}

/* ─── Dismiss (×) button — all states ──────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-dismiss {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    outline: none;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-dismiss:hover {
    background: #e2e8f0;
    color: #0f172a;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-dismiss:focus-visible {
    background: #e2e8f0;
    color: #0f172a;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.32);
}

#gud-custom-apply-modal .ga-apply-modal__confirm-dismiss:active {
    background: #cbd5e1;
    color: #0f172a;
    transform: scale(0.91);
    transition-duration: 0.08s;
}

/* ─── State machine container ───────────────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-state {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-state[hidden] {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════
   STATE 0 — INITIAL
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Hero row ──────────────────────────────────────────────────── */
#gud-custom-apply-modal .ga-confirm-hero {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding-right: 3rem; /* clear dismiss button */
}

#gud-custom-apply-modal .ga-confirm-hero__icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    box-shadow:
        0 4px 14px rgba(67, 56, 202, 0.22),
        0 1px 4px rgba(67, 56, 202, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4338ca;
    font-size: 1.375rem;
}

#gud-custom-apply-modal .ga-confirm-hero__text {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    flex: 1 1 auto;
}

/* ─── Shared typography ─────────────────────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.28;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.016em;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-title--center {
    text-align: center;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-description {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.62;
    color: #475569;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-description--center {
    text-align: center;
}

/* ─── Trust list ─────────────────────────────────────────────────── */
#gud-custom-apply-modal .ga-confirm-trust-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    border: 1px solid #e9edf3;
    border-radius: 16px;
    overflow: hidden;
    background: #fafbfc;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.05);
}

#gud-custom-apply-modal .ga-confirm-trust-list__item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.9rem 1.125rem;
    font-size: 0.875rem;
    color: #334155;
    line-height: 1.5;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.12s ease;
}

#gud-custom-apply-modal .ga-confirm-trust-list__item:last-child {
    border-bottom: none;
}

/* Icon container — default */
#gud-custom-apply-modal .ga-confirm-trust-list__icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    background: #f1f5f9;
    color: #64748b;
}

/* Row 1: brand gradient hourglass (14-day progress hold) */
#gud-custom-apply-modal .ga-confirm-trust-list__icon--hold {
    background: linear-gradient(135deg, #3730a3 0%, #4338ca 45%, #5b57de 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(67, 56, 202, 0.32), 0 1px 3px rgba(67, 56, 202, 0.18);
}

/* Row 2: blue eye (review) */
#gud-custom-apply-modal .ga-confirm-trust-list__icon--eye {
    background: #eff6ff;
    color: #3b82f6;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.18);
}

/* Row 3: amber shield (expert) */
#gud-custom-apply-modal .ga-confirm-trust-list__icon--shield {
    background: #fffbeb;
    color: #d97706;
    box-shadow: 0 1px 4px rgba(217, 119, 6, 0.18);
}

#gud-custom-apply-modal .ga-confirm-trust-list__text strong {
    font-weight: 600;
    color: #0f172a;
}

/* ─── Actions container ─────────────────────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-actions {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

/* ─── Buttons — shared base ─────────────────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-btn {
    position: relative;
    width: 100%;
    min-height: 52px;
    border-radius: 999px;
    padding: 0.8125rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.008em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    outline: none;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition:
        transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.18s ease,
        background-color 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        opacity 0.15s ease;
}

/* ─── Primary button — all states ───────────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-btn--primary {
    border: none !important;
    background: linear-gradient(135deg, #3730a3 0%, #4338ca 45%, #5b57de 100%) !important;
    color: #ffffff !important;
    box-shadow:
        0 4px 20px rgba(67, 56, 202, 0.36),
        0 1px 4px rgba(67, 56, 202, 0.14);
}

#gud-custom-apply-modal .ga-apply-modal__confirm-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 28px rgba(67, 56, 202, 0.44),
        0 2px 8px rgba(67, 56, 202, 0.18);
}

#gud-custom-apply-modal .ga-apply-modal__confirm-btn--primary:focus-visible {
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.36),
        0 4px 20px rgba(67, 56, 202, 0.32);
}

#gud-custom-apply-modal .ga-apply-modal__confirm-btn--primary:active {
    transform: translateY(1px) scale(0.99);
    box-shadow:
        0 2px 10px rgba(67, 56, 202, 0.24),
        0 1px 3px rgba(67, 56, 202, 0.1);
    transition-duration: 0.08s;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-btn--primary:disabled,
#gud-custom-apply-modal .ga-apply-modal__confirm-btn--primary.is-loading {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(67, 56, 202, 0.16);
    pointer-events: none;
}

/* ─── Ghost button — all states ─────────────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-btn--ghost {
    background: #ffffff !important;
    border: 1.5px solid #dde3ef !important;
    color: #334155 !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

#gud-custom-apply-modal .ga-apply-modal__confirm-btn--ghost:hover {
    border-color: #9ca8b8 !important;
    background: #f8fafc !important;
    color: #1e293b !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.09);
    transform: translateY(-1px);
}

#gud-custom-apply-modal .ga-apply-modal__confirm-btn--ghost:focus-visible {
    border-color: #6366f1 !important;
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.2),
        0 1px 4px rgba(15, 23, 42, 0.06);
}

#gud-custom-apply-modal .ga-apply-modal__confirm-btn--ghost:active {
    background: #f1f5f9 !important;
    border-color: #b0bac6 !important;
    color: #1e293b !important;
    transform: scale(0.99);
    box-shadow: none;
    transition-duration: 0.08s;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-btn--ghost:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ─── Button loading state ──────────────────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-btn-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.15s ease;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-btn.is-loading .ga-apply-modal__confirm-btn-label {
    opacity: 0;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-btn-spinner {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: inherit;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-btn-spinner[hidden] {
    display: none !important;
}

/* ─── "Close without saving" text link — all states ────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-close-link {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0.4rem 0.625rem;
    font-size: 1.2125rem;
    font-weight: 500;
    text-decoration: underline;
    color: #94a3b8;
    cursor: pointer;
    text-align: center;
    width: 100%;
    min-height: 36px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, background-color 0.15s ease;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-close-link:hover {
    color: #475569;
    background: rgba(241, 245, 249, 0.8) !important;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-close-link:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
    color: #475569;
    border-radius: 6px;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-close-link:active {
    color: #334155;
    background: #f1f5f9 !important;
    transition-duration: 0.08s;
}

/* ─── Footer note ───────────────────────────────────────────────── */
#gud-custom-apply-modal .ga-confirm-footer-note {
    margin: -0.375rem 0 0;
    font-size: 0.79rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.55;
}

#gud-custom-apply-modal .ga-confirm-footer-note__link {
    color: #4338ca;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    outline: none;
    transition: color 0.15s ease;
}

#gud-custom-apply-modal .ga-confirm-footer-note__link:hover {
    color: #3730a3;
}

#gud-custom-apply-modal .ga-confirm-footer-note__link:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
    border-radius: 3px;
    color: #3730a3;
}

#gud-custom-apply-modal .ga-confirm-footer-note__link:active {
    color: #312e81;
}

/* ═══════════════════════════════════════════════════════════════════
   STATE 1 — RESUME (guest path: email → OTP; logged-in: one-click)
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Audience panels ───────────────────────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-guest,
#gud-custom-apply-modal .ga-apply-modal__confirm-loggedin {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-guest[hidden],
#gud-custom-apply-modal .ga-apply-modal__confirm-loggedin[hidden] {
    display: none !important;
}

/* Push title text clear of dismiss button */
#gud-custom-apply-modal .ga-apply-modal__confirm-loggedin {
    padding-right: 3rem;
}

/* ─── Substep container ─────────────────────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-substep {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
    padding-right: 3rem; /* clear dismiss button */
}

#gud-custom-apply-modal .ga-apply-modal__confirm-substep[hidden] {
    display: none !important;
}

/* ─── Step dot indicator ────────────────────────────────────────── */
#gud-custom-apply-modal .ga-confirm-step-label {
    display: flex;
    align-items: center;
    gap: 5px;
}

#gud-custom-apply-modal .ga-confirm-step-label__dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e2e8f0;
    flex-shrink: 0;
    transition:
        background-color 0.25s ease,
        width 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
        border-radius 0.25s ease;
}

#gud-custom-apply-modal .ga-confirm-step-label__dot--active {
    width: 22px;
    border-radius: 4px;
    background: #4338ca;
}

#gud-custom-apply-modal .ga-confirm-step-label__dot--done {
    background: #16a34a;
    width: 8px;
    border-radius: 50%;
}

/* ─── OTP-sent / user icon container ────────────────────────────── */
#gud-custom-apply-modal .ga-confirm-otp-sent {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    box-shadow:
        0 4px 16px rgba(67, 56, 202, 0.22),
        0 1px 4px rgba(67, 56, 202, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    color: #4338ca;
    flex-shrink: 0;
    align-self: flex-start;
}

/* Logged-in variant: green-tinted */
#gud-custom-apply-modal .ga-confirm-otp-sent--loggedin {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #86efac;
    color: #16a34a;
    box-shadow:
        0 4px 16px rgba(22, 163, 74, 0.2),
        0 1px 4px rgba(22, 163, 74, 0.1);
}

/* ─── Form field wrapper ────────────────────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

/* ─── Label ─────────────────────────────────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: 0.004em;
    line-height: 1.4;
}

/* ─── Text input — all states ───────────────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-input {
    width: 100% !important;
    min-height: 52px;
    border: 1.5px solid #dde3ef !important;
    border-radius: 14px !important;
    padding: 0.78125rem 1.125rem !important;
    font-size: 1rem !important;
    line-height: 1.4;
    color: #0f172a !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-input::placeholder {
    color: #b0bac6 !important;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-input:hover {
    border-color: #b0bac6 !important;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-input:focus {
    outline: none !important;
    border-color: #4f46e5 !important;
    background: #fafafe !important;
    box-shadow:
        0 0 0 3px rgba(79, 70, 229, 0.14),
        0 1px 4px rgba(79, 70, 229, 0.08) !important;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-input:disabled {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-input.has-error {
    border-color: #ef4444 !important;
    background: #fff8f8 !important;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-input.has-error:focus {
    box-shadow:
        0 0 0 3px rgba(239, 68, 68, 0.14),
        0 1px 4px rgba(239, 68, 68, 0.08) !important;
}

/* ─── OTP input variant ─────────────────────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-input--otp {
    font-size: 2rem !important;
    letter-spacing: 0.3em;
    text-align: center;
    font-weight: 700;
    min-height: 72px;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    font-variant-numeric: tabular-nums;
    caret-color: #4338ca;
    background: #f8f9ff !important;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-input--otp:focus {
    border-color: #4338ca !important;
    background: #f0f3ff !important;
    box-shadow:
        0 0 0 3px rgba(67, 56, 202, 0.14),
        0 1px 4px rgba(67, 56, 202, 0.08) !important;
}

/* ─── Status / feedback messages — all types ────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-status {
    border-radius: 12px;
    padding: 0.75rem 1rem 0.75rem 0.875rem;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.55;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    border-left: 3.5px solid transparent;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-status[hidden] {
    display: none !important;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-status--error {
    background: #fef2f2;
    border-color: #f87171;
    color: #991b1b;
    box-shadow: 0 1px 4px rgba(248, 113, 113, 0.14);
}

#gud-custom-apply-modal .ga-apply-modal__confirm-status--success {
    background: #f0fdf4;
    border-color: #4ade80;
    color: #065f46;
    box-shadow: 0 1px 4px rgba(74, 222, 128, 0.14);
}

#gud-custom-apply-modal .ga-apply-modal__confirm-status--info {
    background: #eff6ff;
    border-color: #818cf8;
    color: #1e40af;
    box-shadow: 0 1px 4px rgba(129, 140, 248, 0.14);
}

/* ─── Back / resend link — all states ──────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__confirm-back-link {
    background: none;
    border: none;
    padding: 0.4375rem 0.625rem;
    font-size: 0.84rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    text-align: center;
    width: 100%;
    min-height: 36px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, background-color 0.15s ease;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-back-link:hover {
    color: #334155;
    background: #f8fafc;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-back-link:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
    color: #334155;
    border-radius: 6px;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-back-link:active {
    color: #0f172a;
    background: #f1f5f9;
    transition-duration: 0.08s;
}

/* ═══════════════════════════════════════════════════════════════════
   STATE 2 — SUCCESS
   ═══════════════════════════════════════════════════════════════════ */

#gud-custom-apply-modal .ga-apply-modal__confirm-state[data-gar-state="success"] {
    align-items: center;
    text-align: center;
    gap: 1rem;
}

#gud-custom-apply-modal .ga-apply-modal__confirm-state[data-gar-state="success"] .ga-apply-modal__confirm-actions {
    width: 100%;
    align-items: center;
}

/* ─── Success ring ──────────────────────────────────────────────── */
#gud-custom-apply-modal .ga-confirm-success-ring {
    width: 84px;
    height: 84px;
    align-self: center;
    animation: ga-ring-glow 1.4s 0.6s ease forwards;
}

#gud-custom-apply-modal .ga-confirm-success-ring__svg {
    width: 84px;
    height: 84px;
    display: block;
}

#gud-custom-apply-modal .ga-confirm-success-ring__track {
    stroke: #d1fae5;
    fill: none;
}

#gud-custom-apply-modal .ga-confirm-success-ring__fill {
    stroke: #16a34a;
    fill: none;
    stroke-dasharray: 144.51;
    stroke-dashoffset: 144.51;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    animation: ga-ring-draw 0.65s 0.1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#gud-custom-apply-modal .ga-confirm-success-ring__check {
    fill: none;
    stroke: #16a34a;
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: ga-check-draw 0.35s 0.68s ease forwards;
}

/* ═══════════════════════════════════════════════════════════════════
   KEYFRAMES
   ═══════════════════════════════════════════════════════════════════ */

@keyframes ga-confirm-slidein {
    from {
        transform: translateY(48px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes ga-confirm-fadein {
    from {
        transform: translateY(10px) scale(0.97);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes ga-ring-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes ga-check-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes ga-ring-glow {
    0%   { filter: drop-shadow(0 0 0px rgba(22, 163, 74, 0)); }
    45%  { filter: drop-shadow(0 0 10px rgba(22, 163, 74, 0.42)); }
    100% { filter: drop-shadow(0 0 5px rgba(22, 163, 74, 0.22)); }
}

@keyframes gud-form-spin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — 768px+
   ═══════════════════════════════════════════════════════════════════ */

@media (min-width: 768px) {
    #gud-custom-apply-modal {
        align-items: center;
        justify-content: center;
        padding: 1rem;
    }

    #gud-custom-apply-modal .gud-modal__content {
        width: min(980px, 96vw);
        height: auto;
        max-height: 92vh;
        border-radius: 16px;
        box-shadow: 0 24px 56px rgba(15, 23, 42, 0.26);
    }

    #gud-custom-apply-modal .ga-apply-modal__header {
        padding: 1rem 1.05rem 0.95rem;
    }

    #gud-custom-apply-modal .gud-modal__body {
        padding: 1rem 1.05rem 1.2rem;
    }

    #gud-custom-apply-modal .applyform-intro__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #gud-custom-apply-modal .applyform-actions {
        position: static;
        padding: 0;
        margin-top: 0.65rem;
        background: transparent;
    }

    #gud-custom-apply-modal .applyform-actions__submitbtn {
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
    }

    #gud-custom-apply-modal .applyform-grid--2col {
        grid-template-columns: repeat(2, 1fr);
    }

    #gud-custom-apply-modal .applyform-grid--3col {
        grid-template-columns: repeat(3, 1fr);
    }

    #gud-custom-apply-modal .applyform-field--fullwidth {
        grid-column: 1 / -1;
    }

    #gud-custom-apply-modal .applyform-checkgroup {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* ── Confirm: centered floating card ─────────────────────────── */
    #gud-custom-apply-modal .ga-apply-modal__confirm {
        align-items: center;
        padding: 2rem 1.5rem;
    }

    #gud-custom-apply-modal .ga-apply-modal__confirm-card {
        width: min(520px, 92vw);
        max-height: calc(100vh - 4rem);
        border-radius: 24px;
        border: 1px solid #dde3ef;
        border-bottom: 1px solid #dde3ef;
        box-shadow:
            0 32px 80px rgba(15, 23, 42, 0.3),
            0 8px 28px rgba(15, 23, 42, 0.12);
        padding: 2.25rem 2.25rem 2rem;
        gap: 1.5rem;
        animation: ga-confirm-fadein 0.28s ease-out both;
    }

    /* Show accent bar, hide drag handle */
    #gud-custom-apply-modal .ga-apply-modal__confirm-card::before {
        display: none;
    }

    #gud-custom-apply-modal .ga-apply-modal__confirm-card::after {
        display: block;
    }

    /* Dismiss button position on desktop */
    #gud-custom-apply-modal .ga-apply-modal__confirm-dismiss {
        top: 1.25rem;
        right: 1.25rem;
    }

    /* Hero icon larger on desktop */
    #gud-custom-apply-modal .ga-confirm-hero__icon {
        width: 60px;
        height: 60px;
    }

    /* State 0: "Save" + "Continue" side by side; "Close" full-width below */
    #gud-custom-apply-modal .ga-apply-modal__confirm-state[data-gar-state="initial"] .ga-apply-modal__confirm-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.625rem;
    }

    #gud-custom-apply-modal .ga-apply-modal__confirm-state[data-gar-state="initial"] .ga-apply-modal__confirm-btn {
        flex: 1 1 0;
        min-width: 0;
    }

    #gud-custom-apply-modal .ga-apply-modal__confirm-state[data-gar-state="initial"] .ga-apply-modal__confirm-close-link {
        flex: 0 0 100%;
    }

    /* State 2: success actions centered row */
    #gud-custom-apply-modal .ga-apply-modal__confirm-state[data-gar-state="success"] .ga-apply-modal__confirm-actions {
        flex-direction: row;
        justify-content: center;
        gap: 0.75rem;
    }

    #gud-custom-apply-modal .ga-apply-modal__confirm-state[data-gar-state="success"] .ga-apply-modal__confirm-btn,
    #gud-custom-apply-modal .ga-apply-modal__confirm-state[data-gar-state="success"] .ga-apply-modal__confirm-close-link {
        flex: 0 0 auto;
        width: auto;
        min-width: 140px;
    }

    /* Slightly larger OTP digits on desktop */
    #gud-custom-apply-modal .ga-apply-modal__confirm-input--otp {
        font-size: 2.25rem !important;
    }

    /* Larger success ring on desktop */
    #gud-custom-apply-modal .ga-confirm-success-ring,
    #gud-custom-apply-modal .ga-confirm-success-ring__svg {
        width: 96px;
        height: 96px;
    }
}

/* ─── Reduced motion ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    #gud-custom-apply-modal *,
    #gud-custom-apply-modal *::before,
    #gud-custom-apply-modal *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ─── Header actions (close button) ────────────────────────────── */
#gud-custom-apply-modal .ga-apply-modal__header-actions {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    flex-shrink: 0;
}
