/* ========================================================
       CZ Custom Date Picker — Zero dependency, all frequencies
    ======================================================== */
.czpick-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
}

.czpick-popup {
    display: none;
    position: absolute;
    z-index: 99999;
    background: #0a0e17;
    border: 1px solid #1a3a5c;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 210, 255, 0.1);
    padding: 12px;
    width: 260px;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: #e0eaf4;
    user-select: none;
    box-sizing: border-box;
}

@keyframes czFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes czFadeInMobile {
    from {
        opacity: 0;
        transform: translate(-50%, -46%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.czpick-popup.czpick-open {
    display: block;
    animation: czFadeIn 0.15s ease-out;
}

/* Header row */
.czpick-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.czpick-nav {
    background: none;
    border: none;
    color: #00d2ff;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 5px;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.czpick-nav:hover {
    background: rgba(0, 210, 255, 0.15);
    color: #ffffff;
}

.czpick-nav:disabled {
    opacity: 0.2;
    cursor: default;
}

.czpick-title {
    font-weight: 700;
    font-size: 14px;
    color: #e8f4ff;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 5px;
    transition: background 0.15s, color 0.15s;
}

.czpick-title:hover {
    background: rgba(0, 210, 255, 0.08);
    color: #00d2ff;
}

/* Day grid */
.czpick-dow-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #436385;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}

.czpick-dow-row.has-week {
    grid-template-columns: 28px repeat(7, 1fr);
}

.czpick-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.czpick-days.has-week {
    grid-template-columns: 28px repeat(7, 1fr);
}

.czpick-day {
    text-align: center;
    padding: 5px 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #8da4be;
    transition: background 0.1s, color 0.1s;
}

.czpick-day:hover {
    background: rgba(0, 210, 255, 0.14);
    color: #00d2ff;
}

.czpick-day.active {
    background: #00d2ff !important;
    color: #001824 !important;
    font-weight: 700;
}

.czpick-day.today {
    border: 1px solid rgba(0, 210, 255, 0.35);
    color: #00d2ff;
}

.czpick-day.other-month {
    color: #243650;
    cursor: default;
}

.czpick-day.weekend {
    color: #5a7590;
}

.czpick-week-num {
    text-align: center;
    font-size: 10px;
    color: #436385;
    padding: 5px 0;
    font-weight: bold;
    border-radius: 4px;
    transition: background 0.1s, color 0.1s;
}

.czpick-week-num:not(.disabled) {
    cursor: pointer;
}

.czpick-week-num:not(.disabled):hover {
    color: #00d2ff;
    background: rgba(0, 210, 255, 0.1);
}

.czpick-week-num.active {
    background: #00d2ff !important;
    color: #001824 !important;
}

/* Month/Quarter/Semi/Year grid */
.czpick-grid {
    display: grid;
    gap: 6px;
    margin-top: 4px;
}

.czpick-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.czpick-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.czpick-cell {
    text-align: center;
    padding: 10px 4px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    color: #8da4be;
    transition: background 0.1s, color 0.1s;
}

.czpick-cell:hover {
    background: rgba(0, 210, 255, 0.14);
    color: #00d2ff;
}

.czpick-cell.active {
    background: #00d2ff !important;
    color: #001824 !important;
    font-weight: 700;
}

/* Disabled states */
.czpick-day.disabled,
.czpick-cell.disabled,
.czpick-week-num.disabled {
    color: #1e2d42 !important;
    background: none !important;
    cursor: default !important;
    pointer-events: none !important;
    opacity: 0.25;
}

/* Larger cells for quarterly/semi */
.czpick-grid.cols-2 .czpick-cell {
    padding: 18px 4px;
    font-size: 14px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .czpick-popup {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 290px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 0 100vmax rgba(0, 0, 0, 0.7);
    }

    .czpick-popup.czpick-open {
        animation: czFadeInMobile 0.2s ease-out;
    }
}

body {
    margin: 0;
    padding: 0;
    background: #000000;
    color: #ffffff;
}

.cz-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
}

.cz-workspace {
    display: grid;
    grid-template-columns: 280px 1fr 300px 240px;
    gap: 15px;
    height: 700px;
    flex-shrink: 0;
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
}

.cz-panel {
    display: flex;
    flex-direction: column;
    background: #000000;
    border: 1px solid #132238;
    border-radius: 2px;
    overflow: hidden;
}

.panel-header {
    padding: 15px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #00d2ff;
    text-transform: uppercase;
    border-bottom: 1px solid #132238;
    background: #05080c;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.panel-body {
    padding: 10px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Accordion / List styles for Col 1 */
.acc-item {
    background: #0a0e17;
    margin-bottom: 2px;
    border: 1px solid #132238;
    cursor: pointer;
    transition: background 0.2s;
}

.acc-header {
    padding: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
}

.acc-header:hover {
    background: #111a28;
    color: #00d2ff;
}

/* Tree Styling Inside Col 1 */
.tree ul {
    list-style: none;
    padding-left: 10px;
    border-left: 1px solid #132238;
    margin-left: 5px;
    display: none;
    margin-top: 5px;
}

.tree ul.active {
    display: block;
}

#treeContainer>ul {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
}

.tree li {
    position: relative;
    margin: 2px 0;
    list-style: none;
}

.tree .label {
    display: inline-flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.2s;
    width: 100%;
    font-size: 0.8rem;
    font-weight: 600;
    background: #0a0e17;
    border: 1px solid #132238;
    border-radius: 2px;
    text-transform: uppercase;
}

.tree .label:hover {
    color: #00d2ff;
    border-color: #00d2ff;
    background: #05080c;
}

.tree .leaf::before {
    content: '>';
    margin-right: 8px;
    color: #00d2ff;
    font-weight: 900;
}

.tree .folder::before {
    content: '+';
    margin-right: 8px;
    font-weight: 900;
}

.tree .folder.open::before {
    content: '-';
    color: #00d2ff;
}

/* Form Controls */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    font-size: 0.75rem;
    color: #8da4be;
    margin-bottom: 5px;
    display: block;
    text-transform: uppercase;
    white-space: nowrap;
}

.form-select {
    width: 100%;
    background-color: rgba(10, 14, 23, 0.95);
    border: 1px solid rgba(0, 210, 255, 0.2);
    color: var(--text-primary, #ffffff);
    padding: 8px 32px 8px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300d2ff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-select:hover {
    border-color: var(--accent-hover, #00d2ff);
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.2);
}

.form-select:focus {
    border-color: var(--accent-hover, #00d2ff);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.4);
    outline: none;
}

.form-select option {
    background-color: #111622;
    color: #ffffff;
}

.form-input {
    width: 100%;
    background: #000000;
    border: 1px solid #132238;
    color: #ffffff;
    padding: 8px 10px;
    border-radius: 2px;
    font-size: 0.85rem;
}

.form-input:focus {
    border-color: #00d2ff;
    outline: none;
}

/* Checkboxes */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 8px;
    background: #05080c;
    border: 1px solid #132238;
    border-radius: 2px;
    transition: border-color 0.2s;
}

.checkbox-item:hover {
    border-color: #00d2ff;
}

.checkbox-item input[type="checkbox"] {
    accent-color: #00d2ff;
}

/* Buttons */
.btn-cz {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: #05080c;
    color: #e0e0e0;
    border: 1px solid #132238;
    padding: 12px;
    font-size: 0.85rem;
    border-radius: 2px;
    font-weight: 600;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cz:hover {
    background: #00d2ff;
    color: #000000;
    border-color: #00d2ff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: #132238;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00d2ff;
}

/* Bottom Results Area */
#bottomResultsArea {
    margin: 0 15px 30px 15px;
    background: #05080c;
    border: 1px solid #132238;
    border-radius: 4px;
    display: none;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #132238;
    background: #000000;
}

.results-content {
    padding: 20px;
    min-height: 400px;
}

.data-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.data-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.data-table-wrapper th,
.data-table-wrapper td {
    padding: 10px;
    border-bottom: 1px solid #132238;
    text-align: left;
}

.data-table-wrapper th {
    background: #000000;
    color: #00d2ff;
    position: sticky;
    top: 0;
}

/* Map Info Box (Premium Glassmorphism) */
.map-info-box {
    display: none;
    background: rgba(10, 14, 23, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 210, 255, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #e0eaf4;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 210, 255, 0.1);
    pointer-events: none !important;
    user-select: none;
    line-height: 1.5;
}

.map-info-box h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    color: #00d2ff;
    font-weight: 700;
}

.map-info-box b {
    color: #8da4be;
    font-weight: 400;
}

/* Custom Map Tooltip & Info Box for D3 SVG Map */
.map-tooltip {
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 210, 255, 0.35);
    border-radius: 6px;
    color: #e0eaf4;
    font-size: 0.8rem;
    padding: 8px 13px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 210, 255, 0.08);
    pointer-events: none;
    transition: opacity 0.1s ease;
    white-space: nowrap;
}

.map-tooltip b {
    color: #00d2ff;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

/* D3 SVG Interactive Styling */
#interactiveMap svg {
    display: block;
    width: 100%;
    height: 100%;
    user-select: none;
}

.map-province-path {
    stroke: #132238;
    stroke-width: 1.2px;
    transition: fill 0.2s ease, stroke 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

.map-province-path:hover {
    stroke: #00d2ff;
    stroke-width: 2px;
    filter: drop-shadow(0 0 4px rgba(0, 210, 255, 0.5));
}

.map-province-path:active {
    transform-origin: center;
    transform: scale(0.98);
}

/* Fullscreen Map State */
#mapWrapper.fullscreen-active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 48px) !important;
    height: calc(100dvh - 48px) !important;
    z-index: 5000 !important;
    padding: 0 !important;
    background: #05080c !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
}

#mapWrapper.fullscreen-active #interactiveMap {
    height: 100% !important;
}

