.element {
    background-color: #000000;
}

body {
  background-color: #faf7f1;
  font-family: "Open Sans", sans-serif;
  height: 100vh;
  width: 100%;
  font-size: 15px;
  margin: 0;
  color: #0c0c0c;
}

.page-wrapper {
    width: 100%;
    height: 100vh;
    background-color:#faf7f1;
    display: flex;             
    flex-direction: column;    
    justify-content: flex-start;
    align-items: center;
    font-family: "Open Sans", sans-serif;
    z-index: 0;
}

.map-wrapper {
    width: 100%;          
    height: 100%;        
    position: relative;
    display: flex;   
    flex-grow: 1   
}


#map {
    width: 100%;
    height: 103%;
    border-radius: 8px;
}

.legend {
    position: absolute;
    bottom: 6px;
    left: 10px;
    
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 0 6px rgba(0,0,0,0.3);

    opacity: 0.9;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    z-index: 9998;
}

.leg-item {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 4px;
    margin-right: 6px;
}


.good { background: #00e400; }
.moderate { background: #ffff00; }
.usg { background: #ff7e00; }
.unhealthy { background: #ff0000; }
.vunhealthy { background: #99004c; }
.haz { background: #7e0023; }


.filter-box {
  position: absolute;
  bottom: 50px;
  display: grid;
  grid-auto-flow: column; 
  
  left: 10px;
  align-items: center; 
  background:white;
  padding-top: 20px;
  padding: 10px;
  font-size: 12px;
  border-radius: 6px;
  opacity: 0.9;
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
  z-index: 1000;
  gap: 15px; 
}

@media (max-width: 768px) {

    /* Filter box mobile */
    .filter-box {
        bottom: 60px;     /* move higher */
        left: 10px;       /* adjust */
        right: 10px;      /* optional — center it */
        width: 50%;      /* expand */
        gap: 8px;
        padding: 12px;
        font-size: 10px;
        grid-auto-flow: column; /* stack vertically on small screens */
    }

    /* Legend mobile */
    .legend {
        bottom: 10px;
        left: 10px;
        right: 10px;
        width: auto;
        padding: 10px 14px;
        font-size: 8px;
        gap: 8px;
    }

    .leg-item {
        width: 10px;
        height: 10px;
        margin-right: 4px;
    }
}

.check-title{
    border-radius: 6px;
    margin: 3px 2px 6px 3px;
}

.check-title :hover{
    background-color: #aeaaa0;
}

.charts-wrapper {
    display: table-row;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 300px;
    height: 90%;
    background: white;
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    font-family: "Open Sans", sans-serif;
    font-size: 14px;
    opacity: 0.85;
    z-index: 10000;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 16px;
    cursor: pointer;
    z-index: 20000;
}

.aqi-overlay {
    background: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    box-shadow: 0 3px 9px rgba(0,0,0,0.25);
    position: relative;
}

.separator {
    height: 1px;          
    width: 250px; 
    background-color: #242424; 
    margin-right: auto;
    margin-left: auto;       
    border-radius: 1px;    
}


.aqi-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.aqi-value {
    margin-top: 6px;
    font-size: 20px;
    font-weight: 600;
}

.aqi-sub {
    margin-top: 6px;
    font-size: 10px;
    opacity: 0.7;
}

.aqi-category {
    margin-top: 14px;
    font-size: 12px;
    font-weight: 600;
}

.aqi-icon {
    margin-left: 6px;
    margin-bottom: 6px;
    font-size: 30px;
    font-family: "Segoe UI Emoji", "Noto Color Emoji", "Apple Color Emoji", sans-serif;
}

.aqi-footer {
    margin-top: 10px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 10px;
}


.global-wrapper {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 300px;
    height: 600px;
    display: flex;
    flex-direction: column;
    gap: 10px;

    padding: 14px;
    background: white;  /* light transparent white */
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);

    z-index: 9999;
}

/* Global AQI */
#globalAQIBox {
    padding: 12px;
    margin-top: 30px;
    background: #f4f4f4;
    border-radius: 8px;
    font-size: 10px;
}

/* Top 5 containers */
.global-wrapper .aqi-container {
    background: #f7f7f7;
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
}

.global-wrapper .aqi-table {
    display: grid;
    grid-template-columns: 15px 180px 30px;
    gap: 8px;
    font-size: 11px;
}

.aqi-box {
    color: white;
    padding: 6px;
    border-radius: 4px;
    display: inline-block;
    min-width: 40px;
    font-size: 11px;
    text-align: center;
}

.detail-wrapper {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 300px;
    height: 600px;
    display: flex;
    flex-direction: column;
    gap: 12px;

    padding: 14px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);

    z-index: 9999;
    
}

.detail-wrapper .close-btn {
    position: absolute;
    top: 8px;
    right: 14px;
    cursor: pointer;
    opacity: 0.7;
}

/* AQI box */
.detail-wrapper .aqi-overlay {
    padding: 14px;
    margin-top: 25px;
    background: #f4f4f4;
    border-radius: 8px;
}

/* Text box */
.detail-wrapper .analysis-box {
    padding: 12px;
    border-radius: 8px;
    font-size: 12px;
}

/* Divider */
.detail-wrapper .separator {
    height: 1px;
    background: #ddd;
}

/* Chart boxes */
.detail-wrapper .chart-box {
    background: #f9f9f9;
    border-radius: 8px;
}

/* Overlay container */
.download-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;          
    z-index: 9999;
    display: flex;
    align-items: center;   
}

.switcher {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 300px;
}

.card-wrapper {
    width: 300px;
    display: flex;
    border-radius: 12px;
    border-color: #ffe7a3;

}

.switch-card {
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 8px 20px 8px 20px;
    width: 260px;
    height: 250px;
    background-color: #faf7f1;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #ffe7a3;
    border-radius: 12px;
    
}

.hidden {
    display: none !important;
}

.switch-btn {
    margin-top: 10px;
    padding: 8px 12px 8px 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    width: auto;
    border: none;
    background-color: #faf7f1;

    border-radius: 12px;
    cursor: pointer;
}

.switch-btn:hover {
    background: #aeaaa0;
}

.switch-label{
    font-size: 13px;
}

.analysis-box {
    display: flex;
    align-items: center;
    gap: 10px;

    background: #f3f3f3;
    border-radius: 12px;
    border: 1px solid #e8e8e8;

    padding: 14px 18px;
    margin: 10px 0;

    font-size: 12px;
    font-weight: 500;
    color: #5a3800;

    transition: 0.2s ease;
}


.hidden {
    display: none !important;
}

/* color themes */
.analysis-low {
    background: #e9f8e9;
    border-color: #c8e8c8;
    color: #256d1b;
}

.analysis-medium {
    background: #fff8e1;
    border-color: #ffe7a3;
    color: #8a5a00;
}

.analysis-high {
    background: #ffe8e6;
    border-color: #f8bab5;
    color: #8b1a15;
}

@media (max-width: 768px) {

    /* MAIN WRAPPERS become a bottom sheet */
    .charts-wrapper,
    .global-wrapper,
    .detail-wrapper {
        position: fixed !important;
        top: 80px;
        right: 10px;

        width: 40% !important;
        height: 30vh; /* 50% screen height */
        padding: 14px 18px !important;

        border-radius: 18px;
        background: white;
        box-shadow: 0 -2px 14px rgba(0,0,0,0.25);

        display: flex;
        flex-direction: column;
        gap: 14px;

        overflow-y: auto;
        z-index: 99999;
    }

    /* AQI overlay section */
    #globalAQIBox,
    .detail-wrapper .aqi-overlay {
        margin-top: 10px !important;
        padding: 10px !important;
        font-size: 11px !important;
    }

    /* Text analysis boxes shrink */
    .analysis-box {
        padding: 10px !important;
        font-size: 11px !important;
    }

    /* CLOSE BUTTON */
    .detail-wrapper .close-btn {
        top: 8px;
        right: 16px;
        font-size: 20px;
        opacity: 0.8;
    }

    /* TABLE + GRID shrink */
    .global-wrapper .aqi-table {
        grid-template-columns: 5px 30px 10px !important;
        font-size: 8px !important;
        gap: 6px !important;
    }

    .aqi-box {
        padding: 4px 6px !important;
        font-size: 8px !important;
        min-width: 32px !important;
    }

    /* Divider */
    .detail-wrapper .separator {
        margin: 6px 0;
    }

    /* CARDS become horizontal slider */
    .switcher {
        display: none;
    }

}


.panel-wrapper {
    display: flex;
    align-items: center;   
    height: 100%;
}


.side-panel-toggle {
    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    position: relative;
    z-index: 2;

    background: #faf7f1;
    border-radius: 0 5px 5px 0;
    border: none;
    cursor: pointer;
}


.sp-icon-close { display: none; }


.side-panel {
    height: 675px; 
    padding-top: 80px;         
    width: 0;             
    overflow: hidden;
    margin-top: auto;
    margin-bottom: auto;

    background: #faf7f1;
    border-radius: 0 5px 5px 0;
    box-shadow: 0 0 8px rgba(0,0,0,0.25);
    transition: width 0.3s ease;
}


.download-wrapper.open .side-panel {
    width: 300px;         
}

.download-wrapper.open .sp-icon-open { display: none; }
.download-wrapper.open .sp-icon-close { display: inline; }


.filter-group {
    display: flex;
    flex-direction: column;
    padding: 16px;
    font-size: 14px;
}

.filter-group label {
    margin-bottom: 5px;
}

#startDateFilter,
#endDateFilter {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

#downloadBtn {
    width: 100%;
    padding: 10px;
    background: #faf7f1;
    border: 1px solid #ffe7a3;
    color: rgb(0, 0, 0);
    border-radius: 6px;
    cursor: pointer;
}

#downloadBtn:hover {
    background: #e6d9bf;
}




