/* Global Wrapper */
.vndsi-wrapper {
    font-family: 'Roboto', 'Arial', sans-serif;
    color: #333;
    max-width: 100%;
    margin: 0 auto;
    background-color: #f0f2f5;
    padding-bottom: 20px;
    box-sizing: border-box;
}

.vndsi-wrapper * {
    box-sizing: border-box;
}

/* Breadcrumbs (Optional keep for WP context) */
.vndsi-breadcrumbs {
    padding: 15px 0;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

/* MAIN LAYOUT - GRID/FLEX */
.vndsi-layout {
    display: flex;
    flex-direction: row;
    height: 85vh;
    /* Fixed viewport height */
    min-height: 800px;
    background-color: #f0f2f5;
    gap: 20px;
}

/* SIDEBAR */
.vndsi-sidebar {
    width: 320px;
    flex-shrink: 0;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    padding: 0 10px;
}

.vndsi-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    padding-top: 10px;
}

.vndsi-description {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    margin-bottom: 20px;
}

.vndsi-control-group {
    margin-bottom: 30px;
}

.vndsi-control-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
}

.vndsi-select {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
    background-color: #fff;
}

/* KPI CARDS (Vertical Stack) */
.vndsi-summary-section h3 {
    font-size: 16px;
    font-weight: bold;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.vndsi-kpi-card {
    background: #fff;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.kpi-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

/* MAIN CONTENT AREA */
.vndsi-main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* MAPS ROW */
.vndsi-maps-row {
    display: flex;
    flex: 1;
    /* Takes 50% of height approx */
    gap: 20px;
    min-height: 400px;
}

.vndsi-map-box {
    flex: 1;
    background: #fff;
    border: 1px solid #ccc;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Hide original external map headers/legends as we use internal controls now */
.vndsi-map-header, 
.vndsi-map-legend {
    display: none !important;
}

.vndsi-map-instance {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    background-color: #eee;
}

/* Custom Map Controls Styles */
.vndsi-control-badge {
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    margin: 10px;
    pointer-events: none;
}

.vndsi-control-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    margin: 10px;
    max-width: 200px;
    pointer-events: none;
}

/* Basin Info Box (Bottom-Left) */
.vndsi-basin-info {
    background: #e0e0e0; /* Gray background like in image */
    color: #333;
    border-radius: 4px;
}
.basin-title {
    font-weight: bold;
    font-size: 12px;
    display: block;
    margin-bottom: 2px;
}
.basin-subtitle {
    font-size: 11px;
    display: block;
    color: #555;
}

/* Legend Box (Bottom-Right) */
.legend-content-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.legend-square {
    width: 16px;
    height: 16px;
    background-color: #000080;
    flex-shrink: 0;
}
.legend-text-col {
    display: flex;
    flex-direction: column;
}
.legend-label-main {
    font-weight: 500;
}
.legend-date-val {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

/* Gradient Legend (Right Map) */
.gradient-legend-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.gradient-bar-sm {
    width: 15px;
    height: 80px;
    background: linear-gradient(to top, #ffffff, #87CEEB, #0000FF);
    border: 1px solid #ccc;
}
.gradient-labels-sm {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 80px;
    font-size: 10px;
    color: #666;
}
.gradient-title-side {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 10px;
    color: #555;
    margin-right: 5px;
}


/* CHARTS ROW */
.vndsi-chart-row {
    flex: 1;
    /* Takes remaining 50% height */
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.vndsi-chart-nav {
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
}

.chart-nav-btn {
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.chart-nav-btn.active {
    color: #333;
    font-weight: bold;
    border-bottom-color: #333;
}

.chart-section-title {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: bold;
}

.vndsi-chart-wrapper {
    flex-grow: 1;
    position: relative;
    width: 100%;
}

/* Helper Buttons */
.vndsi-toggle-btn,
.vndsi-close-btn {
    display: none;
}

.disclaimer-card {
 text-align: justify;
 font-size: 13px; 
}
.bg-yellow {
 background-color: #FFF8D9;
}
