/* =========================================================
   Course Details / Registration Modal
   File: css/course-details-modal.css
   ========================================================= */

/* ---------- Modal shell ---------- */
#courseDetailModal .modal-dialog {
    max-width: 900px;
}

#courseDetailModal .modal-content {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
    font-family: 'Plus Jakarta Sans', 'Poppins', system-ui, sans-serif;
}

/* ---------- Header ---------- */
#courseDetailModal .modal-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: #fff;
    border-bottom: none;
    padding: 12px 18px;
    min-height: 64px;
}

#courseDetailModal .modal-header .close {
    color: #fff;
    opacity: .85;
    text-shadow: none;
    font-size: 1.6rem;
    line-height: 1;
    padding: 0 .25rem;
    margin: 0;
}
#courseDetailModal .modal-header .close:hover { opacity: 1; }

/* Header logos — CRITICAL: constrain size */
#courseDetailModal .adt-modal-header__logo {
    height: 42px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
    background: #fff;
    padding: 4px 8px;
    border-radius: 6px;
}

#courseDetailModal .adt-modal-header__seal {
    height: 42px;
    width: auto;
    max-width: 90px;
    object-fit: contain;
    display: block;
    margin-right: 12px;
    background: #fff;
    padding: 4px 6px;
    border-radius: 6px;
}

/* ---------- Body ---------- */
#courseDetailModal .modal-body {
    padding: 28px 30px 30px;
    background-color: #f8fafc;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #1f2937;
    font-size: .95rem;
    line-height: 1.5;
}

/* ---------- Curriculum view ---------- */
#courseDetailModal .details-panel h4 {
    font-weight: 800;
    color: #1a2b4c;
    margin-bottom: 6px;
    font-size: 1.35rem;
    letter-spacing: -.01em;
}

#courseDetailModal .details-panel hr {
    border-top: 1px solid #e3e8ef;
    margin: 14px 0;
}

#courseDetailModal .details-panel strong {
    color: #334155;
    font-weight: 600;
}

#courseDetailModal .details-panel .h5 {
    font-weight: 700;
}

/* ---------- Registration form ---------- */
#courseDetailModal #registrationForm h5 {
    color: #1a2b4c;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 12px;
}

#courseDetailModal #registrationForm label {
    font-weight: 600;
    color: #334155;
    font-size: .85rem;
    margin-bottom: 4px;
}

#courseDetailModal .form-control,
#courseDetailModal .form-control:disabled,
#courseDetailModal .form-control[readonly] {
    border-radius: 8px;
    border: 1px solid #d3dae6;
    font-size: .92rem;
    height: auto;
    min-height: 40px;
    padding: 8px 12px;
}

#courseDetailModal .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .15);
}

#courseDetailModal .input-group-text {
    background: #eef2f9;
    border: 1px solid #d3dae6;
    border-radius: 8px 0 0 8px;
    font-weight: 600;
    color: #334155;
    min-width: 62px;
    justify-content: center;
}

/* Dropdown triggers that look like readonly inputs */
#courseDetailModal #country-display-text,
#courseDetailModal #center-display-text {
    border-radius: 8px 0 0 8px !important;
    color: #495057;
    cursor: pointer;
    min-height: 40px;
    display: flex;
    align-items: center;
    border-right: none;
}

#courseDetailModal .input-group .dropdown-toggle {
    border-radius: 0 8px 8px 0 !important;
    background: #f8fafc;
    border: 1px solid #d3dae6;
    border-left: none;
    color: #64748b;
}

#courseDetailModal .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .15);
    border: 1px solid #e3e8ef;
    padding: 4px;
    max-height: 260px;
    overflow-y: auto;
}

#courseDetailModal .dropdown-item {
    border-radius: 6px;
    font-size: .9rem;
    padding: 8px 12px;
}

#courseDetailModal .dropdown-item:hover,
#courseDetailModal .dropdown-item.active,
#courseDetailModal .center-option.active {
    background: #eaf1ff;
    color: #0a58ca;
}

/* Radio "Onsite / Online" */
#courseDetailModal .form-check-inline {
    margin-right: 18px;
}
#courseDetailModal .form-check-input {
    margin-top: .35rem;
}

/* Total fee emphasis */
#courseDetailModal #total_fees_usd {
    background-color: #eef2f9 !important;
    color: #0a58ca;
    font-weight: 800 !important;
    font-size: 1.15rem !important;
    letter-spacing: .01em;
}

/* =========================================================
   Course Details Modal — sits BELOW .adt-site-header
   Header z-index: 9999  |  Header height: 76px (68px mobile)
   ========================================================= */

/* 1) Dark backdrop sits under the header */
.modal-backdrop {
    z-index: 9980 !important;
}

/* 2) Modal wrapper sits under the header but above the backdrop */
#courseDetailModal {
    z-index: 9990 !important;
}

/* 3) Push the dialog below the sticky header */
#courseDetailModal .modal-dialog {
    margin-top: 90px !important;    /* 76px header + 14px breathing room */
    margin-bottom: 30px;
}

/* 4) Cap body height so the modal never exceeds the viewport */
#courseDetailModal .modal-body {
    max-height: calc(100vh - 190px);   /* 90px top + 100px reserve for footer */
    overflow-y: auto;
}

/* 5) Let the page still scroll behind the modal so the sticky header
      can move naturally if needed (optional — see note below) */
body.modal-open {
    overflow: auto !important;
    padding-right: 0 !important;   /* prevents the layout shift Bootstrap adds */
}

/* 6) Mobile — header shrinks to 68px */
@media (max-width: 600px) {
    #courseDetailModal .modal-dialog {
        margin-top: 82px !important;    /* 68px header + 14px gap */
        margin-bottom: 20px;
    }
    #courseDetailModal .modal-body {
        max-height: calc(100vh - 170px);
    }
}

/* Footer buttons */
#courseDetailModal .modal-footer {
    border-top: 1px solid #e3e8ef;
    background: #f8fafc;
    border-radius: 0 0 14px 14px;
    padding: 14px 20px;
}

#courseDetailModal .modal-footer .btn {
    border-radius: 30px;
    padding: 8px 20px;
    font-weight: 600;
}

/* Success panel (after submit) */
#courseDetailModal #printableArea .fa-circle-check {
    color: #16a34a;
}

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
    #courseDetailModal .modal-body {
        padding: 20px 16px 22px;
    }
    #courseDetailModal .adt-modal-header__logo { height: 34px; max-width: 160px; }
    #courseDetailModal .adt-modal-header__seal { height: 34px; max-width: 70px; }
    #courseDetailModal .details-panel h4 { font-size: 1.15rem; }
}