/* GLOBAL FONT */
body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
}

/* NAVBAR */
#navbar {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    
    padding: 15px 80px 15px 50px;
    background: #faf7f1;
    backdrop-filter: blur(12px);

    position: sticky;
    top: 0;
    z-index: 100001;
}

/* LEFT TITLE */
.nav-title {
    font-size: 20px;
    font-weight: 600;
    padding-right: 40px; 
}

/* CENTER LINKS */
.nav-center {
    display: flex;
    gap: 40px; 
    flex-grow: 1;
    justify-content: center;
}

/* NAV LINKS */
.nav-center a {
    text-decoration: none;
    color: #333;
    font-size: 17px;
    font-weight: 500;
}

/* Navbar links */
.nav-center a {
    position: relative;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 5px 0;
}

/* Underline effect */
.nav-center a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background-color: #333;
    transition: width 0.3s ease;
}

/* Hover effect */
.nav-center a:hover::after {
    width: 100%;
}

/* Active link underline */
.nav-center a.active::after {
    width: 100%;
}


.nav-right {
    display: flex;
    align-items: center;
    z-index: 100001;
}

.profile-icon {
    font-size: 30px;
    cursor: pointer;
    padding-left: 40px;
}


.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 250px;
    height: 100%;
    background: #faf7f1;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    transition: transform 0.3s ease;   /* FIXED */
    transform: translateX(100%);       /* start hidden */
    z-index: 100000;
}