#mapWrapper.fullscreen-active #mapControls {
    top: 10px !important;
    left: 10px !important;
}

#timelineContainer.fullscreen-active {
    position: fixed !important;
    z-index: 5001 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 48px !important;
    padding: 6px 15px !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
}

/* Premium Custom Timeline Range Slider */
#mapTimeline {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 210, 255, 0.15);
    outline: none;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s;
}

#mapTimeline:hover {
    background: rgba(0, 210, 255, 0.25);
}

/* Webkit / Chrome / Safari thumb */
#mapTimeline::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00d2ff;
    border: 2px solid #0a0e17;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.7);
    transition: transform 0.1s ease, background-color 0.2s, box-shadow 0.2s;
}

#mapTimeline::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    background: #ffffff;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.9);
}

#mapTimeline::-webkit-slider-thumb:active {
    transform: scale(1.1);
    background: #00e5ff;
}

/* Firefox thumb */
#mapTimeline::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #00d2ff;
    border: 2px solid #0a0e17;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.7);
    transition: transform 0.1s ease, background-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

#mapTimeline::-moz-range-thumb:hover {
    transform: scale(1.25);
    background: #ffffff;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.9);
}

#mapTimeline::-moz-range-thumb:active {
    transform: scale(1.1);
    background: #00e5ff;
}

