/* 
Voterizer Voter Information Page Styles
This file contains styles specific to the voter information detail page.
It should be used in conjunction with the main styles.css file.
*/

/* Voter Info Content Container */
.voter-info-content {
    padding: 40px 0;
    max-width: 800px;
    margin: 0 auto;
    text-align: center; /* Center all content */
}

/* Important Notes Section - Left aligned */
.voter-info-content .info-section:last-child {
    text-align: left;
}

/* Location Title */
#location-title {
    color: var(--demblue);
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    margin-top: -30px; /* Changed from -30px to add space between header and state name */
    text-align: center;
}

/* Info Sections */
.info-section {
    margin-bottom: 30px;
}

/* Action Buttons */
.action-button {
    background-color: var(--demblue);
    color: white;
    border-style: ridge;
    border-color: var(--demblue);
    border-width: 10px;
    padding: 6px 30px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.2rem;
    cursor: pointer;
    display: inline-flex;
    text-decoration: none;
    transition: background-color 0.3s ease;
    margin: auto;
}

.action-button:hover,
.action-button:focus {
    background-color: var(--mandarin);
}

.action-button img {
    margin-right: 10px;
    height: 20px;
}

/* Action Buttons for Polling Place and Voter ID */
.action-button-2 {
    background-color: var(--demblue);
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 10px 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    margin: 0px 10px 0px 10px;
    width: 250px;
    height: 80px;
    justify-content: flex-start;
}

.action-button-2:hover,
.action-button-2:focus {
    background-color: var(--mandarin);
}

/* Instruction Text */
.instruction-text {
    margin-top: 8px;
    line-height: 1.2;
    color: black;
    font-size: 1rem;
    font-weight: 600;
}

/* Student Checkbox */
.student-checkbox-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.student-checkbox-container input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

.student-checkbox-container label {
    font-weight: 600;
    cursor: pointer;
    color: var(--demblue);
}

#student-info-box {
    margin-top: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 20px;
    border-radius: 8px;
    background-color: var(--lightgray);
    color: black;
    font-weight: 600;
    font-size: 16px;
}

/* Info Boxes */
.info-box {
    background-color: var(--lightgray);
    color: black;
    width: 100%;
}

/* Who to Vote For/Against Box */
#who-to-vote-for-text {
    background-color: var(--lightgray);
    font-weight: 600;
    color: black;
    font-size: 18px;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

#who-to-vote-for-text a {
    color: var(--demblue);
    font-weight: bold;
    text-decoration: underline;
}

#who-to-vote-for-text a:hover {
    color: var(--mandarin);
}

/* Next Election Box */
#next-election-text {
    background-color: var(--lightgray);
    color: black;
    font-weight: bold;
    font-size: 24px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    width: 100%;
    max-width: 100%;
}

.info-box h3 {
    color: white;
    margin-bottom: 10px;
    display: none; /* Hide the titles as requested */
}

.info-box a {
    color: white;
    font-weight: bold;
    text-decoration: underline;
}

.info-box a:hover {
    color: var(--lightgray);
}

/* Rich Text Content */
.important-notes-header {
    color: var(--demblue);
    font-size: 1.0rem;
    font-weight: 600;
    margin-bottom: 0px;
    text-transform: uppercase;
}
.rich-text-content {
    line-height: 1.8;
}

.rich-text-content h1 {
    color: var(--demblue);
    font-size: 32px;
}

.rich-text-content h2 {
    color: var(--demblue);
    font-size: 24px;
}

.rich-text-content h3 {
    color: var(--demblue);
    font-size: 20px;
    font-weight: 500;
}

.rich-text-content h4 {
    color: var(--darkgray);
    font-size: 20px;
    font-weight: 400;
}

.rich-text-content h5 {
    color: var(--darkgray);
    font-size: 18px;
    font-weight: 400;
}

.rich-text-content h6 {
    color: black;
    font-size: 15px;
    font-weight: 600;
}

.rich-text-content p {
    color: black;
    font-size: 14px;
    font-weight: 400;
}

.rich-text-content a {
    color: var(--demblue);
    text-decoration: underline;
}

.rich-text-content a:hover {
    color: var(--mandarin);
}

/* Section Headers */
.info-section h2 {
    color: var(--demblue);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Polling Place and Voter ID Buttons Container */
.polling-voter-id-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}

/* Polling Place and Voter ID Buttons */
.polling-button,
.voter-id-button {
    text-decoration: none;
}

.polling-button img,
.voter-id-button img {
    height: 50px;
    width: auto;
    margin-right: 15px;
}