.mobile-menu.active {
    transform: translateX(0);          /* slide in */
}


.mobile-menu a {
    font-size: 16px;
    color: #333;
    text-decoration: none;
}

#navbar .menu-toggle.material-symbols-outlined {
    display: none !important;
}

/* ---- MOBILE RESPONSIVE ---- */
@media (max-width: 768px) {

    #navbar .nav-center {
        display: none !important;
    }

    #navbar .menu-toggle.material-symbols-outlined {
        display: inline-block  !important;
        z-index: 100000;
        font-size: 32px;
        cursor: pointer;
        margin-left: 20px;
    }

    #navbar {
        padding: 15px 20px;
    }
}

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 50px;
    background: url("https://images.unsplash.com/photo-1640094646405-6baea9ed7cb5?auto=format&fit=crop&w=2000&q=80")
                center/cover no-repeat;    
    color: white;
}

.hero h1 {
    font-size: 50px;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero p {
    font-size: 20px;
    font-weight: 300;
}

.basic-title {
    font-size: 18px;
    font-weight: 500;
    margin-left: 14px;
}

.content-wrapper {
    max-width: 80rem; 
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem; 
    padding-right: 1rem;
}
@media (max-width: 768px) { 
    .content-wrapper {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}
@media (max-width: 1024px) { 
    .content-wrapper {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.hero-section {
    position: relative;
    height: 500px;
}
.hero-image-fallback {
    position: absolute;
    inset: 0;
}
.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4); 
}
.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}
.text-block {
    max-width: 56rem; 
}
.hero-content h1 {
    color: white;
    font-size: 2.25rem;
    margin-bottom: 1.5rem; 
}
.hero-content p {
    color: rgba(255, 255, 255, 0.9); 
    font-size: 0.875rem; 
    line-height: 1.625; 
}
.hero-content strong {
    font-weight: 700;
}

.selectors-bar {
    background-color: white;
    border-bottom: 1px solid #e5e7eb; 
}
.selectors-bar .content-wrapper {
    padding-top: 1.5rem; 
    padding-bottom: 1.5rem;
}
.selectors-flex {
    display: flex;
    flex-wrap: wrap; 
    gap: 1.5rem; 
    align-items: flex-end; 
}
.selector-group {
    flex: 1 1 200px; 
}
.selector-group label {
    display: block;
    color: #374151; 
    margin-bottom: 0.5rem; 
}
.custom-select, .custom-input {
    width: 100%;
    padding: 0.5rem 1rem; 
    border: 1px solid #d1d5db; 
    border-radius: 0.5rem; 
    transition: all 0.2s;
}
.custom-select:focus, .custom-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.5);
    border-color: #f59e0b;
}
.update-btn {
    padding: 0.5rem 1.5rem;
    background-color: #d97706; 
    color: white;
    border-radius: 0.5rem; 
    transition: background-color 0.2s;
    flex-shrink: 0;
}
.update-btn:hover {
    background-color: #b45309; 
}

