/* =========================================================
   REQUEST COURSE POPUP - CUSTOM BRANDED THEME
========================================================= */

.sbx-request-modal {
    position: fixed;
    inset: 0;
    z-index: 99999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sbx-request-modal.active {
    display: flex;
}

.sbx-request-modal-card {
    position: relative;
    width: min(1120px, 96vw);
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 25px 50px -12px rgba(31, 12, 85, 0.25);
    animation: sbxPopup .3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sbxPopup {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to { opacity: 1; transform: none; }
}

.sbx-request-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--sbx-border);
    background: #fff;
    color: var(--sbx-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: 0.25s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.sbx-request-close span { font-size: 24px; line-height: 1; font-weight: 700; }
.sbx-request-close:hover { background: var(--sbx-primary); color: #fff; border-color: var(--sbx-primary); transform: rotate(90deg); }

.sbx-request {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    min-height: 550px;
}

/* --- Left Pane --- */
.sbx-request-left {
    padding: 40px;
    background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--sbx-primary) 12%, #fff) 45%, color-mix(in srgb, var(--sbx-primary) 28%, #fff) 100%);
    border-right: 1px solid var(--sbx-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}


.sbx-illustration {
    display: block;
    width: 100%;
    height: 300px; /* Force the height */
    margin: 0 auto 10px auto;
    
    /* Background properties to render the SVG perfectly */
    background-size: contain;
    background-position: center bottom;
    background-repeat: no-repeat;
    
    /* Keep your nice shadow */
    filter: drop-shadow(0 18px 24px rgba(31, 12, 85, 0.12));
}

/* Responsive alignment for mobile/tablet */
@media (max-width: 991px) {
    .sbx-illustration {
        height: 250px;
        margin: 0 0 5px 0;
        background-position: left bottom; /* Align left for mobile */
    }
}



.sbx-request-intro h2 {
    color: var(--sbx-primary);
    font-size: clamp(34px, 4vw, 42px);
    font-weight: 950;
    line-height: 1.1;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sbx-title-star {
    display: inline-flex;
    width: 26px;
    height: 26px;
    margin-right: 8px;
    flex-shrink: 0;
    color: var(--sbx-primary);
}
.sbx-title-star svg { width: 100%; height: 100%; }

.sbx-request-intro p {
    color: #475569;
    font-size: 15px;
    line-height: 1.7;
    font-weight: 600;
}

/* --- Right Pane (Form) --- */
.sbx-request-form { padding: 40px; background: #fff; }
.sbx-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sbx-field { display: flex; flex-direction: column; gap: 8px; }
.sbx-field-full { grid-column: 1 / -1; }

.sbx-field label {
    color: var(--sbx-purple-dark, var(--sbx-primary));
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .02em;
}

.sbx-field input,
.sbx-field textarea,
.sbx-custom-select-trigger {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid var(--sbx-border);
    background: #fff;
    color: #1e293b;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    transition: 0.25s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}

.sbx-field textarea { resize: vertical; min-height: 100px; }

/* Darker Placeholders */
.sbx-field input::placeholder,
.sbx-field textarea::placeholder,
.sbx-custom-select-trigger .placeholder {
    color: #1e293b;
    font-weight: 500;
    opacity: 0.75;
}

.sbx-field input:focus,
.sbx-field textarea:focus,
.sbx-custom-select.active .sbx-custom-select-trigger {
    outline: none;
    border-color: var(--sbx-primary);
    background: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--sbx-primary) 12%, transparent);
}

/* Custom Mandatory Error Styling */
.sbx-field input.sbx-error-highlight,
.sbx-field textarea.sbx-error-highlight,
.sbx-custom-select.sbx-error-highlight .sbx-custom-select-trigger {
    border-color: #be123c !important;
    background-color: #fff1f2 !important;
    box-shadow: 0 0 0 4px rgba(190, 18, 60, 0.1) !important;
}

/* --- Custom Dropdown Component --- */
.sbx-custom-select { position: relative; user-select: none; cursor: pointer; }
.sbx-custom-select-trigger { display: flex; align-items: center; justify-content: space-between; }
.sbx-select-arrow { transition: transform 0.3s ease; display: flex; color: var(--sbx-primary); }
.sbx-custom-select.active .sbx-select-arrow { transform: rotate(180deg); }

.sbx-custom-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--sbx-border);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(31, 12, 85, 0.12);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: 0.25s ease;
}

.sbx-custom-select.active .sbx-custom-options { opacity: 1; visibility: visible; transform: translateY(0); }
.sbx-custom-option { padding: 12px 16px; font-size: 14px; font-weight: 600; color: #475569; transition: 0.2s; }
.sbx-custom-option:not(:last-child) { border-bottom: 1px solid #f1f5f9; }
.sbx-custom-option:hover, .sbx-custom-option.selected { background: color-mix(in srgb, var(--sbx-primary) 8%, #fff); color: var(--sbx-primary); }

/* --- Submit Button --- */
.sbx-submit-request {
    margin-top: 20px;
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sbx-primary), color-mix(in srgb, var(--sbx-primary) 75%, #000));
    color: #fff;
    font-size: 15px;
    font-weight: 950;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 12px 28px rgba(109, 40, 217, 0.25);
    transition: 0.3s ease;
}

.sbx-submit-request:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(109, 40, 217, 0.35); }
.sbx-submit-request:disabled { opacity: 0.65; cursor: not-allowed; transform: none; box-shadow: none; }

/* --- Custom Animated Alerts (SVG Icons) --- */
.sbx-request-status {
    display: none;
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    align-items: center;
    gap: 10px;
    animation: sbxAlertSlide 0.3s ease;
}

.sbx-request-status.active { display: flex; }
@keyframes sbxAlertSlide { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.sbx-request-status.success { background: #ecfccb; color: #4d7c0f; border: 1px solid #d9f99d; }
.sbx-request-status.error { background: #ffe4e6; color: #be123c; border: 1px solid #fecdd3; }
.sbx-request-status.loading { background: #f1f5f9; color: #0f172a; border: 1px solid #e2e8f0; }

.sbx-status-icon { display: flex; align-items: center; }
@keyframes sbxIconSpin { 100% { transform: rotate(360deg); } }
.sbx-icon-spin { animation: sbxIconSpin 1s linear infinite; }

/* --- Responsive Adjustments (Left Align everything) --- */
@media (max-width: 991px) {
    .sbx-request { grid-template-columns: 1fr; }
    
    .sbx-request-left {
        padding: 32px 24px;
        border-right: none;
        border-bottom: 1px solid var(--sbx-border);
        text-align: left; /* Shift text to left */
        align-items: flex-start; /* Shift flex to left */
    }
    
    .sbx-illustration img {
        margin: 0 0 24px 0; /* Shift image left */
        max-height: 200px;
    }
    
    .sbx-request-intro h2 { justify-content: flex-start; } /* Left align title icon */
    .sbx-request-form { padding: 32px 24px; }
}

@media (max-width: 575px) {
    .sbx-request-modal { padding: 12px; }
    .sbx-request-modal-card { border-radius: 20px; }
    .sbx-form-grid { grid-template-columns: 1fr; }
    .sbx-request-intro h2 { font-size: 28px; }
    .sbx-request-close { top: 12px; right: 12px; }
}
