/* =========================================
   PROGRESSIVE INSURANCE - 100 DAYS OF SUMMER
   FORM PAGES STYLES (Get a Code & Affidavit)
   ========================================= */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Override main.css body background for form pages */
body {
    font-family: 'Roboto', sans-serif;
    min-height: 100vh;
}

/* Form section styling */
.form-section {
    background-color: #f2fafc;
    padding: 120px 40px 60px;
    margin-top: -80px;
    margin-left: 10%;
    margin-right: 10%;
    position: relative;
    z-index: 1;
    border-radius: 15px;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.page-title {
    font-family: 'Brother1816PrintedRegular', sans-serif;
    font-size: 3rem;
    color: #0A3360;
    margin-bottom: 1rem;
}

.form-intro {
    font-size: 1.2rem;
    color: #393939;
    max-width: 500px;
    margin: 0 auto 40px;
    line-height: 1.5;
}

/* Form styling */
.code-form {
    text-align: left;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.form-group-small {
    flex-basis: 30%;
}

.form-group label, 
.section-title, 
.checkbox-label {
    font-weight: 700;
    color: #0A3360;
    margin-bottom: 8px;
    font-size: 1rem;
    display: block;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    background-color: white;
    border: none;
    border-radius: 10px;
    padding: 15px;
    font-size: 1rem;
    color: #333;
    font-family: 'Roboto', sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid #0077B3;
    outline-offset: 2px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.note {
    font-weight: 400;
    color: #555;
    font-size: 0.9rem;
}

.section-title {
    margin-top: 30px;
    margin-bottom: 15px;
    text-align: left;
    font-size: 1.3rem;
}

/* Checkbox styling */
.checkbox-group {
    display: flex;
    gap: 30px;
    text-align: left;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
    color: #333;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #0077B3;
}

/* Age confirmation checkbox specific styling */
.age-confirmation {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 8px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.age-confirmation:focus-within {
    border-color: #0077B3;
    box-shadow: 0 0 0 3px rgba(0,119,179,0.2);
}

.age-confirmation .checkbox-label {
    margin: 0;
    font-weight: 500;
    color: #0A3360;
    font-size: 1rem;
    gap: 12px;
    width: 100%;
}

.age-confirmation .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #0077B3;
    margin: 0;
}

.consent {
    margin-top: 15px;
}

.consent .checkbox-label {
    font-size: 0.9rem;
    color: #333;
    font-weight: normal;
    line-height: 1.4;
}

/* Tighten spacing between consecutive consent checkboxes */
.consent + .consent {
    margin-top: 8px;
}

/* Submit button */
.submit-button {
    background-color: #0077B3;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 20px 60px;
    font-family: 'Brother1816PrintedRegular', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    display: block;
    margin: 40px auto 10px; /* Reduced bottom margin from 20px to 10px */
    transition: background-color 0.3s ease;
}

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

/* RV icon */
.rv-icon-section {
    text-align: center;
    margin-top: 40px;
}

.form-rv-icon {
    width: 100px;
    height: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .form-section {
        margin: -80px 3% 0;
        padding: 100px 15px 40px;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group-small {
        flex-basis: 100%;
    }

    .checkbox-group {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .submit-button {
        width: 100%;
        max-width: 300px;
        padding: 18px 40px;
        font-size: 1.3rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }

    .form-intro {
        font-size: 1rem;
        padding: 0 10px;
    }

    .form-section {
        padding: 30px 10px;
    }
}

/* =========================================
   GRID LAYOUT FOR NEW GET CODE FORM
   ========================================= */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* Full-width element spans both columns */
.full {
    grid-column: 1 / -1;
}

/* Individual field wrapper */
.field {
    display: flex;
    flex-direction: column;
}

/* Flex container for activity checkboxes */
.checkbox-flex {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Remove obsolete .form-row/.form-group gaps for the new form */
.form-row,
.form-group {
    all: unset;
}

/* Refined field aesthetics */
.get-code-form input[type="text"],
.get-code-form input[type="date"],
.get-code-form input[type="email"],
.get-code-form select,
.get-code-form textarea {
    background: #FFFFFF;
    border: 1px solid #E0E6ED;
    border-radius: 8px;
    padding: 18px 20px;
    font-size: 1rem;
    line-height: 1.2;
    color: #0A3360;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.get-code-form input::placeholder,
.get-code-form textarea::placeholder,
.get-code-form select option[value=""] {
    color: #0A3360;
    font-weight: 500;
}

.get-code-form input:focus,
.get-code-form select:focus,
.get-code-form textarea:focus {
    outline: none;
    border-color: #0077B3;
    box-shadow: 0 0 0 3px rgba(0,119,179,0.2);
}

/* Remove inner spin buttons for number inputs on Chrome */
.get-code-form input[type=number]::-webkit-inner-spin-button,
.get-code-form input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Custom arrow for select */
.get-code-form select {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='%230077B3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 16px 16px;
}

/* Field notes (like age requirement) */
.field-note {
    font-size: 0.875rem;
    color: #6B7280;
    margin-top: 6px;
    font-style: italic;
}

/* Style the default option in selects to look like placeholders */
.get-code-form select option[value=""] {
    color: #0A3360;
    font-weight: 500;
}

.get-code-form select option:not([value=""]) {
    color: #0A3360;
    font-weight: normal;
}

.error-field {
    border: 1px solid #DC3545 !important; /* Red for errors */
}

.error-message {
    color: #DC3545;
    font-size: 0.8em;
    margin-top: 5px;
    display: block;
    width: 100%;
    text-align: left;
}

/* Ensure checkbox error message shows correctly */
.field.consent .error-message {
    margin-top: 5px;
}

/* Get-code page specific adjustments */
.container .page-content {
    min-height: auto !important; /* Override fixed min-height from faqs.css */
}

.container .faqs-section .background-shape {
    height: auto !important; /* Override fixed height from faqs.css */
    min-height: auto !important; /* Remove minimum height constraint */
    padding-bottom: 5px !important; /* Reduce space above Drink Play Win logo */
}

.container .faqs-section .background-shape-content {
    padding-bottom: 0 !important; /* Remove any additional padding */
}

.container .faqs-section .faqs-container {
    margin-bottom: 0 !important; /* Remove bottom margin from form container */
} 