/* Global Wrapper */
.vss-wrapper {
    font-family: 'Roboto', 'Arial', sans-serif;
    color: #333;
    max-width: 100%;
    margin: 0 auto;
    background-color: #f4f6f9;
    /* padding-bottom moved to footer-actions to hide empty space when hidden */
}

/* Breadcrumbs */
.vss-breadcrumbs {
    padding: 15px 0;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.vss-breadcrumbs span {
    color: #888;
}

.vss-breadcrumbs strong {
    color: #333;
    font-weight: 700;
}

/* Container */
.vss-container {
    position: relative;
    display: flex;
    background-color: #fff;
    border: 1px solid #ddd;
    overflow: hidden;
}

/* Map Area (Updated for vss-main-content) */
.vss-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    overflow: hidden;
}

.vss-map {
    width: 100%;
    flex-grow: 1;
    position: relative;
    background-color: #eef;
    transition: width 0.3s ease;
}

/* TOGGLE BUTTONS */
.vss-toggle-btn {
    position: absolute;
    top: 20px;
    z-index: 1001;
    background-color: #fff !important;
    color: #333 !important;
    border: none !important;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    outline: none !important;
    padding: 0 !important;
}

.vss-toggle-btn:hover {
    background-color: #f5f5f5 !important;
}

.vss-toggle-btn:focus,
.vss-toggle-btn:focus-visible {
    background-color: #fff !important;
    /* outline: 2px solid #0051A8 !important; */
    outline-offset: 2px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), inset 0 0 0 3px #fff;
}

.vss-toggle-btn .dashicons {
    font-size: 24px !important;
    width: 24px !important;
    height: 24px !important;
    line-height: 24px !important;
    font-family: dashicons !important;
    font-weight: 400 !important;
    color: #333 !important;
    display: inline-block !important;
    speak: none !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
}

/* LEFT PANEL TOGGLE - Removed/Merged into Right Toggle */
/* RIGHT PANEL TOGGLE */

.vss-toggle-btn.right-toggle {
    right: 520px;
}

.vss-toggle-btn.right-toggle.collapsed {
    right: 20px;
}

.vss-toggle-btn .arrow-icon {
    width: 24px;
    height: 24px;
    display: none;
}

.vss-toggle-btn.collapsed .arrow-left {
    display: block;
}

.vss-toggle-btn:not(.collapsed) .arrow-right {
    display: block;
}

/* LEFT PANEL (Search) */
.vss-overlay-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 350px;
    background-color: white;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    max-height: calc(100% - 40px);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.vss-overlay-panel.collapsed {
    transform: translateX(-120%);
    /* Move off-screen to left */
    opacity: 0;
    pointer-events: none;
}

.vss-panel-header {
    padding: 8px 16px;
    border-bottom: 1px solid #CCCCCC;
    background-color: #F2F2F2;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vss-panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.vss-panel-body {
    padding: 16px;
    overflow-y: auto;
}

.vss-search-box hr {
    margin-top: 0;
    margin-bottom: 15px;
    background-color: #E6E6E6;
}

.vss-search-box {
    /* background-color: #e0e0e0; */
    /* padding: 15px; */
    /* border-radius: 4px; */
}

.vss-search-box h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

.vss-search-description {
    color: #666666;
    font-size: 13px;
}

.vss-form-row {
    display: flex;
    gap: 10px;
}

.vss-form-row .vss-form-group {
    flex: 1;
}

.vss-form-group {
    margin-bottom: 15px;
}

.vss-form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.vss-form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 13px;
}

.vss-search-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.vss-btn-primary {
    background-color: #0051A8;
    color: #fff !important;
    border: 1px solid #0051A8;
}
.vss-btn-secondary {
    background-color: #fff;
    color: #0051A8 !important;
    border: 1px solid #0051A8;
}

.vss-btn-dark,
.vss-btn-black {
    background-color: #000;
    color: #fff;
}

.vss-btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    opacity: 1;
}