/* Map Controls - Mobile Responsive */
#mapControls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1001;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    #mapControls {
        top: 6px;
        left: 6px;
        gap: 5px;
    }

    #mapControls select,
    #mapControls button {
        font-size: 0.7rem !important;
        padding: 4px 8px !important;
    }

    #timelineContainer {
        padding: 6px 10px !important;
    }

    #timelineContainer button {
        font-size: 0.7rem !important;
        padding: 3px 6px !important;
    }

    #timelineLabel {
        font-size: 0.65rem !important;
        min-width: 65px !important;
    }
}

/* Mobile Integration */
@media (max-width: 1200px) {
    .cz-workspace {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        padding: 10px;
    }

    .cz-panel {
        flex: none;
        height: auto;
        min-height: 300px;
        margin-bottom: 20px;
    }
}

/* Zoom and Control Buttons inside mapControls */
.map-control-btn {
    background: rgba(10, 14, 23, 0.95);
    border: 1px solid #00d2ff;
    color: #00d2ff;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.map-control-btn:hover {
    background-color: #00d2ff;
    color: #000000;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
}

.map-control-btn:active {
    transform: scale(0.95);
}

/* Mobile responsive touch targets for map controls */
@media (max-width: 768px) {
    .map-control-btn {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
}

/* mapWrapper wrapper display none because it's no longer inline */
#mapWrapper {
    display: none;
}


/* ================================================================
   CZMap — D3 Choropleth Harita Sistemi CSS
   ================================================================ */

/* Ana Modal — inline container */
.czmap-modal {
    display: none;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.czmap-modal.czmap-modal--open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Yarı saydam arka plan */
.czmap-overlay {
    display: none;
}

/* İçerik kutusu — tam ekran */
.czmap-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #05080c;
    overflow: hidden;
    font-family: 'Outfit', 'Inter', 'Segoe UI', sans-serif;
}

