/* Global Styles */
* {
    font-family: Arial, sans-serif;
}

body {
    margin: 20px;
    background-color: #f5f5f5;
}

.body {
    font-family: Arial, sans-serif;
}

h1 {
    font-weight: 500;
    color: #333;
}

/* Common text styles */
.selectNote,
.helptext,
.selection-label {
    font-size: 18px;
    font-style: normal;
    color: #555;
}

.household-header {
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Button styles */
.rounded-button {
    background-color: #507cd1;
    border: none;
    color: white;
    padding: 8px 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 2px 1px;
    cursor: pointer;
    border-radius: 12px;
    transition: background-color 0.3s;
    box-sizing: border-box;
    white-space: nowrap;
    word-wrap: normal;
    line-height: 1.3;
}

.rounded-button:hover {
    background-color: #45a049;
}

/* Navigation button styles for kiosk mode */
.nav-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
}

.nav-button {
    background-color: #2c5aa0;
    border: none;
    color: white;
    padding: 20px 40px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    min-width: 200px;
}

.nav-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.3);
}

.nav-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.nav-button.back-button {
    background-color: #6c757d;
}

.nav-button.back-button:hover {
    background-color: #5a6268;
}

.nav-button.home-button {
    background-color: #28a745;
}

.nav-button.home-button:hover {
    background-color: #218838;
}

/* Default page specific button styles */
.default-page .rounded-button {
    width: 100%;
    font-size: 18px;
    padding: 5px 5px;
}

/* Households page specific button styles */
.households-page .rounded-button {
    text-align: left;
    width: 90%;
    min-height: 50px;
}

/* Grid layouts */
.three-column-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 10px;
}

.three-column-grid .grid-item {
    padding: 5px;
}

.responsive-button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    padding: 10px;
    width: 100%;
}

/* Default page uses smaller minimum */
.default-page .responsive-button-grid {
    grid-template-columns: repeat(auto-fit, minmin(200px, 1fr));
}

/* Container styles */
.household-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Census info box */
.census-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-left: 4px solid #507cd1;
    margin-bottom: 20px;
    border-radius: 4px;
}

/* Table styles */
.household-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.household-table th {
    background-color: #507cd1;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border: none;
}

.household-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
    background-color: white;
}

.household-table tr:hover td {
    background-color: #f8f9fa;
}

.household-table tr:last-child td {
    border-bottom: none;
}

/* Responsive breakpoints for button grid */
@media (max-width: 576px) {
    body {
        margin: 10px;
    }

    .responsive-button-grid {
        grid-template-columns: 1fr !important;
    }

    .household-container {
        padding: 10px;
    }
    
    .nav-buttons {
        flex-direction: column;
    }
    
    .nav-button {
        width: 100%;
        min-width: unset;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .responsive-button-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .responsive-button-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (min-width: 1025px) and (max-width: 1400px) {
    .responsive-button-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (min-width: 1401px) {
    .responsive-button-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

/* Responsive table styles */
@media (max-width: 768px) {
    .household-table {
        font-size: 14px;
    }

    .household-table th,
    .household-table td {
        padding: 8px;
    }
}

/* Very small screens - stack table */
@media (max-width: 576px) {
    .household-table thead {
        display: none;
    }

    .household-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
    }

    .household-table td {
        display: block;
        text-align: right;
        padding: 10px;
        border-bottom: 1px solid #f0f0f0;
    }

    .household-table td:before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        color: #507cd1;
    }

    .household-table td:last-child {
        border-bottom: none;
    }
}