/* Dutch Legal Market Dashboard - Professional Sales-Focused Styles */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.5;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #0f172a;
}

/* ===== MAP STYLES ===== */
#main-map {
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

/* Pulse animation for selected marker */
@keyframes pulse-ring {
    0% {
        stroke-opacity: 1;
        fill-opacity: 0.4;
    }
    50% {
        stroke-opacity: 0.5;
        fill-opacity: 0.2;
    }
    100% {
        stroke-opacity: 1;
        fill-opacity: 0.4;
    }
}

.pulse-marker {
    animation: pulse-ring 1.5s ease-in-out infinite;
}

/* Legend styles - compact and professional */
.map-legend {
    font-family: inherit;
    font-size: 11px;
    line-height: 1.4;
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    padding: 12px !important;
}

/* ===== FILTER PANEL STYLES ===== */
.filter-panel {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.filter-panel::-webkit-scrollbar {
    width: 6px;
}

.filter-panel::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.filter-panel::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

/* Filter sections - more spacious layout */
.filter-section {
    background: white;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.2s ease;
}

.filter-section:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Radio and checkbox styling */
.filter-radio label,
.filter-checklist label {
    transition: background-color 0.15s ease;
}

.filter-radio label:hover,
.filter-checklist label:hover {
    background-color: #f8fafc;
}

.filter-radio input:checked + label,
.filter-checklist input:checked + label {
    background-color: #ccd8ca;
}

/* Slider customization - Zeno green */
.rc-slider-track {
    background-color: #5a7a57 !important;
    height: 6px !important;
}

.rc-slider-rail {
    height: 6px !important;
    background-color: #e2e8f0 !important;
}

.rc-slider-handle {
    border: 2px solid #5a7a57 !important;
    background-color: white !important;
    width: 18px !important;
    height: 18px !important;
    margin-top: -6px !important;
    box-shadow: 0 2px 4px rgba(90, 122, 87, 0.2) !important;
}

.rc-slider-handle:hover,
.rc-slider-handle:focus {
    border-color: #052610 !important;
    box-shadow: 0 0 0 4px rgba(90, 122, 87, 0.15) !important;
}

/* Dropdown styles - clean and modern */
.Select-control {
    border-radius: 8px !important;
    border-color: #e2e8f0 !important;
    min-height: 40px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.Select-control:hover {
    border-color: #94a3b8 !important;
}

.Select-control:focus-within {
    border-color: #5a7a57 !important;
    box-shadow: 0 0 0 3px rgba(90, 122, 87, 0.1) !important;
}

.Select-menu-outer {
    border-radius: 8px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid #e2e8f0 !important;
    margin-top: 4px !important;
}

/* Checkbox and radio styles - Zeno light green with BLACK checkmark */
.form-check-input:checked {
    background-color: #ccd8ca !important;
    border-color: #5a7a57 !important;
    /* Override the default white checkmark with a black one */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23052610' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(90, 122, 87, 0.15);
    border-color: #5a7a57;
}

/* Bootstrap checkbox checkmark override - black checkmark on Zeno light green */
input[type="checkbox"]:checked {
    background-color: #ccd8ca !important;
    border-color: #5a7a57 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23052610' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
}

/* Dash Bootstrap checkbox styling */
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: #ccd8ca !important;
    border-color: #5a7a57 !important;
}

/* Radio button checked state - Zeno green with dark inner circle */
.form-check-input[type="radio"]:checked {
    background-color: #ccd8ca !important;
    border-color: #5a7a57 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23052610'/%3e%3c/svg%3e") !important;
}

/* ===== TABLE STYLES ===== */
.dash-table-container {
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.dash-spreadsheet-container .dash-spreadsheet-inner th {
    background-color: #f8fafc !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #64748b !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 14px 12px !important;
}

.dash-spreadsheet-container .dash-spreadsheet-inner td {
    font-size: 13px !important;
    padding: 12px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #334155 !important;
}

/* Firm name column - clickable styling */
.dash-spreadsheet-container .dash-spreadsheet-inner td[data-dash-column="firm_name"] {
    font-weight: 500 !important;
    color: #052610 !important;
    cursor: pointer !important;
}

.dash-spreadsheet-container .dash-spreadsheet-inner td[data-dash-column="firm_name"]:hover {
    color: #5a7a57 !important;
    text-decoration: underline !important;
}

/* Row hover effect */
.dash-spreadsheet-container .dash-spreadsheet-inner tr:hover td {
    background-color: #f8fafc !important;
}

/* Selected row - prominent highlight */
.dash-spreadsheet-container .dash-spreadsheet-inner tr.selected td,
.dash-spreadsheet-container .dash-spreadsheet-inner td.cell--selected {
    background-color: #e4e2de !important;
    border-left: 3px solid #5a7a57 !important;
}

/* Zeno customers row highlight */
.dash-spreadsheet-container .dash-spreadsheet-inner tr td[data-dash-row]:has(+ td[data-dash-column="zeno_licenses"]:not(:empty)) {
    background-color: #ccd8ca !important;
}

/* Active cell styling */
.dash-spreadsheet-container .dash-spreadsheet-inner td.focused {
    background-color: #eff6ff !important;
    outline: 2px solid #3b82f6 !important;
    outline-offset: -2px;
}

/* ===== NAVBAR STYLES ===== */
.navbar {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #e2e8f0 !important;
    background-color: white !important;
    padding: 12px 0 !important;
}

.navbar-brand {
    font-weight: 700 !important;
    font-size: 18px !important;
    color: #0f172a !important;
}

/* ===== SUMMARY CARD STYLES ===== */
#filter-summary {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

#filter-summary h4 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

#filter-summary small {
    opacity: 0.8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== POPUP STYLES ===== */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    padding: 0;
    max-height: 520px;
    overflow-y: auto;
}

.leaflet-popup-tip {
    box-shadow: none;
}

/* Tooltip styling */
.leaflet-tooltip {
    background-color: rgba(15, 23, 42, 0.9);
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.leaflet-tooltip-top:before {
    border-top-color: rgba(15, 23, 42, 0.9);
}

/* ===== BUTTON STYLES ===== */
/* Primary button - Zeno green */
.btn-primary {
    background-color: #5a7a57 !important;
    border-color: #5a7a57 !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: #052610 !important;
    border-color: #052610 !important;
}

.btn-outline-primary {
    color: #5a7a57 !important;
    border-color: #5a7a57 !important;
}

.btn-outline-primary:hover {
    background-color: #5a7a57 !important;
    border-color: #5a7a57 !important;
    color: white !important;
}

.btn-outline-secondary {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-color: #e2e8f0;
    color: #64748b;
}

.btn-outline-secondary:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
    transform: translateY(-1px);
}

/* Quick filter buttons */
.btn-light {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}

.btn-light:hover {
    background-color: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}

/* Export button - Zeno green */
.export-csv-button {
    background-color: #5a7a57 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.export-csv-button:hover {
    background-color: #052610 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 122, 87, 0.3);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 992px) {
    .filter-panel {
        max-height: none;
        padding: 15px !important;
    }

    #main-map {
        height: 400px !important;
    }
}

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 16px !important;
    }

    .map-legend {
        display: none;
    }

    .filter-section {
        padding: 12px;
    }
}

/* ===== LOADING STATES ===== */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.loading {
    background: linear-gradient(90deg, #f1f5f9 0px, #e2e8f0 40px, #f1f5f9 80px);
    background-size: 200px 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Loading overlay - blocks all interactions */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(248, 250, 252, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #5a7a57;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 16px;
    font-size: 16px;
    font-weight: 500;
    color: #5a7a57;
}

/* ===== ZENO CUSTOMER HIGHLIGHT ===== */
.zeno-highlight {
    border-left: 3px solid #5a7a57;
    background-color: #ccd8ca !important;
}

/* ===== UTILITY CLASSES ===== */
.text-muted {
    color: #64748b !important;
}

.font-semibold {
    font-weight: 600;
}

.text-sm {
    font-size: 13px;
}

.text-xs {
    font-size: 11px;
}
