﻿/* ============================
   Modern Census View Stylesheet - Visual Studio Theme
   ============================ */

/* CSS Variables for Visual Studio inspired theming */
:root {
    /* Visual Studio Blue Theme Colors */
    --primary-color: #007ACC;           /* VS Blue */
    --primary-dark: #005A9E;            /* VS Dark Blue */
    --primary-light: #1E9EDB;           /* VS Light Blue */
    --secondary-color: #68217A;         /* VS Purple */
    --success-color: #16825D;           /* VS Green */
    --danger-color: #E51400;            /* VS Red */
    --warning-color: #CA5010;           /* VS Orange */

    /* Background Colors */
    --bg-primary: #FFFFFF;              /* White background */
    --bg-secondary: #F3F3F3;            /* Light gray */
    --bg-tertiary: #E8E8E8;             /* Medium gray */
    --bg-accent: #F5F5F5;               /* Accent background */

    /* Text Colors */
    --text-primary: #1E1E1E;            /* VS Dark text */
    --text-secondary: #3E3E3E;          /* VS Medium text */
    --text-muted: #717171;              /* VS Muted text */

    /* Border & Shadow */
    --border-color: #CCCEDB;            /* VS Border */
    --border-color-light: #E5E5E5;
    --border-radius: 4px;               /* VS uses sharper corners */
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    --box-shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.12);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Typography */
    --font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
}

/* ============================
   Base Styles
   ============================ */
body {
    background: var(--bg-secondary);
    background-attachment: fixed;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    margin: 0;
    padding: var(--spacing-xl) var(--spacing-md);
    line-height: 1.6;
}

h1 {
    color: var(--primary-color);
    font-size: var(--font-size-3xl);
    font-weight: 600;
    text-align: center;
    margin: 0 0 var(--spacing-xl) 0;
    text-shadow: none;
    letter-spacing: -0.025em;
}

h2 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--text-primary);
    margin: var(--spacing-lg) 0 var(--spacing-md) 0;
}

h4 {
    margin: 0;
    padding: 0;
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================
   Form Container
   ============================ */
#form1 {
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================
   Filter Panel
   ============================ */
.cssDDLs {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--box-shadow);
    width: auto;
    float: none;
}

.cssDDLs table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.cssDDLs table td {
    padding: var(--spacing-xs) var(--spacing-sm);
    border: none;
    vertical-align: middle;
}

.cssLabels {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 0;
    padding-right: var(--spacing-sm);
}

.cssDropdowns {
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    font-weight: 400;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all 0.15s ease;
    width: 100%;
    max-width: 300px;
}

.cssDropdowns:hover {
    border-color: var(--primary-color);
}

.cssDropdowns:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}

/* ============================
   Buttons
   ============================ */
input[type="submit"],
button,
.btn,
#ResetBtn,
#PrevHouse,
#NextHouse,
#btnSaveNotes,
#btnCancelNotes {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    background-color: var(--primary-color);
    color: white;
    box-shadow: none;
}

input[type="submit"]:hover,
button:hover,
.btn:hover,
#ResetBtn:hover,
#PrevHouse:hover,
#NextHouse:hover,
#btnSaveNotes:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: none;
    box-shadow: none;
}

#btnCancelNotes {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

#btnCancelNotes:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

input[type="submit"]:active,
button:active,
.btn:active {
    transform: none;
    background-color: var(--primary-dark);
}

input[type="submit"]:focus,
button:focus,
.btn:focus {
    outline: 1px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============================
   GridView Wrapper
   ============================ */
.cssdgOuter {
    position: static;
    left: auto;
    top: auto;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--box-shadow);
    margin-bottom: var(--spacing-xl);
    width: auto;
    overflow-x: auto;
}

/* ============================
   GridView Styles
   ============================ */
.dgGrid {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0;
    font-size: var(--font-size-sm);
}