/* Button Text */
.button-text {
    color: white;
    font-weight: 600;
    font-size: 1.4rem;
    text-align: left;
    margin-left: 5px;
    line-height: 1.5rem;
}

/* Register and Vote by Mail Buttons */
.register-button,
.vote-by-mail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 360px;
    width: 100%;
    margin: 0;
}

/* Instruction text for register and vote by mail */
#register-instructions,
#vote-by-mail-instructions {
    width: 100%;
    max-width: 40%;
    margin: 15px auto 0;
    text-align: center;
}

/* Voter Information Form Styles */
.voter-info-form-container {
    background-color: #f0f0f0; /* Light gray background */
    padding: 10px;
    border: 1px solid #ccc; /* Softer border */
    border-radius: 8px; /* Rounded corners */
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Who to Vote For/Against Box */
.form-header-text {
    font-weight: 600;
    color: var(--demblue);
    font-size: 24px;
    text-align: left;
}

.voter-info-form {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Space between rows */
}

.form-row {
    display: flex;
    gap: 15px; /* Space between fields */
    align-items: flex-end; /* Align items to the bottom */
}

.form-field {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Allow fields to grow and fill space */
}

.form-field label {
    font-weight: normal;
    color: #000;
    font-size: 0.9rem;
    margin-bottom: 2px; /* Space between label and input */
    text-align: left; /* Align labels to the left */
}

.form-field input {
    padding: 4px 4px;
    border: 1px solid #999; /* Slightly darker border for inputs */
    border-radius: 4px; /* Rounded corners for inputs */
    background-color: white;
    font-size: 1rem;
    height: 26x;
    box-sizing: border-box;
    width: 100%; /* Make inputs fill the form-field container */
}

.form-field input:focus {
    outline: 2px solid var(--demblue);
    outline-offset: 0;
    border-color: var(--demblue);
}

/* --- Field-specific width adjustments --- */

/* First, Middle, Last Name */
.form-row:first-child .form-field:nth-child(1) { flex-grow: 2; } /* First name */
.form-row:first-child .form-field:nth-child(2) { flex-grow: 1; } /* Middle name */
.form-row:first-child .form-field:nth-child(3) { flex-grow: 2; } /* Last name */
  
/* Date of Birth */
#dob {
    width: 180px; /* Specific width for date picker */
    color: #666;
}

/* Address 1 and 2 */
.form-row:nth-child(3) .form-field {
    flex-basis: 50%; /* Each address field takes up half the row */
}

/* City, State, Zip */
.form-row:nth-child(4) .form-field:nth-child(1) { flex-grow: 3; } /* City */
.form-row:nth-child(4) .form-field:nth-child(2) { flex-grow: 0; flex-basis: 40px; } /* State */
.form-row:nth-child(4) .form-field:nth-child(3) { flex-grow: 0; flex-basis: 120px; } /* Zip */


.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-end; /* Align buttons to the right */
}

.form-button {
    background-color: var(--demblue);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    max-height: 40px;
    margin-top: 20px;
}

.form-button:hover,
.form-button:focus {
    background-color: #1e5a8e;
}

.form-button.secondary {
    background-color: var(--demblue);
}

.form-button.secondary:hover,
.form-button.secondary:focus {
    background-color: #1e5a8e;
}

.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 0;
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Form Styles */
@media (max-width: 768px) {
    .voter-info-form-container {
        max-width: 100%;
        margin: 0 15px 25px 15px;
    }

    .voter-info-form {
        padding: 15px;
    }

    .form-row {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .form-row label {
        font-size: 0.9rem;
    }

    .form-row input {
        width: 100%;
        padding: 10px;
        font-size: 0.95rem;
        height: 42px;
    }

    .form-row:nth-child(2) input {
        max-width: 100%;
    }

    .form-row:nth-child(4) input:nth-of-type(2) {
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }

    .form-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .voter-info-form-container {
        margin: 0 10px 20px 10px;
    }

    .voter-info-form {
        padding: 12px;
    }

    .form-row input {
        padding: 8px;
        height: 40px;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .voter-info-content {
        padding: 20px 0;
    }
    
    #location-title {
        font-size: 2rem;
        margin-top: -10px; /* Add space between header and state name */
    }
    
    .action-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* Add space between the two blue buttons */
    .polling-button {
        margin-bottom: 20px;
    }

    /* Adjust spacing for info sections on mobile */
    .info-section {
        margin-bottom: 40px;
    }
    
    /* Make instruction text 70% of button width on mobile */
    #register-instructions,
    #vote-by-mail-instructions {
        max-width: 70%;
    }
}