/* Üst Bar */
.czmap-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(10, 14, 23, 0.98);
    border-bottom: 1px solid #132238;
    flex-shrink: 0;
    gap: 12px;
    flex-wrap: nowrap;
}

.czmap-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.czmap-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e0eaf4;
    letter-spacing: 0.5px;
}

.czmap-map-type-badge {
    background: rgba(0, 210, 255, 0.12);
    border: 1px solid rgba(0, 210, 255, 0.35);
    color: #00d2ff;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
}

.czmap-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.czmap-search-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid #1a3a5c;
    color: #e0eaf4;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.85rem;
    width: 180px;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.czmap-search-input:focus {
    border-color: #00d2ff;
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.25);
}

.czmap-btn {
    background: rgba(0, 210, 255, 0.08);
    border: 1px solid rgba(0, 210, 255, 0.3);
    color: #00d2ff;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    font-weight: 500;
}

.czmap-btn:hover {
    background: rgba(0, 210, 255, 0.18);
    border-color: #00d2ff;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.czmap-btn--close {
    background: rgba(255, 51, 51, 0.08);
    border-color: rgba(255, 51, 51, 0.35);
    color: #ff4d4d;
    font-size: 1.1rem;
    padding: 5px 12px;
    min-width: 38px;
    font-weight: bold;
}

.czmap-btn--close:hover {
    background: rgba(255, 51, 51, 0.22);
    border-color: #ff4d4d;
    box-shadow: 0 0 10px rgba(255, 51, 51, 0.25);
}

.czmap-btn--sm {
    padding: 3px 10px;
    font-size: 0.75rem;
}

/* Harita ana alanı — flex, legend sağda */
.czmap-map-area {
    position: relative;
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

/* SVG container */
.czmap-svg-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #080c14;
    touch-action: none;
}

.czmap-svg-wrap svg {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.czmap-region {
    outline: none;
    vector-effect: non-scaling-stroke;
}

.czmap-region:hover {
    cursor: pointer;
}

/* Sol Kontroller */
.czmap-controls {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.czmap-ctrl-btn {
    width: 38px;
    height: 38px;
    background: rgba(10, 14, 23, 0.95);
    border: 1px solid #1a3a5c;
    color: #00d2ff;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.czmap-ctrl-btn:hover {
    background: rgba(0, 210, 255, 0.16);
    border-color: #00d2ff;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.3);
}

/* Zoom hint */
.czmap-zoom-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    white-space: nowrap;
    background: rgba(10, 14, 23, 0.7);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Legend */
.czmap-legend {
    width: 150px;
    flex-shrink: 0;
    background: rgba(10, 14, 23, 0.97);
    border-left: 1px solid #132238;
    padding: 16px 14px;
    overflow-y: auto;
    font-size: 0.78rem;
    color: #8da4be;
    display: flex;
    flex-direction: column;
}

.czmap-legend-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #00d2ff;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.czmap-legend-gradient {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.czmap-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.czmap-legend-swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Loading & Error */
.czmap-loading {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 12, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(2px);
}

.czmap-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(0, 210, 255, 0.15);
    border-top-color: #00d2ff;
    border-radius: 50%;
    animation: czmap-spin 0.8s linear infinite;
}

@keyframes czmap-spin {
    to { transform: rotate(360deg); }
}

.czmap-error-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 12, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 201;
    color: #ff4d4d;
    gap: 16px;
    padding: 24px;
    text-align: center;
}

.czmap-error-overlay i {
    font-size: 2.2rem;
}

.czmap-error-overlay p {
    font-size: 0.95rem;
    max-width: 320px;
    color: #e0eaf4;
    line-height: 1.4;
}

/* Slider Bar */
.czmap-slider-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    background: rgba(10, 14, 23, 0.98);
    border-top: 1px solid #132238;
    flex-shrink: 0;
}

.czmap-year-label {
    font-size: 1.1rem;
    font-weight: 800;
    color: #00d2ff;
    min-width: 55px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.czmap-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 210, 255, 0.15);
    outline: none;
    cursor: pointer;
}

.czmap-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00d2ff;
    border: 3px solid #05080c;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.6);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.czmap-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 16px rgba(0, 210, 255, 0.9);
}

.czmap-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00d2ff;
    border: 3px solid #05080c;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.6);
    cursor: pointer;
}

.czmap-btn--play {
    padding: 6px 16px;
    min-width: 90px;
}

