/* --- THEME COLORS --- */
:root {
    --theme-primary: #182b74; /* Dark Blue */
    --theme-secondary: #4fbefe; /* Light Blue/Cyan */
    --theme-accent: #2c448f; /* A darker version of primary for hover/focus */
    --text-dark: #333333;
    --text-light: #666666;
    --background-soft: #f9f9fc; /* Very light, off-white background */
    --border-soft: #e0e0e0;
}

/* 1. MODAL OVERLAY (The full screen background) - CRITICAL FIXES */
#enrollment-modal.modal-overlay {
    /* Base State: Hidden */
    opacity: 0;
    visibility: hidden;
    
    /* CRITICAL FIXES FOR LAYERING AND POSITIONING */
    position: fixed !important; /* Force fixed positioning */
    z-index: 999999 !important; /* Ultra-high Z-Index to overcome any conflict */
    
    /* Full viewport coverage */
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    
    /* Aesthetic and Centering */
    background-color: rgba(24, 43, 116, 0.85); /* Dark Blue transparent background */
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* 2. THE RULE THAT MAKES IT VISIBLE - AGGRESSIVE FIX */
/* When JavaScript adds the 'open' class, this rule overrides the display: none */
#enrollment-modal.modal-overlay.open {
    display: flex !important; /* MUST override display:none */
    opacity: 1 !important; /* Force full visibility */
    visibility: visible !important; /* Force browser to render */
}


/* 3. MODAL CONTENT (The white box with the form) */
#enrollment-modal .modal-content {
    background-color: white;
    padding: 35px;
    border-radius: 16px; /* Softer edges */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3); /* Soft shadow */
    width: 90%;
    max-width: 420px; /* Optimal width for clean form */
    position: relative;
    overflow: hidden; 
}

.close-button {
    color: var(--text-light);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
}

.close-button:hover {
    color: var(--theme-primary);
}

/* Typography and Headings Adjustment */
.modal-title {
    color: var(--theme-primary);
    font-size: 1.35em; /* Reduced header size */
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 5px;
    border-bottom: 3px solid var(--theme-secondary); /* Thicker, clear separator */
}

/* Form and Input Styling */
#paystack-enrollment-form {
    padding-top: 10px;
}

#paystack-enrollment-form label {
    display: block;
    margin-top: 18px;
    margin-bottom: 6px;
    font-size: 0.9em;
    color: var(--text-dark);
    font-weight: 600;
}

#paystack-enrollment-form input {
    width: 100%; 
    padding: 14px; /* Larger input fields */
    border: 1px solid var(--border-soft);
    border-radius: 8px; 
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
    background-color: white;
}

#paystack-enrollment-form input::placeholder {
    color: #aaaaaa;
    font-style: italic;
}

#paystack-enrollment-form input:focus {
    border-color: var(--theme-secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 190, 254, 0.2); /* Subtle glow effect on focus */
}

/* Slider and Page Styling */
.slider-wrapper {
    display: flex;
    width: 200%; /* Allows two pages side-by-side */
    /* Smoother, professional transition */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-page {
    width: 50%; /* Each page takes up half the slider width */
    padding: 5px;
    box-sizing: border-box;
    /* Allows fade-in/out effect during slide */
    transition: opacity 0.3s ease-in-out; 
}

/* Button Styling (Primary Theme) */
.submit-details-btn, #launch-paystack-btn {
    width: 100%;
    padding: 15px;
    margin-top: 35px;
    border: none;
    border-radius: 8px;
    font-size: 1.05em;
    font-weight: 700;
    cursor: pointer;
    background-color: var(--theme-primary); 
    color: white;
    box-shadow: 0 4px 10px rgba(24, 43, 116, 0.3);
    transition: background-color 0.2s, box-shadow 0.2s;
}

.submit-details-btn:hover, #launch-paystack-btn:hover {
    background-color: var(--theme-accent);
    box-shadow: 0 6px 15px rgba(24, 43, 116, 0.4);
}

/* Page 2 Confirmation Details */
.confirmation-details {
    padding: 20px;
    background-color: var(--background-soft);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    margin-bottom: 25px;
    line-height: 1.8;
}

.confirmation-details p {
    margin: 5px 0;
    font-size: 0.95em;
    color: var(--text-light);
}

#payer-email-display {
    color: var(--theme-primary);
    font-weight: 700;
}

.payment-instruction {
    font-style: italic;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.95em;
}

/* Back Button */
.back-button {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background-color: transparent;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s, color 0.2s;
}

.back-button:hover {
    background-color: #f0f0f0;
    color: var(--theme-primary);
}