﻿/* =========================================
   PAGE SPECIFIC STYLES (Submission Form)
   ========================================= */

/* --- FORM LAYOUT --- */
.container {
    /* Kept for legacy support if needed, but form-card handles the main layout now */
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
}

.form-card {
    background-color: var(--bg-card);
    padding: 2.5rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    /* Added to center the card and prevent full-width expansion */
    max-width: 600px;
    width: 100%;
    margin: 2rem auto;
}

h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

/* Grid Layouts */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

/* --- INPUTS & CONTROLS --- */
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

/* Exclude checkboxes/radios from generic input styling to prevent 'appearance: none' issues */
input:not([type="checkbox"]):not([type="radio"]),
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background-color: var(--input-bg);
    color: var(--text-main);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
}

    /* Focus States */
    input:not([type="checkbox"]):not([type="radio"]):focus,
    select:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px var(--focus-ring);
    }

    input:disabled, select:disabled {
        background-color: var(--disabled-bg);
        color: var(--text-muted);
        cursor: not-allowed;
        opacity: 1;
    }

/* --- CHECKBOX CUSTOMIZATION --- */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    padding: 0;
    margin-top: 3px;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
    /* Explicitly set appearance to auto to ensure browser renders it */
    appearance: auto;
}

.checkbox-container label {
    margin-bottom: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.4;
    cursor: pointer;
}

.checkbox-container a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

    .checkbox-container a:hover {
        text-decoration: underline;
    }

/* --- BUTTONS --- */
.btn-submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

    .btn-submit:hover {
        background-color: var(--primary-hover);
    }

    .btn-submit:active {
        transform: translateY(1px);
    }

/* --- CUSTOM DROPDOWN --- */
.dropdown-wrapper {
    position: relative;
}

.dropdown-list {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    max-height: 240px;
    overflow-y: auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    z-index: 50;
    display: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

    .dropdown-list.active {
        display: block;
    }

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

    .dropdown-item:last-child {
        border-bottom: none;
    }

    .dropdown-item:hover {
        background-color: var(--primary-color);
        color: white;
    }

/* --- RESPONSIVE --- */
@media (max-width: 480px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-card {
        padding: 1.5rem;
    }
}
