/* Page transition overlay */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.page-transition.fade-out {
    opacity: 1;
    pointer-events: all;
}

.page-transition.fade-in {
    opacity: 1;
    animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 1; }
    to { opacity: 0; }
}

:root {
    font-size: calc(0.5em + 1vw);

    --header-height: 90px;
    --logo-height: 70px;  
    --map-height: 350px;  
    --month-height: 96px;
    
    --left-width: 150px;
    --center-width: 250px;
    
    /* Colors */
    --primary-blue: #1a365d;
    --accent-blue: #0066cc;
    --text-muted: #718096;
    --gap-lg: 24px;
}

html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
    background-color: #fff;
}

body {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 500;
}

a,
a:visited,
a:hover,
a:focus,
a:active {
    text-decoration: none;
}

/* ========================================
   APP CONTAINER
   ======================================== */

#app-container {
    display: grid;
    grid-template-rows: var(--header-height) 1fr;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* ========================================
   HEADER
   ======================================== */

#app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--gap-lg);
    border-bottom: 3px solid var(--primary-blue);
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
}

#updated-date {
    font-size: 14px;
    font-style: italic;
    color: var(--text-muted);
    align-self: flex-start;
    padding-top: 10px;
}

#title {
    display: flex;
    align-items: center;
    gap: 20px;
}

#title h1 {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 32px;
    font-weight: 800;
    margin: 0;
    line-height: 0.85;
    color: #3333ff;
    letter-spacing: -0.5px;
}

.title-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 20px;
    border-left: 3px solid var(--primary-blue);
    align-self: stretch;
}

#nav-links a {
    color: var(--text-muted);
    font-size: 28px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
    padding: 6px 12px;
    border-radius: 4px;
}

#nav-links a:hover {
    color: var(--accent-blue);
    background-color: rgba(26, 54, 93, 0.05);
}

#nav-links a.active {
    color: var(--primary-blue);
    font-weight: 700;
    pointer-events: none;
    cursor: default;
}

#nav-links a.active:hover {
    color: var(--primary-blue);
    background-color: transparent;
}

/* ========================================
   MAIN CONTENT GRID
   ======================================== */

.container {
    display: grid;
    grid-template-areas:
        "chart-map             chart-map            results       "
        "chart-filed           chart-filed          results       "
        "chart-decided         chart-decided        results       "
        "chart-status          chart-topic          results       ";
    grid-template-columns: var(--left-width) var(--center-width) 1fr;
    grid-template-rows: var(--map-height) auto auto 1fr;
    column-gap: 30px;
    row-gap: 0;
    padding: 10px;
    height: 100%;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

#chart-map {
    margin-bottom: 16px;
}

#section-filed,
#section-decided {
    margin-bottom: 4px;
}

#results-zone {
    grid-area: results;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

#results-header {
    flex-shrink: 0;
    padding-bottom: 8px;
}

#case-count {
    margin-bottom: 8px;
}

#filter-boxes:empty {
    display: none;
}

#title {
    grid-area: title;
    fill: rgb(6, 15, 240);
    position: relative;
}

#section-filed {
    grid-area: chart-filed;
}

#section-decided {
    grid-area: chart-decided;
}

.chart-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

#chart-map {
    grid-area: chart-map;
}

#chart-topic {
    grid-area: chart-topic;
}

#chart-status {
    grid-area: chart-status;
}

#chart-list {
    flex: 1;
    overflow: auto;
}