/* GridView Header */
.DataGridFixedHeader,
.dgGrid th {
    background: var(--primary-color);
    color: white !important;
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-align: left;
    padding: var(--spacing-md) var(--spacing-sm);
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.dgGrid th:first-child {
    border-top-left-radius: var(--border-radius);
}

.dgGrid th:last-child {
    border-top-right-radius: var(--border-radius);
}

/* GridView Rows */
.dgGrid tr {
    transition: background-color 0.15s ease;
}

.dgGrid td {
    padding: var(--spacing-md) var(--spacing-sm);
    border-bottom: 1px solid var(--border-color-light);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    vertical-align: middle;
}

.dgGrid tr[style*="background-color:#EFF3FB"],
.dgGrid tr[style*="BackColor:#EFF3FB"] {
    background-color: var(--bg-primary) !important;
}

.dgGrid tr[style*="background-color:White"],
.dgGrid tr[style*="BackColor:White"] {
    background-color: var(--bg-accent) !important;
}

.dgGrid tr:hover {
    background-color: #E5F3FF !important;
    cursor: pointer;
}

.dgGrid tr[style*="D1DDF1"] {
    background-color: #CCE8FF !important;
    border-left: 3px solid var(--primary-color);
}

/* GridView Links */
.dgGrid a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.dgGrid a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* GridView Pager */
.dgGrid .pager,
.dgGrid tr[style*="BackColor:#2461BF"] {
    background: var(--bg-secondary) !important;
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.dgGrid .pager td {
    border: none;
    text-align: center;
}

.dgGrid .pager a,
.dgGrid .pager span {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    margin: 0 2px;
    border-radius: var(--border-radius);
    min-width: 32px;
    text-align: center;
    transition: all 0.15s ease;
}

.dgGrid .pager a {
    background-color: var(--bg-primary);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.dgGrid .pager a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    text-decoration: none;
}

.dgGrid .pager span {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.version-label {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    text-align: center;
}

/* ============================
   Detail Panel
   ============================ */
#detailsTable {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--box-shadow);
    margin-bottom: var(--spacing-xl);
    width: 100%;
}

#detailLabel {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    display: block;
}

#househLabel {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: var(--spacing-lg) 0 var(--spacing-md) 0;
    display: block;
}

.detailTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: var(--spacing-md);
}

.detailTable td {
    padding: var(--spacing-sm) var(--spacing-md) !important;
    border: none !important;
    vertical-align: top !important;
    line-height: 1.5 !important;
}

.detailTable .auto-style2,
.detailTable .auto-style4 {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    width: auto;
    padding-right: var(--spacing-lg) !important;
}

.detailTable .auto-style3 {
    color: var(--text-primary);
    font-weight: 400;
}

/* ============================
   Notes Editor Panel
   ============================ */
.notesEditor {
    background: var(--bg-primary);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    box-shadow: var(--box-shadow);
}

.notesEditor textarea {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    resize: vertical;
    margin: var(--spacing-sm) 0;
}

.notesEditor textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
}

/* ============================
   Icons
   ============================ */
.noteIcon {
    width: 20px;
    height: 20px;
    opacity: 0.7;
    transition: opacity 0.15s ease;
}

.noteIcon:hover {
    opacity: 1;
}

/* ============================
   Navigation Buttons
   ============================ */
.nav-buttons {
    width: 100%;
    margin: var(--spacing-lg) 0;
}

.nav-buttons td {
    text-align: center;
    padding: 0 !important;
    border: none !important;
}

#PrevHouse,
#NextHouse {
    margin: 0 var(--spacing-sm);
    min-width: 120px;
}

/* ============================
   Details Wrapper & Panel
   ============================ */
.details-wrapper {
    width: 100%;
    border-collapse: separate;
    border-spacing: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.details-wrapper > tbody > tr > td {
    vertical-align: top !important;
    padding: 0 !important;
    border: none !important;
}

.detail-panel {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--box-shadow);
    height: 100%;
}

/* ============================
   Detail Grid Table
   ============================ */
.detail-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.detail-grid tr {
    border-bottom: 1px solid var(--border-color-light);
}

.detail-grid tr:last-child {
    border-bottom: none;
}

.detail-grid td {
    padding: var(--spacing-md) var(--spacing-sm) !important;
    border: none !important;
    vertical-align: middle !important;
    line-height: 1.5 !important;
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 140px;
    white-space: nowrap;
}

.detail-value {
    color: var(--text-primary);
    font-size: var(--font-size-base);
    font-weight: 400;
}

.detail-highlight {
    font-weight: 600;
    color: var(--primary-color);
}

.detail-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.detail-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================
   Household Members Section
   ============================ */
.cssDetailOuter {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    box-shadow: var(--box-shadow);
    height: 100%;
}

#househLabel {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 var(--spacing-md) 0;
    display: block;
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--border-color);
}

/* Style the household members grid */
#dgSameHouse2 {
    margin-top: var(--spacing-md);
    font-size: var(--font-size-sm) !important;
}

#dgSameHouse2 td {
    padding: var(--spacing-sm) !important;
    font-size: var(--font-size-sm) !important;
}

/* ============================
   Remove Old Detail Styles
   ============================ */
.auto-style2,
.auto-style3,
.auto-style4,
.auto-style5,
.auto-style6 {
    /* Override old styles */
    width: auto !important;
    text-align: left !important;
}

.detailTable {
    /* Legacy cleanup */
    border: none !important;
    line-height: normal !important;
    height: auto !important;
    font-size: var(--font-size-base) !important;
    font-family: var(--font-family) !important;
}

/* ============================
   Pyramid Wrapper
   ============================ */
.pyramid-wrapper {
    margin: 20px auto;
    padding: 20px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    min-height: 650px;
    box-shadow: var(--box-shadow);
}

.pyramid-wrapper h2 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.pyramid-wrapper canvas {
    height: 600px !important;
    max-height: 600px;
}