@font-face { font-family: 'IM Fell Double Pica SC'; src: url(Resources/Fonts/IM_Fell_Double_Pica_SC/IMFellDoublePicaSC-Regular.ttf) format('truetype'); }
@font-face { font-family: 'Open Sans'; src: url(Resources/Fonts/Open_Sans/OpenSans-VariableFont_wdth,wght.ttf) format('truetype'); font-style: normal; font-weight: 300; }
@font-face { font-family: 'Open Sans'; src: url(Resources/Fonts/Open_Sans/Open_Sans/OpenSans-Italic-VariableFont_wdth,wght.ttf) format('truetype'); font-style: italic; font-weight: 600; }

/* Global Styles */

:root { 
    --bg: #e7e7e7; 
    --containerBg: #f4f4f4; 
    --cornerRadius: 2px;
    --displayFont: 'IM Fell Double Pica SC', serif; 
    --gridGap: 10px
}

body, input, select, button { font-family: 'Open Sans', sans-serif; }

body { 
    margin: 20px; 
    background-color: var(--bg);
    overflow-y: scroll; /* Allow scrolling */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
    display: none;
}

/* Also hide scrollbars on html element */
html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar {
    display: none;
}

h1 {
    font-weight: 500; 
    color: #333; 
    font-family: var(--displayFont);
}

h2 {
    font-weight: 500; 
    font-family: var(--displayFont);
}

/* Common text styles */
.selectNote,
.helptext,
.selection-label {
    font-size: 18px;
    font-style: normal;
    color: #555;
}

.household-header {
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Main menu layout for default page */
.main-menu-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    margin: 20px 0;
}

.menu-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.decorative-image {
    max-width: 400px;
    width: 100%;
    height: auto;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 200px;
}

.menu-button {
    width: 100%;
}

.menu-help {
    display: flex;
    align-items: center;
    min-width: 200px;
}

/* Button styles */
.rounded-button {
    background-color: #fff;
    border: none;
    color: #333;
    padding: 8px 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9em;
    margin: 2px 1px;
    cursor: pointer;
    border-radius: var(--cornerRadius);
    transition: background-color 0.3s;
    box-sizing: border-box;
    white-space: nowrap;
    word-wrap: normal;
    line-height: 1.3;
    box-shadow: 0 0 12px 0px #cccccc6b;
}

input.rounded-button {
    font-family: var(--displayFont); 
}
a.rounded-button h2 {
    margin: 0;
}

.rounded-button:hover {
    background-color: #45a049;
    color: #fff;
}

/* 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: var(--cornerRadius);
    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: 1.2em;
    padding: 5px 5px;
}

/* Households page specific button styles */
.households-page .rounded-button {
    text-align: left;
    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;
}

.button-grid-section { margin-bottom: 0; }

.responsive-button-grid {
    columns: 5;
    gap: var(--gridGap);
    width: 100%;
}
.responsive-button-grid .rounded-button {
    width: 100%;
    margin: 0 0 var(--gridGap) 0;
}

/* Default page uses smaller minimum */
.default-page .responsive-button-grid { }

/* Container styles */
.household-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--containerBg);
    padding: 20px;
    border-radius: var(--cornerRadius);
    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: var(--cornerRadius);
}

/* Table styles */
.household-table {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

    .household-table th {
        font-family: inherit;
        font-size: inherit;
        color: inherit;
        background-color: #507cd1;
        color: white;
        padding: 12px;
        text-align: left;
        font-weight: 600;
        border: none;
    }

.household-table td {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    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;
}

/* Touch-friendly scroll navigation arrows */
.scroll-nav-arrows {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1000;
}

.scroll-arrow {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #2c5aa0;
    color: white;
    border: 3px solid #fff;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    outline: none;
}

.scroll-arrow:hover,
.scroll-arrow:active {
    background-color: #45a049;
    transform: scale(1.1);
}

.scroll-arrow:active {
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .scroll-nav-arrows {
        right: 10px;
    }
    
    .scroll-arrow {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
}

/* Responsive breakpoints for main menu */
@media (max-width: 992px) {
    .main-menu-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .menu-help {
        justify-content: center;
        text-align: center;
    }
    
    .decorative-image {
        max-width: 250px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 24px;
    }
    
    .decorative-image {
        max-width: 250px;
    }
    
    .menu-buttons {
        min-width: 100%;
    }
    
    .menu-help {
        min-width: 100%;
    }
    
    .helptext {
        font-size: 16px;
    }
}

/* Responsive breakpoints for button grid */
@media (max-width: 576px) {
    body {
        margin: 10px;
    }
    
    .responsive-button-grid {
        columns: 2;
    }
    
    .household-container {
        padding: 10px;
    }
    
    .rounded-button {
        font-size: 14px;
        padding: 10px;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .responsive-button-grid {
        columns: 2;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .responsive-button-grid {
        columns: 3;
    }
}

@media (min-width: 1025px) and (max-width: 1200px) {
    .responsive-button-grid {
        columns: 4;
    }
}

@media (min-width: 1401px) {

}

/* 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: var(--cornerRadius);
    }

    .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;
    }
}