/* Pivot Tablo */
.czmap-pivot-panel {
    background: rgba(10, 14, 23, 0.98);
    border-top: 1px solid #132238;
    flex-shrink: 0;
    max-height: 220px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.czmap-pivot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 18px;
    border-bottom: 1px solid #132238;
    font-size: 0.82rem;
    font-weight: 600;
    color: #8da4be;
    flex-shrink: 0;
    background: #070b12;
}

.czmap-pivot-wrap {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

.czmap-pivot {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    color: #c0d0e0;
}

.czmap-pivot thead th {
    position: sticky;
    top: 0;
    background: #0a0e17;
    color: #00d2ff;
    text-align: left;
    padding: 6px 18px;
    font-weight: 700;
    border-bottom: 1px solid #132238;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.czmap-pivot tbody tr {
    cursor: pointer;
    transition: background 0.15s ease;
}

.czmap-pivot tbody tr:hover {
    background: rgba(0, 210, 255, 0.08);
}

.czmap-pivot td {
    padding: 6px 18px;
    border-bottom: 1px solid rgba(19, 34, 56, 0.5);
}

.czmap-pivot-rank {
    width: 60px;
    color: #5f7b9f;
    font-weight: 600;
}

.czmap-pivot-name {
    font-weight: 500;
    color: #e0eaf4;
}

.czmap-pivot-value {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: bold;
    color: #00d2ff;
}

.czmap-pivot-empty {
    text-align: center;
    color: #4a5d73;
    padding: 24px;
    font-size: 0.85rem;
}

/* Tooltip */
.czmap-tooltip {
    position: fixed;
    z-index: 99999;
    background: rgba(10, 14, 23, 0.97);
    border: 1px solid rgba(0, 210, 255, 0.45);
    border-radius: 8px;
    padding: 8px 14px;
    pointer-events: none;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.65);
    font-family: 'Outfit', sans-serif;
    min-width: 130px;
    backdrop-filter: blur(2px);
}

.czmap-tip-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #e0eaf4;
    margin-bottom: 4px;
}

.czmap-tip-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #00d2ff;
}

.czmap-tip-year {
    font-size: 0.72rem;
    color: #4a5d73;
    margin-top: 3px;
}

/* Detay Modal */
.czmap-detail-modal {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 300;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
}

.czmap-detail-modal.czmap-detail--open {
    display: flex;
}

.czmap-detail-inner {
    background: #0a0e17;
    border: 1px solid #1a3a5c;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 480px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
}

.czmap-detail-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: #4a5d73;
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.czmap-detail-close:hover {
    color: #ff4d4d;
}

.czmap-detail-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: #e0eaf4;
    margin: 0 0 6px;
}

.czmap-detail-value-wrap {
    margin: 10px 0;
}

.czmap-detail-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: #00d2ff;
}

.czmap-detail-chart-wrap {
    height: 180px;
    margin-top: 18px;
}

/* ========= MOBIL (Responsive) ========= */
@media (max-width: 768px) {
    #mapWrapper {
        height: 75vh !important;
        height: 75dvh !important;
        max-height: 500px !important;
    }

    .czmap-topbar {
        padding: 10px 14px;
        gap: 8px;
    }

    .czmap-title {
        font-size: 0.95rem;
    }

    .czmap-search-input {
        width: 120px;
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .czmap-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .czmap-legend {
        display: none; /* Mobilde dikey legend gizlenir */
    }

    .czmap-ctrl-btn {
        width: 44px; /* Mobilde daha buyuk dokunma hedefleri */
        height: 44px;
        font-size: 1.4rem;
    }

    .czmap-slider-bar {
        flex-wrap: wrap;
        padding: 10px 14px;
        gap: 10px;
    }

    .czmap-year-label {
        font-size: 1rem;
    }

    .czmap-pivot-panel {
        max-height: 160px;
    }

    .czmap-zoom-hint {
        display: none;
    }
}

@media (max-width: 480px) {
    .czmap-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }
    
    .czmap-topbar-right {
        justify-content: space-between;
        gap: 6px;
    }

    .czmap-search-input {
        width: 35%;
        flex-grow: 1;
        font-size: 0.75rem;
        padding: 5px 8px;
    }

    .czmap-btn {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

    .czmap-btn--close {
        padding: 5px;
        min-width: 32px;
    }

    .czmap-detail-inner {
        padding: 18px;
    }

    .czmap-detail-value {
        font-size: 1.8rem;
    }
}