/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0f2238;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    color: white;
    margin: 0;
    padding: 20px;
    line-height: 1.5;
}

.container {
    width: 900px;
    max-width: 100%;
    margin: 0 auto;
    background: transparent;
}

/* ===== LANGUAGE TOGGLE ===== */
.lang-row {
    text-align: right;
    margin-bottom: 20px;
}

#langToggle {
    background: #2a4b73;
    border: none;
    padding: 8px 20px;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    font-size: 14px;
    width: auto;
    margin-top: 0;
    transition: 0.2s;
}

#langToggle:hover {
    background: #3b6a9e;
    opacity: 1;
}

/* ===== BANNER ===== */
.form-banner {
    width: 100%;
    margin-bottom: 28px;
}

.form-banner img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ===== FIELDSET SECTIONS ===== */
.form-section {
    background: rgba(28, 53, 83, 0.5);
    border: 1px solid #2e4a70;
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 32px;
    transition: all 0.2s;
}

.form-section legend {
    background: #0f2238;
    padding: 0 16px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.2px;
    color: #e2e8f0;
    border-radius: 40px;
    width: auto;
    margin-left: 8px;
    border: 1px solid #2e4a70;
    line-height: 1.4;
}

.section-title {
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: 500;
    border-left: 3px solid #3b82f6;
    padding-left: 12px;
    color: #f1f5f9;
}

/* ===== READ-ONLY FIELDS ===== */
.readonly-field {
    display: flex;
    flex-direction: column;
}

.readonly-field label {
    font-size: 11px;
    color: #8fa5bc;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.readonly-value {
    background: #1c3553;
    border: 1px solid #2e4a70;
    padding: 12px 14px;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    word-break: break-word;
    cursor: default;
}

.readonly-value.empty {
    color: #6b8aae;
    font-style: italic;
}

/* ===== CAL.COM EMBED ===== */
.cal-wrapper {
    margin-top: 12px;
    margin-bottom: 8px;
    border-radius: 20px;
    overflow: hidden;
    background: #0a1a2c;
    min-height: 540px;
}

#my-cal-inline-qualified-applicant-meeting {
    width: 100%;
    height: 620px;
    border-radius: 18px;
    background: #0f2238;
}

.booking-hint {
    font-size: 12px;
    color: #8fa5bc;
    margin-top: 12px;
}

/* ===== BUTTON ===== */
button {
    margin-top: 12px;
    padding: 14px;
    width: 100%;
    background: #3b82f6;
    border: none;
    border-radius: 40px;
    color: white;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: 0.2s;
}

button:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* ===== HONEYPOT (anti-spam) ===== */
.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* ===== DYNAMIC FIELDS STYLES ===== */
.dynamic-fields-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #2e4a70;
    border-top-color: #3b82f6;
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.readonly-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.eligibility-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #2e4a70;
}

.eligibility-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 16px;
    padding-left: 8px;
    border-left: 3px solid #3b82f6;
}

.eligibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    background: rgba(28, 53, 83, 0.3);
    border-radius: 12px;
    padding: 16px;
}

.eligibility-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #1c3553;
    border-radius: 8px;
}

.eligibility-label {
    font-size: 11px;
    color: #8fa5bc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
}

.eligibility-value {
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f0;
}

.dynamic-fields-error {
    text-align: center;
    padding: 40px 20px;
    background: rgba(248, 113, 113, 0.1);
    border-radius: 16px;
}

.dynamic-fields-error p {
    color: #f87171;
    margin-bottom: 20px;
}

.retry-btn {
    background: #3b82f6;
    border: none;
    padding: 8px 24px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    width: auto;
    margin-top: 0;
}

.dynamic-fields-empty {
    text-align: center;
    padding: 40px 20px;
    color: #8fa5bc;
}

/* ===== SUCCESS STATE ===== */
.success-box {
    text-align: center;
    background: #0f2238;
    padding: 60px 24px;
    border-radius: 32px;
    margin-top: 30px;
}

.success-box h2 {
    font-size: 28px;
    margin-bottom: 16px;
    color: #bbf0ff;
}

.success-box p {
    color: #cbd5e1;
    font-size: 16px;
}

/* ===== RTL ARABIC STYLES ===== */
body.ar {
    direction: rtl;
    text-align: right;
}

body.ar .section-title {
    border-left: none;
    border-right: 3px solid #3b82f6;
    padding-left: 0;
    padding-right: 12px;
}

body.ar .lang-row {
    text-align: left;
}

body.ar .form-section legend {
    margin-left: 0;
    margin-right: 8px;
}

body.ar .eligibility-title {
    border-left: none;
    border-right: 3px solid #3b82f6;
    padding-left: 0;
    padding-right: 8px;
}

body.ar .eligibility-field {
    flex-direction: row-reverse;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .form-section {
        padding: 20px 18px;
    }
    
    .readonly-fields-grid {
        grid-template-columns: 1fr;
    }
    
    .eligibility-grid {
        grid-template-columns: 1fr;
    }
    
    #my-cal-inline-qualified-applicant-meeting {
        height: 540px;
    }
}


/* ===== PAID CONSULTATION ADDITIONS ===== */

.info-message {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #3b82f6;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.6;
    color: #cbd5e1;
}

.payment-btn {
    background: #10b981;
    width: auto;
    min-width: 250px;
    margin: 0 auto;
    display: block;
}

.payment-btn:hover {
    background: #059669;
}

.payment-btn:disabled {
    background: #6b7280;
    cursor: not-allowed;
    opacity: 0.6;
}

.payment-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
}

.payment-status.success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.payment-status.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.payment-status.error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* RTL adjustments for Arabic */
body.ar .info-message {
    border-left: none;
    border-right: 3px solid #3b82f6;
}
