/*-----------------------------------------------------------------------------
 file: qml_registration.css
 description: Modern, academic-styled stylesheet for QML Workshop Registration
-----------------------------------------------------------------------------*/

:root {
    --primary-color: #9D2235; /* Academic Cherry Red */
    --primary-hover: #7a1a29;
    --text-main: #333333;
    --text-muted: #666666;
    --bg-light: #f8f9fa;
    --border-color: #dddddd;
    --white: #ffffff;
    --error-red: #e81919;
    --success-green: #2e7d32;
    --font-heading: 'Merriweather', serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: #f0f2f5;
    line-height: 1.6;
}

/* --- Layout Wrapper --- */
.page-wrapper {
    display: flex;
    flex-wrap: wrap;
    max-width: 1100px;
    margin: 40px auto;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* --- Sidebar / Workshop Info --- */
.workshop-info {
    flex: 1 1 350px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 30px;
}

.workshop-info h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 20px;
}

.workshop-info .lead {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.info-block {
    margin-bottom: 25px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 15px;
}

.info-block h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #f1c40f; 
}

.info-block.requirements ul {
    list-style-type: disc;
    margin-left: 20px;
}

.info-block.requirements li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.info-block a {
    color: var(--white);
    text-decoration: underline;
}

.sponsor-text {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 20px;
    font-style: italic;
}

/* --- Form Container --- */
.registration-container {
    flex: 2 1 600px;
    padding: 40px 50px;
}

.form-header {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 20px;
}

.form-header h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* --- Academic Form Styling --- */
.academic-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-group.half-width {
    flex: 1 1 calc(50% - 10px);
}

.form-group {
    display: flex;
    flex-direction: column;
}

label, legend {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-main);
}

fieldset {
    border: none;
}

.required {
    color: var(--primary-color);
    margin-left: 3px;
}

/* Input Fields + Textarea */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: var(--white);
    width: 100%;
}

textarea {
    resize: vertical; /* Allows the user to drag the box taller if needed */
    min-height: 100px;
    line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(157, 34, 53, 0.1);
}

/* --- Radios --- */
.radio-group {
    display: flex;
    gap: 20px;
}

.radio-label {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* --- Conditional Fields --- */
.conditional-field {
    display: none;
    background-color: var(--bg-light);
    padding: 20px;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
    margin-top: -10px; 
}

/* --- reCAPTCHA & Submit --- */
.recaptcha-container {
    margin-top: 10px;
}

.form-actions {
    margin-top: 20px;
}

.btn-submit {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: var(--font-body);
}

.btn-submit:hover {
    background-color: var(--primary-hover);
}

/* --- Alerts --- */
.alert {
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert h3 {
    margin-bottom: 10px;
}

.alert-error {
    background-color: #fee2e2;
    color: var(--error-red);
    border: 1px solid #f87171;
}

.alert-success {
    background-color: #e8f5e9;
    color: var(--success-green);
    border: 1px solid #81c784;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .page-wrapper {
        margin: 20px;
        flex-direction: column;
    }
    .form-group.half-width {
        flex: 1 1 100%;
    }
    .registration-container {
        padding: 30px 20px;
    }
    .workshop-info {
        padding: 30px 20px;
    }
}