/* ==========================================================
   COURSE APPLICATION MODAL
   ========================================================== */

/* Overlay */
.course-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.course-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Container */
.course-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 448px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 24px 28px;
    position: relative;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.course-modal-overlay.active .course-modal {
    transform: translateY(0);
}

/* Close Button */
.course-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    color: #6b7479;
    font-size: 20px;
    line-height: 1;
}

.course-modal-close:hover {
    background: #f0f0f0;
    color: #23282b;
}

/* Header */
.course-modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.course-modal-header h2 {
    font-family: 'Cinzel', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: 30px;
    color: #1a1a1a;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.course-modal-header p {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #6b7479;
    margin: 0;
    line-height: 1.5;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* Form */
.course-modal-form {
    display: block;
}

/* Two-column grid row */
.course-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

/* Form Group */
.course-form-group {
    display: flex;
    flex-direction: column;
}

.course-form-group.full-width {
    grid-column: 1 / -1;
}

.course-form-group label {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #2d2d2d;
    margin-bottom: 8px;
}

.course-form-group label .required {
    color: #e74c3c;
    margin-left: 2px;
}

.course-form-group input,
.course-form-group select {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    padding: 10px 14px;
    border: 1px solid #e4e7e9;
    border-radius: 6px;
    background: #fff;
    color: #23282b;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.course-form-group input::placeholder {
    color: #b0b5b8;
}

.course-form-group input:focus,
.course-form-group select:focus {
    border-color: #016083;
    box-shadow: 0 0 0 3px rgba(1, 96, 131, 0.1);
}

.course-form-group input.error,
.course-form-group select.error {
    border-color: #e74c3c;
}

.course-form-group .field-error {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #e74c3c;
    margin-top: 4px;
    display: none;
}

.course-form-group .field-error.visible {
    display: block;
}

/* Select wrapper for chevron */
.select-wrapper {
    position: relative;
}

.select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 36px;
    cursor: pointer;
    background: #fff;
}

.select-wrapper .select-chevron {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7479;
    font-size: 12px;
}

/* Terms Checkbox */
.course-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #4a4a4a;
    line-height: 1.5;
    user-select: none;
    -webkit-user-select: none;
}

.course-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.checkbox-custom {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 2px solid #c0c4c7;
    border-radius: 4px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
    margin-top: 1px;
    position: relative;
}

.course-checkbox-label input[type="checkbox"]:focus-visible + .checkbox-custom {
    outline: 2px solid #016083;
    outline-offset: 2px;
}

.course-checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: #016083;
    border-color: #016083;
}

.course-checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    position: absolute;
    top: 2px;
}

.course-checkbox-label input[type="checkbox"].error + .checkbox-custom {
    border-color: #e74c3c;
}

.checkbox-text {
    flex: 1;
}

.checkbox-text a {
    color: #016083;
    text-decoration: underline;
    transition: color 0.2s;
}

.checkbox-text a:hover {
    color: #014a64;
}

/* Submit Button */
.course-btn-submit {
    display: block;
    width: 100%;
    padding: 0;
    height: 44px;
    background: #016083;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.25s, opacity 0.25s;
    margin-top: 4px;
}

.course-btn-submit:hover:not(:disabled) {
    background: #014a64;
}

.course-btn-submit:disabled {
    background: #e4e7e9;
    color: #b0b5b8;
    cursor: not-allowed;
}
