/* =====================================================================
   ScholarHat lead modals: "Book a free demo / Talk to our advisor" (#EnquiryMeetModal, Enq type g)
   and "Download curriculum" (#DownloadCurriculumModal, Enq type d).
   One shared look: a frosted-glass card over a blurred page, a brand panel on the left, a calm form on the right.
   Same tokens as the home hero (cyan to blue, Plus Jakarta Sans). Light and dark (data-bs-theme). One radius scale: 12 / 22.
   Only classes, never ids, so the form scripts and selectize keep working untouched.
   ===================================================================== */
.custom-modal, .free-course-form, #enqdiv {
    --lm-ink: #0f1b2d;
    --lm-body: #46566b;
    --lm-muted: #6b7c91;
    --lm-line: #d9e4ee;
    --lm-field: rgba(243, 248, 252, .95);
    --lm-card: rgba(255, 255, 255, .86);
    --lm-edge: rgba(255, 255, 255, .8);
    --lm-a: #0e7490;
    --lm-b: #1d4ed8;
    --lm-ring: rgba(8, 145, 178, .18);
    --lm-err: #dc3545;
    --lm-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 30px 80px -24px rgba(10, 40, 80, .55);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
[data-bs-theme="dark"] .custom-modal, [data-bs-theme="dark"] .free-course-form, [data-bs-theme="dark"] #enqdiv {
    --lm-ink: #eef7ff;
    --lm-body: #b4c6d9;
    --lm-muted: #8aa0b6;
    --lm-line: rgba(130, 190, 230, .2);
    --lm-field: rgba(14, 34, 58, .75);
    --lm-card: rgba(9, 26, 46, .82);
    --lm-edge: rgba(130, 200, 240, .18);
    --lm-a: #1aa6c4;
    --lm-b: #3b72f0;
    --lm-ring: rgba(47, 184, 214, .28);
    --lm-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 30px 80px -24px rgba(0, 0, 0, .8);
}