.visualizations-section {
    background-color: #f9fafb;
    padding-top: 3rem; 
    padding-bottom: 3rem;
}
.viz-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 columns on desktop */
    gap: 2rem;
}

.heatmap-card {
        grid-column: span 2 / span 2; }

@media (max-width: 768px) {
    .viz-grid {
        grid-template-columns: 1fr;  /* collapse into one column */
    }

    .heatmap-card {
        grid-column: span 1; /* reset any span */
    }
}

.heatmap-card, .chart-card {
    background-color: white;
    border-radius: 0.5rem;
    align-items: center;
    height: 700px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    padding: 1.5rem; 
}


.card-title {
    color: #111827; 
    margin-bottom: 1rem; 
    font-size: 1.25rem;
    font-weight: 600;
}

.chart-placeholder{
    background-color: #f3f4f6; 
    border-radius: 0.5rem; 
    height: 380px;
    width: 300px;
    display: flex;
    align-items: center;
    margin: auto;
    justify-content: center;
}

.map-placeholder {
    background-color: #f3f4f6; 
    border-radius: 0.5rem; 
    width: 600px;
    height: 560px;
    display: flex;
    align-items: center;
    margin: auto;
    justify-content: center;
}

.map-placeholder .text-center p,
.chart-placeholder .text-center p {
    color: #9ca3af;
}
.map-placeholder .text-center .text-sm,
.chart-placeholder .text-center .text-sm {
    font-size: 0.875rem;
}