.vss-btn:hover {
    opacity: 0.4;
    color: #fff !important;
}

/* RIGHT PANEL (Results) */
.vss-right-panel {
    width: 500px;
    background-color: white;
    border-left: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease, width 0.3s ease;
    position: relative;
    height: 100%;
}

.vss-right-panel.collapsed {
    width: 0;
    transform: translateX(100%);
    border-left: none;
    overflow: hidden;
}

/* Tabs */
.vss-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}

.vss-tab-btn {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #888;
    border-bottom: 3px solid transparent;
}

.vss-tab-btn.active {
    color: #000;
    border-bottom-color: #000;
    background-color: #f9f9f9;
}

.vss-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.vss-tab-pane {
    display: none;
}

.vss-tab-pane.active {
    display: block;
}

/* Table */
.vss-table-wrapper {
    overflow-x: auto;
}

.vss-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.vss-data-table th,
.vss-data-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.vss-chart-container {
    height: 250px;
    width: 100%;
}

/* Summary / KPIs */
.vss-summary-section {
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #fcfcfc;
}

.vss-summary-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
}

.vss-kpi-grid {
    display: flex;
    gap: 15px;
}

.vss-kpi-card {
    flex: 1;
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
}

.vss-kpi-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.vss-kpi-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #000;
}

.status-dry {
    color: #e74c3c;
}

/* Footer */
.vss-footer-actions {
    margin-top: 0;
    padding: 10px 20px;
    background-color: #fff;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    /* padding-bottom: 20px; removed or reduced */
}

.vss-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
    line-height: 1;
}

.vss-close-btn:hover {
    background-color: #e5e5e5;
    color: #333;
}

/* Helper */
.dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1.2;
}

/* Scale Legend Panel */
.vss-scale-panel {
    position: absolute;
    bottom: 5px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 8px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.vss-scale-header {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.vss-scale-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.vss-scale-gradient {
    flex: 1;
    min-width: 150px;
}

.vss-scale-colors {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 14px;
    border-radius: 2px;
    overflow: hidden;
}

.vss-scale-color {
    flex: 1;
    height: 100%;
}

.vss-scale-more-btn {
    background: transparent !important;
    border: none;
    color: #555 !important;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0;
    transition: color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.vss-scale-more-btn:hover {
    color: #000;
    background: transparent !important;
}

.vss-scale-more-icon {
    font-size: 16px;
    color: #27ae60;
    font-weight: bold;
}

/* Scale Modal */
.vss-scale-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: transparent;
    z-index: 10001;
    display: none;
    pointer-events: none;
}

.vss-scale-modal.active {
    display: block;
}

.vss-scale-modal-content {
    pointer-events: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    min-width: 380px;
    max-width: 90vw;
    animation: scaleModalIn 0.3s ease forwards;
    overflow: hidden;
}

@keyframes scaleModalIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.vss-scale-modal-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 0 !important;
    background: #fff;
    position: relative;
    box-shadow: none !important;
}

.vss-scale-modal-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.vss-scale-indicator-title {
    margin-left: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #000;
    letter-spacing: 1px;
}

.vss-scale-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease, color 0.2s ease;
}

.vss-scale-modal-close:hover {
    background: #eee;
    color: #333;
}

.vss-scale-modal-body {
    padding: 0 20px 20px 20px;
}

.vss-scale-table {
    width: 100%;
    border-collapse: collapse;
    border: none !important;
}

.vss-scale-row {
    border: none !important;
}

.vss-scale-row td {
    border: none !important;
}

.vss-scale-row:first-child td {
    border-top: none !important;
    padding-top: 0 !important;
}

.vss-scale-row:first-child .vss-scale-cell-color,
.vss-scale-row:first-child .vss-scale-cell-desc {
    border-top: none;
}

.vss-scale-cell-color {
    width: 30px;
    height: 28px;
    border: none;
}

.vss-scale-cell-desc {
    padding: 8px 12px;
    font-size: 13px;
    color: #333;
    border: none;
}