/* --- 1. Global Reset and Page Layout (Dark Mode) --- */
body {
    /* Use 'Inter' as the primary font, falling back to safe sans-serifs */
    font-family: 'Inter', 'Arial', 'Helvetica Neue', Helvetica, sans-serif; 
    
    /* Crucial: Explicitly set the base text color for the entire page */
    color: #ffffff; 
    
    background-color: #121212; /* Deep Black/Dark Gray background */
    display: flex;
    justify-content: center;
    /* FIX: Ensure content always starts at the top, not vertically centered. */
    align-items: flex-start; 
    min-height: 100vh;
    margin: 0;
    padding: 20px 0;
}

/* Ensure common text elements inherit the white color */
p, li {
    color: #ffffff;
}

/* --- 2. Main Form Container Styling --- */
.sae-registration-form-container {
    background-color: #1e1e1e; /* Slightly lighter than the body background */
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 25px rgba(255, 255, 255, 0.1);
    max-width: 600px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #333;
    /* Defensive Fix for Arc Browser Layout Stability: Establishes a predictable stacking context */
    position: relative; 
    margin: 20px; 
}

/* --- 3. Heading and Title Styles (Orange) --- */
.sae-registration-form-container h2 {
    color: #FF7A01; /* VIBRANT ORANGE for the main title */
    text-align: center;
    margin-bottom: 5px;
    font-size: 2.2em;
    font-weight: 700;
}

.sae-registration-form-container p {
    color: #cccccc; /* Light gray text for readability */
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.1em;
}

/* --- 4. Course Selection Styles (Dropdown/Select and all form inputs) --- */
.course-selection-label {
    display: block;
    font-size: 1.2em;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Input, Textarea, and Select styling for dark theme */
input[type="text"], 
input[type="email"], 
input[type="date"],
input[type="number"],
input[type="tel"],
textarea,
select {
    width: 100%;
    /* SLIMMER INPUTS: Reduced vertical padding for less bulk */
    padding: 8px 12px;
    margin-bottom: 15px; 
    /* Restored original border and background color */
    border: 1px solid #444; 
    border-radius: 6px;
    background-color: #2a2a2a; 
    color: #ffffff;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* Custom SVG dropdown arrow for dark theme */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><path fill="%23FFFFFF" d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    cursor: pointer;
}

/* Active/Hover/Focus State for inputs and selects */
input:hover,
input:focus,
select:hover,
select:focus,
textarea:hover,
textarea:focus {
    border-color: #FF7A01;
    outline: none;
    box-shadow: 0 0 8px rgba(255, 122, 1, 0.5);
}

/* Textarea specific */
textarea {
    height: 250px; /* Increased height for content like Terms and Conditions */
    resize: vertical;
}

/* --- 5. Button Style (Big Orange Button) --- */
.submit-button {
    width: 100%;
    padding: 18px; 
    background-color: #FF7A01; 
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.2em; 
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 20px;
}

.submit-button:hover {
    background-color: #E66E00;
}

/* Styling for the disabled state of the submit button */
.submit-button:disabled {
    background-color: #444444; 
    color: #aaaaaa; 
    box-shadow: none; 
    cursor: not-allowed; 
    pointer-events: none;
}

/* --- 6. Table Styling for Dark Backgrounds (Restored original look) --- */
table {
    color: #ffffff; 
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th {
    color: #FF7A01;
    background-color: #2a2a2a;
    padding: 12px 15px;
    text-align: left;
    /* Restored original heavy orange bottom border */
    border-bottom: 2px solid #FF7A01; 
}

table td {
    /* Restored original cell padding */
    padding: 10px 15px; 
    /* Restored original divider line */
    border-bottom: 1px solid #444444; 
    /* FIX: Set vertical alignment to middle for better row alignment */
    vertical-align: middle; 
}

table tr:nth-child(even) {
    /* Restored original darker stripe */
    background-color: #1e1e1e; 
}

table tr:hover {
    background-color: #333333;
}

/* Remove margin-bottom from inputs inside tables for tighter layout */
table td input,
table td select,
table td textarea {
    margin-bottom: 0; 
}

/* --- 7. Link Styling --- */
a {
    color: #FF7A01; 
    text-decoration: none;
    transition: color 0.3s ease;
}

a:visited {
    color: #cccccc; 
}

a:hover {
    color: #ffffff;
    text-decoration: underline; 
}

a:active {
    color: #E66E00;
}

/* --- 8. Responsive adjustments for smaller screens --- */
@media (max-width: 500px) {
    .sae-registration-form-container {
        padding: 20px;
        box-shadow: none;
        border-radius: 0;
        margin: 0; /* Remove side margins on smallest screens */
    }
    
    body {
        padding: 0;
        background-color: #121212;
    }
}

/* --- 9. Logo Container Styling --- */
.logo-container {
    width: 100%;
    text-align: center;
    padding: 20px 0;
    background-color: transparent; 
}

.main-logo {
    max-width: 150px; 
    height: auto;
    display: inline-block;
}

/* Optional: If you want the logo to be full width on small mobile screens */
@media (max-width: 500px) {
    .main-logo {
        max-width: 100px;
    }
}

/* --- 10. Validation Styling --- */
input.error {
    border: 1px dotted red !important;
}

form label.error, label.error {
    color: red;
    font-style: italic
}

/* --- 11. Styled Radio Cards (e.g., for Payment Plans) --- */

/* Container for flexibility */
.payment-card-group {
    display: flex;
    flex-direction: column; /* Stack them vertically by default */
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* The actual radio button input */
.styled-radio-card {
    /* Hide the default radio button visually, but keep it accessible/functional */
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Style the associated label element to look like a clickable card */
.styled-radio-card + label {
    display: block;
    cursor: pointer;
    background-color: #2a2a2a; /* Slightly lighter than form background */
    color: #cccccc;
    padding: 15px 20px;
    border-radius: 6px;
    border: 2px solid #444;
    transition: all 0.2s ease;
    font-size: 1.1em;
    font-weight: 500;
}

/* Hover state */
.styled-radio-card + label:hover {
    border-color: #FF7A01;
    color: #ffffff;
}

/* Style when the radio button IS CHECKED */
.styled-radio-card:checked + label {
    background-color: #FF7A01; /* Orange highlight */
    color: #1e1e1e; /* Dark text on orange */
    border-color: #E66E00;
    box-shadow: 0 0 10px rgba(255, 122, 1, 0.6);
}

/* Ensure the text content inside the checked label has good contrast */
.styled-radio-card:checked + label * {
    color: #1e1e1e !important;
}

@media (max-width: 500px) {
    .payment-card-group {
        gap: 10px;
    }
}

	
	