.legend-bar {
    margin-top: 1rem; 
    display: flex;
    align-items: center;
    gap: 0.5rem; 
}
.legend-label {
    font-size: 0.875rem; 
    color: #4b5563; 
    flex-shrink: 0;
}
.legend-gradient {
    flex: 1; 
    height: 1rem; 
    border-radius: 0.25rem; 
    background: linear-gradient(to right,
        #30123b 0%,
        #0096c7 25%,
        #4cc936 50%,
        #f8c627 75%,
        #9e0000 100%
    );
}
.legend-values {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem; 
    color: #4b5563; 
    flex-shrink: 0;
    justify-content: space-between;
    width: 7rem; 
}

/* ====================== */
/*      MOBILE VERSION    */
/* ====================== */
@media (max-width: 768px) {

    /* Cards fit mobile screens */
    .heatmap-card, 
    .chart-card {
        height: auto;          /* remove fixed 700px */
        padding: 1rem;
        width: 100%;           /* full width */
    }

    .card-title {
        font-size: 1rem;       /* smaller title */
        margin-bottom: 0.75rem;
    }

    /* Chart placeholder */
    .chart-placeholder {
        width: 100%;
        height: 250px;         /* reduce height */
    }

    /* Map placeholder */
    .map-placeholder {
        width: 100%;
        height: 300px;         /* reduce height */
    }

    /* Legend */
    .legend-label {
        font-size: 0.75rem;
    }

    .legend-values {
        font-size: 0.65rem;
        gap: 0.5rem;
        width: 5rem;
    }

    .legend-gradient {
        height: 0.75rem;        /* slightly smaller bar */
    }
}

.analysis-section {
    background-color: white; 
    padding-top: 3rem; 
    padding-bottom: 3rem;
}
.section-title {
    color: #111827; 
    margin-bottom: 1.5rem; 
    font-size: 1.5rem;
    font-weight: 700;
}
.analysis-summary {
    background-color: #f9fafb; 
    border: 1px solid #e5e7eb; 
    border-radius: 0.5rem; 
    padding: 1.5rem; 
}
.summary-title {
    color: #111827; 
    margin-bottom: 1rem; 
    font-size: 1.125rem;
    font-weight: 600;
}
.summary-text-block {
    color: #374151; 
    font-size: 0.875rem; 
    line-height: 1.625; 
    display: flex;
    flex-direction: column;
    gap: 0.75rem; 
}
.summary-text-block strong {
    font-weight: 700;
}

#map {
    height: 100%; 
    min-height: 300px; 
}

.metrics-cards-container {
    margin-top: 1.5rem; 
    display: flex;
    flex-direction: column;
    gap: 0.5rem; 
}
.metric-card {
    background-color: #fffbeb; 
    border: 1px solid #fde68a; 
    border-radius: 0.25rem;
    padding: 0.75rem; 
}
.metric-label {
    color: #b45309; 
    font-size: 0.75rem;
    line-height: 1;
}
.metric-value {
    color: #78350f; 
    font-size: 1rem;
    font-weight: 600;
}

.date-selector-flex {
    display: flex;
    gap: 0.75rem; /* gap-3 */
    align-items: center; /* items-center */
}
.date-input-field {
    flex: 1; /* flex-1 */
    width: auto; /* override the full width for flex item */
}

.date-input-disabled {
    background-color: #f3f4f6 !important; 
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* gap-2 */
    cursor: pointer;
    white-space: nowrap; /* whitespace-nowrap */
}
.custom-checkbox {
    width: 1rem; /* w-4 */
    height: 1rem; /* h-4 */
    vertical-align: middle;
    color: #d97706; /* text-amber-600 */
    border: 1px solid #d1d5db; /* border-gray-300 */
    border-radius: 0.25rem; /* rounded */
    /* Add focus ring style */
    outline: none;
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.custom-checkbox:focus {
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.5); /* focus:ring-amber-500 */
}
.checkbox-label span {
    color: #374151; /* text-gray-700 */
    font-size: 0.875rem; /* text-sm */
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.map-container {
    height: 100vh;
    position: relative;
    box-sizing: border-box;
    z-index: 10;
}

.map-full-view {
    height: 100%;
    width: 100%;
}

.leaflet-control-zoom {
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
}
.leaflet-control-zoom a {
    background-color: white;
    border: none;
    color: #333;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    text-decoration: none;
    font-size: 18px;
}
.leaflet-control-zoom a:hover {
    background-color: #f4f4f4;
}
.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.7);
    padding: 0 5px;
    font-size: 11px;
}
.custom-marker {
    background: transparent !important;
    border: none !important;
}