/* the page behind the card is blurred, not blacked out */
body:has(.custom-modal.show) .modal-backdrop.show { background: #0a1c30; opacity: .5; -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }

.custom-modal .modal-dialog { max-width: 860px; margin-inline: auto; display: flex; align-items: center; min-height: calc(100% - 3.5rem); }
.custom-modal .modal-content { width: 100%; }
.custom-modal .modal-content {
    display: flex; flex-direction: row; align-items: stretch;
    border: 1px solid var(--lm-edge); border-radius: 22px;
    background: var(--lm-card);
    -webkit-backdrop-filter: blur(26px) saturate(160%); backdrop-filter: blur(26px) saturate(160%);
    box-shadow: var(--lm-shadow);
    color: var(--lm-body);
}

/* ---- left: brand panel ---- */
.custom-modal .banner-section {
    position: relative; isolation: isolate; overflow: hidden;
    flex: 0 0 40%; width: 40%; padding: 34px 28px;
    display: flex; flex-direction: column; justify-content: space-between; align-items: stretch; gap: 22px;
    border-radius: 21px 0 0 21px;
    background:
        radial-gradient(120% 70% at 0% 0%, rgba(34, 211, 238, .55), transparent 58%),
        radial-gradient(100% 70% at 100% 100%, rgba(37, 99, 235, .7), transparent 62%),
        #0b1f36;
    color: #fff;
}
.custom-modal .banner-section::after { /* soft fade into the form panel */
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 40%);
}
.custom-modal .banner-content { display: flex; flex-direction: column; gap: 6px; }
.custom-modal .banner-section h2 { margin: 0; font-size: 1.65rem; font-weight: 800; line-height: 1.2; color: #fff; text-align: left; }
.custom-modal .banner-section .lm-lead { margin: 0 0 14px; font-size: .9rem; line-height: 1.5; color: rgba(255, 255, 255, .78); text-align: left; }
.custom-modal .banner-section ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.custom-modal .banner-section ul li {
    display: flex; align-items: center; gap: 12px; margin: 0; padding: 9px 12px;
    font-size: .86rem; font-weight: 600; line-height: 1.25; color: #fff;
    border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px;
    background: rgba(255, 255, 255, .09);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.custom-modal .banner-section ul li::before { content: none; }
.custom-modal .banner-section ul li i {
    flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
    background: rgba(255, 255, 255, .16); font-size: .95rem; color: #fff;
}
.custom-modal .banner-section .lm-foot { margin: 0; font-size: .78rem; line-height: 1.45; color: rgba(255, 255, 255, .7); }

/* ---- right: the form ---- */
.custom-modal .form-section { flex: 1 1 60%; width: 60%; min-width: 0; padding: 26px 30px 24px; display: flex; flex-direction: column; }
.custom-modal .form-section .modal-header { padding: 0 0 16px !important; border: 0; align-items: flex-start; gap: 12px; }
.custom-modal .form-section .lm-head { min-width: 0; }
.custom-modal .form-section .modal-title { margin: 0; font-size: 1.3rem; font-weight: 800; line-height: 1.25; color: var(--lm-ink); }
.custom-modal .form-section .lm-sub { margin: 4px 0 0; font-size: .85rem; line-height: 1.45; color: var(--lm-muted); }
.custom-modal .form-section .btn-close {
    flex: none; width: 32px; height: 32px; margin: 0; padding: 0; opacity: 1; border-radius: 50%;
    background-color: var(--lm-field); background-size: 11px; border: 1px solid var(--lm-line);
    transition: background-color .2s ease, transform .2s ease;
}
[data-bs-theme="dark"] .custom-modal .btn-close { filter: invert(1) grayscale(1); }
.custom-modal .form-section .btn-close:hover { transform: rotate(90deg); }
.custom-modal .form-section .modal-body { padding: 0; }
.custom-modal .form-section .row { --bs-gutter-x: 14px; --bs-gutter-y: 0; }
.custom-modal .form-section .row.mb-2, .custom-modal .form-section .mb-2 { margin-bottom: 14px !important; }

.custom-modal .form-label { margin-bottom: 6px; font-size: .8rem; font-weight: 600; color: var(--lm-ink); }
.custom-modal .form-label .text-danger { color: var(--lm-err) !important; }

.custom-modal .form-control, .custom-modal .form-select,
.custom-modal .selectize-control.single .selectize-input {
    min-height: 44px; padding: 10px 14px; font-size: .9rem; font-family: inherit; color: var(--lm-ink);
    background-color: var(--lm-field); border: 1px solid var(--lm-line); border-radius: 12px; box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.custom-modal .form-control::placeholder { color: var(--lm-muted); opacity: .85; }
.custom-modal .form-control:hover, .custom-modal .form-select:hover, .custom-modal .selectize-input:hover { border-color: rgba(8, 145, 178, .45); }
.custom-modal .form-control:focus, .custom-modal .form-select:focus, .custom-modal .selectize-input.focus, .custom-modal .selectize-input.input-active {
    border-color: var(--lm-a); box-shadow: 0 0 0 4px var(--lm-ring); background-color: var(--lm-field); color: var(--lm-ink); outline: 0;
}
.custom-modal .form-select { padding-right: 34px; }
.custom-modal .form-control.input-validation-error, .custom-modal .form-select.input-validation-error, .custom-modal .selectize-input.input-validation-error {
    border-color: var(--lm-err); box-shadow: 0 0 0 4px rgba(220, 53, 69, .12);
}

/* mobile number: country code and number read as one field */
.custom-modal .phone-input { flex-wrap: nowrap; }
.custom-modal .phone-input .input-group-btn { width: auto !important; flex: none; }
.custom-modal .phone-input .form-select { width: 158px !important; border-radius: 12px 0 0 12px; border-right-color: transparent; background-color: var(--lm-field); }
.custom-modal .phone-input .form-control { min-width: 0; border-radius: 0 12px 12px 0; }
.custom-modal .phone-input:focus-within .form-select { border-right-color: var(--lm-a); }

/* selectize (city, experience) dressed the same as the other fields; it copies .form-select onto its wrapper, so the wrapper stays bare */
.custom-modal .selectize-control.form-select, .custom-modal .selectize-control.form-control { padding: 0; min-height: 0; border: 0; background: none; box-shadow: none; }
.custom-modal .selectize-control.single .selectize-input { display: flex; align-items: center; }
.custom-modal .selectize-control.single .selectize-input > input { color: var(--lm-ink); }
.custom-modal .selectize-control.single .selectize-input::after { border-color: var(--lm-muted) transparent transparent; right: 14px; }
.custom-modal .selectize-input .item { color: var(--lm-ink); }
.custom-modal .selectize-dropdown {
    margin-top: 6px; padding: 6px; border: 1px solid var(--lm-line); border-radius: 12px; overflow: hidden;
    background: var(--lm-card); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    box-shadow: 0 18px 40px -18px rgba(10, 40, 80, .4); color: var(--lm-ink);
}
.custom-modal .selectize-dropdown .option { padding: 8px 10px; border-radius: 8px; font-size: .88rem; }
.custom-modal .selectize-dropdown .active { background: rgba(8, 145, 178, .12); color: var(--lm-ink); }

/* consent line */
.custom-modal .form-check { display: flex; align-items: flex-start; gap: 10px; padding: 0; margin: 2px 0 14px !important; font-size: .8rem !important; color: var(--lm-muted) !important; }
.custom-modal .form-check-input { flex: none; width: 18px; height: 18px; margin: 1px 0 0 !important; border: 1px solid var(--lm-line); border-radius: 6px; background-color: var(--lm-field); }
.custom-modal .form-check-input:checked { background-color: var(--lm-a); border-color: var(--lm-a); }
.custom-modal .form-check-input:focus { box-shadow: 0 0 0 4px var(--lm-ring); border-color: var(--lm-a); }
.custom-modal .form-check-label { line-height: 1.45; }
.custom-modal .form-check-label a { color: var(--lm-a); font-weight: 600; text-decoration: none !important; }
.custom-modal .form-check-label a:hover { text-decoration: underline !important; }

/* submit */
.custom-modal .form-section .btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; min-height: 48px; padding: 12px 18px; border: 0; border-radius: 12px;
    font-family: inherit; font-size: .95rem; font-weight: 700; letter-spacing: .005em; color: #fff;
    background: linear-gradient(135deg, var(--lm-a), var(--lm-b));
    box-shadow: 0 14px 26px -12px rgba(29, 78, 216, .6), 0 1px 0 rgba(255, 255, 255, .25) inset;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.custom-modal .form-section .btn-primary:hover { color: #fff; filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 18px 30px -12px rgba(29, 78, 216, .65), 0 1px 0 rgba(255, 255, 255, .25) inset; }
.custom-modal .form-section .btn-primary:active { transform: translateY(0) scale(.985); }
.custom-modal .form-section .btn-primary:focus-visible { outline: 3px solid var(--lm-ring); outline-offset: 2px; }
.custom-modal .form-section .btn-primary[disabled], .custom-modal .form-section .btn-primary:disabled { opacity: .75; pointer-events: none; }
.custom-modal .form-section .px-0.mb-2, .custom-modal .form-section > .mb-2.ms-3 { margin-left: 0 !important; margin-right: 0 !important; }

/* ---- phones and small tablets: the brand panel becomes a slim header, the form fills the card ---- */
@media (max-width: 767.98px) {
    .custom-modal .modal-dialog { max-width: none; margin: 10px; max-height: calc(100dvh - 20px); min-height: 0; }
    .custom-modal .modal-content { flex-direction: column; max-height: calc(100dvh - 20px); overflow: hidden auto !important; border-radius: 20px; }
    .custom-modal .banner-section { flex: none; width: 100%; padding: 18px 20px 16px; gap: 0; border-radius: 19px 19px 0 0; }
    .custom-modal .banner-section h2 { font-size: 1.15rem; }
    .custom-modal .banner-section .lm-lead { margin: 4px 0 0; font-size: .82rem; }
    .custom-modal .banner-section ul, .custom-modal .banner-section .lm-foot { display: none; }
    .custom-modal .form-section { flex: none; width: 100%; padding: 18px 20px 20px; }
    .custom-modal .form-section .modal-header { padding-bottom: 12px !important; }
    .custom-modal .form-section .modal-title { font-size: 1.1rem; }
    .custom-modal .form-section .col-md-6 { margin-bottom: 14px; }
    .custom-modal .form-section .row > .col-md-6:last-child { margin-bottom: 0; }
    .custom-modal .phone-input .form-select { width: 132px !important; }
}
@media (prefers-reduced-motion: reduce) {
    .custom-modal .form-section .btn-primary, .custom-modal .btn-close, .custom-modal .form-control, .custom-modal .form-select { transition: none; }
    .custom-modal .form-section .btn-close:hover, .custom-modal .form-section .btn-primary:hover { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
    .custom-modal .modal-content { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
    [data-bs-theme="dark"] .custom-modal .modal-content { background: #0b1d33; }
}

/* fine tuning: selectize fields match the 44px inputs; the phone row gets the same gap as every other row */
.custom-modal .selectize-control.single .selectize-input { box-sizing: border-box; width: 100%; height: 44px; min-height: 44px; padding: 0 34px 0 14px; line-height: 1.2; overflow: hidden; }
.custom-modal .selectize-control.single .selectize-input > .item, .custom-modal .selectize-control.single .selectize-input > input { white-space: nowrap; text-overflow: ellipsis; font-size: .9rem; margin: 0; }
.custom-modal .selectize-control.single .selectize-input > input::placeholder { color: var(--lm-muted); }
.custom-modal .col-md-12:has(> .phone-input) { margin-bottom: 14px; }
[data-bs-theme="dark"] .custom-modal .form-section .btn-close { filter: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23eef7ff'%3E%3Cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3E%3C/svg%3E"); }

/* =====================================================================
   The inline "Book a free career consultation" card (Enq type middle1, .free-course-form): same fields and button as the modals
   ===================================================================== */
.free-course-form.card {
    position: relative; overflow: hidden; border: 1px solid var(--lm-edge); border-radius: 22px;
    background: linear-gradient(135deg, rgba(8, 145, 178, .09), rgba(37, 99, 235, .06) 55%, transparent), var(--lm-card);
    -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
    box-shadow: var(--lm-shadow); font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
:is(.free-course-form, #enqdiv) .form-label { margin-bottom: 6px; font-size: .8rem; font-weight: 600 !important; color: var(--lm-ink) !important; }
:is(.free-course-form, #enqdiv) .form-control, :is(.free-course-form, #enqdiv) .form-select {
    min-height: 44px; padding: 10px 14px; font-size: .9rem; font-family: inherit; color: var(--lm-ink);
    background-color: var(--lm-field); border: 1px solid var(--lm-line); border-radius: 12px; box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
:is(.free-course-form, #enqdiv) .form-select { padding-right: 34px; }
:is(.free-course-form, #enqdiv) .form-control::placeholder { color: var(--lm-muted); opacity: .85; }
:is(.free-course-form, #enqdiv) .form-control:hover, :is(.free-course-form, #enqdiv) .form-select:hover { border-color: rgba(8, 145, 178, .45); }
:is(.free-course-form, #enqdiv) .form-control:focus, :is(.free-course-form, #enqdiv) .form-select:focus { border-color: var(--lm-a); box-shadow: 0 0 0 4px var(--lm-ring); background-color: var(--lm-field); color: var(--lm-ink); outline: 0; }
:is(.free-course-form, #enqdiv) .input-validation-error { border-color: var(--lm-err) !important; box-shadow: 0 0 0 4px rgba(220, 53, 69, .12) !important; }
:is(.free-course-form, #enqdiv) .phone-input { flex-wrap: nowrap; }
:is(.free-course-form, #enqdiv) .phone-input .input-group-btn { width: auto !important; flex: none; }
:is(.free-course-form, #enqdiv) .phone-input .form-select { width: 118px !important; border-radius: 12px 0 0 12px; border-right-color: transparent; }
:is(.free-course-form, #enqdiv) .phone-input .form-control { min-width: 0; border-radius: 0 12px 12px 0; }
:is(.free-course-form, #enqdiv) .phone-input:focus-within .form-select { border-right-color: var(--lm-a); }
:is(.free-course-form, #enqdiv) .form-check { display: flex; align-items: flex-start; gap: 10px; padding: 0 !important; margin: 4px 0 16px; font-size: .8rem !important; color: var(--lm-muted) !important; }
:is(.free-course-form, #enqdiv) .form-check-label { display: flex; align-items: flex-start; gap: 10px; line-height: 1.45; }
:is(.free-course-form, #enqdiv) .form-check-input { flex: none; width: 18px; height: 18px; margin: 1px 0 0 !important; border: 1px solid var(--lm-line); border-radius: 6px; background-color: var(--lm-field); }
:is(.free-course-form, #enqdiv) .form-check-input:checked { background-color: var(--lm-a); border-color: var(--lm-a); }
:is(.free-course-form, #enqdiv) .form-check-input:focus { box-shadow: 0 0 0 4px var(--lm-ring); border-color: var(--lm-a); }
:is(.free-course-form, #enqdiv) .form-check-label a { color: var(--lm-a); font-weight: 600; text-decoration: none !important; }
:is(.free-course-form, #enqdiv) .btn.btn-info, #enqdiv .register-btn, :is(.free-course-form, #enqdiv) .btn-primary {
    min-height: 48px; padding: 12px 22px; border: 0; border-radius: 12px; font-family: inherit; font-size: .95rem; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--lm-a), var(--lm-b)) !important;
    box-shadow: 0 14px 26px -12px rgba(29, 78, 216, .6), 0 1px 0 rgba(255, 255, 255, .25) inset;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
:is(.free-course-form, #enqdiv) .btn.btn-info:hover, #enqdiv .register-btn:hover, :is(.free-course-form, #enqdiv) .btn-primary:hover { color: #fff; filter: brightness(1.06); transform: translateY(-1px); }
:is(.free-course-form, #enqdiv) .btn.btn-info:active, :is(.free-course-form, #enqdiv) .btn-primary:active { transform: scale(.985); }
:is(.free-course-form, #enqdiv) .btn.btn-info:focus-visible { outline: 3px solid var(--lm-ring); outline-offset: 2px; }
:is(.free-course-form, #enqdiv) .btn svg { width: 20px; height: 20px; transition: transform .2s ease; }
:is(.free-course-form, #enqdiv) .btn:hover svg { transform: translateX(3px); }
@media (max-width: 767.98px) {
    .free-course-form.card { border-radius: 20px; padding: 16px !important; }
    :is(.free-course-form, #enqdiv) .card-body { padding: 4px; }
    :is(.free-course-form, #enqdiv) .d-grid > .btn { width: 100% !important; }
    :is(.free-course-form, #enqdiv) .mb-4 { margin-bottom: 14px !important; }
}
@media (prefers-reduced-motion: reduce) { :is(.free-course-form, #enqdiv) .btn, :is(.free-course-form, #enqdiv) .btn svg, :is(.free-course-form, #enqdiv) .form-control, :is(.free-course-form, #enqdiv) .form-select { transition: none; } :is(.free-course-form, #enqdiv) .btn:hover, :is(.free-course-form, #enqdiv) .btn:hover svg { transform: none; } }
#enqdiv { font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; text-align: left; }
#enqdiv .mb-2 { margin-bottom: 12px !important; }
#enqdiv .register-btn, #enqdiv .btn-primary { width: 100%; }
#enqdiv .selectize-control.single .selectize-input { min-height: 44px; padding: 10px 14px !important; border-radius: 12px !important; border: 1px solid var(--lm-line); background: var(--lm-field); box-shadow: none; color: var(--lm-ink); }
#enqdiv .selectize-control.form-select { padding: 0; border: 0; background: none; min-height: 0; box-shadow: none; }
#enqdiv .phone-input .form-select { width: 146px !important; }
#enqdiv .selectize-control.single .selectize-input { box-sizing: border-box; height: 44px; display: flex; align-items: center; padding: 0 34px 0 14px !important; overflow: hidden; }
#enqdiv .selectize-control.single .selectize-input > .item, #enqdiv .selectize-control.single .selectize-input > input { white-space: nowrap; margin: 0; font-size: .9rem; }
#enqdiv .selectize-dropdown { border: 1px solid var(--lm-line); border-radius: 12px; overflow: hidden; margin-top: 6px; }
.custom-modal .selectize-control.single .selectize-input > input, #enqdiv .selectize-control.single .selectize-input > input { width: 100% !important; min-width: 0; max-width: 100%; position: static !important; opacity: 1 !important; }
.custom-modal .selectize-control.single .selectize-input.has-items > input, #enqdiv .selectize-control.single .selectize-input.has-items > input { width: 1px !important; position: absolute !important; opacity: 0 !important; }
.custom-modal .form-section .form-check { margin-top: 14px !important; }