/* Info Card Styling */
#info-card, #overview-card {
    position: absolute;
    top: 40px; /* Matches top-20 (5rem) + 64px padding-top */
    right: 24px; /* Matches right-6 (1.5rem) */
    width: 320px; /* Matches w-80 */
    height: 600px;
    background-color: white;
    border-radius: 8px; /* Matches rounded-lg */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* Matches shadow-xl */
    overflow: hidden;
    z-index: 1000;
    transition: opacity 0.3s, transform 0.3s;
}

#overview-card {
  display: none; /* hide until ready */
}

.close-button {
    position: absolute;
    top: 12px; /* Matches top-3 (0.75rem) */
    right: 12px; /* Matches right-3 (0.75rem) */
    z-index: 10;
    background-color: white;
    border-radius: 50%;
    padding: 6px; /* Matches p-1.5 */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); /* Matches shadow-md */
    border: none;
    cursor: pointer;
}

.close-button:hover {
    background-color: #f3f4f6; /* Matches hover:bg-gray-100 */
}

.close-button svg {
    width: 16px; /* Matches w-4 */
    height: 16px; /* Matches h-4 */
    color: #4b5563; /* Matches text-gray-600 */
}

.image-container {
    height: 192px; /* Matches h-48 */
    width: 100%;
}

.city-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-container {
    padding: 20px; /* Matches p-5 */
}

.city-name-header {
    color: #111827; /* Matches text-gray-900 */
    margin-top: 0;
    margin-bottom: 12px; /* Matches mb-3 */
    font-size: 1.25rem;
    font-weight: 600;
}

.city-description-text {
    color: #4b5563; /* Matches text-gray-600 */
    font-size: 0.875rem; /* Matches text-sm */
    line-height: 1.5; /* Matches leading-relaxed */
    margin-bottom: 10px;
}

.chart-wrap { padding-top: 8px; padding-bottom: 8px; }
.chart-canvas { width: 100%; height: 200px; margin-top: 8px;display:block; }

.priority-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    background: #f3f4f6;
    color: #374151;
}

.priority-btn:hover {
    background: #e5e7eb;
}

/* Active states */
.priority-active {
    color: white !important;
}

.priority-btn[data-priority="all"].priority-active {
    background: #6b7280 !important;
}
.priority-btn[data-priority="low"].priority-active {
    background: #22c55e !important; /* green */
}
.priority-btn[data-priority="medium"].priority-active {
    background: #facc15 !important; /* yellow */
}
.priority-btn[data-priority="high"].priority-active {
    background: #ef4444 !important; /* red */
}

/* ----------------------------- */
/* MOBILE VERSION (max-width 768px) */
/* ----------------------------- */
@media (max-width: 768px) {

    /* Main card shrink + reposition */
    #info-card,
    #overview-card {
        width: 40% !important;        /* shrink to 40% of screen */
        height: auto !important;      /* let content define height */
        top: 10px !important;         /* smaller margin from top */
        right: 10px !important;       /* smaller margin from right */
        border-radius: 6px;
        padding: 0;
    }

    .image-container {
        height: 120px !important;
    }

    .city-name-header {
        font-size: 1rem !important;
        margin-bottom: 8px;
    }

    .city-description-text {
        font-size: 0.75rem !important;
        margin-bottom: 8px;
    }

    .content-container {
        padding: 12px !important;
    }

    .close-button {
        top: 8px !important;
        right: 8px !important;
        padding: 4px !important;
    }

    .close-button svg {
        width: 14px !important;
        height: 14px !important;
    }

    .chart-canvas {
        display: flex;
        flex-direction: column;
        height: 150px !important;
        margin-top: 6px;
    }
}
