@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
    --primary-color: #00ff00;
    --background-color: #000000;
    --text-color: #00ff00;
    --border-color: #00ff00;
    --hover-color: #003300;
}

body, html {
    font-family: 'Share Tech Mono', monospace;
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: var(--background-color);
    color: var(--text-color);
    overflow: hidden; /* Prevent page scrolling */
}

#map {
    height: 100vh;
    width: 100%;
}

#control-panel {
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-controls, .right-controls {
    display: flex;
    align-items: center;
}

.center-controls {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    margin: 0 20px;
}

.search-heatmap-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

#control-panel button, #control-panel select {
    margin-right: 10px;
    padding: 8px 12px;
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Share Tech Mono', monospace;
    cursor: pointer;
    transition: all 0.3s;
}

#control-panel input[type="text"] {
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Share Tech Mono', monospace;
}

#control-panel input[type="text"]::placeholder {
    color: var(--text-color);
    opacity: 0.7;
}

#control-panel button:hover, #control-panel select:hover, #control-panel input[type="text"]:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.custom-popup {
    max-width: 400px;
    width: 350px;
}

.leaflet-popup-content {
    width: 100% !important;
    margin: 11px 11px;
    line-height: 1.4;
}

.custom-popup audio {
    width: 100%;
    margin-top: 10px;
}

.get-more-info {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 5px;
    background-color: var(--hover-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s;
    margin-right: 5px;
}

.get-more-info:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.additional-transcription {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.additional-info {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 15px;
    padding-right: 10px;
}

.additional-info::-webkit-scrollbar {
    width: 8px;
    background-color: var(--background-color);
}

.additional-info::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
}

.additional-info::-webkit-scrollbar-thumb:hover {
    background-color: var(--hover-color);
}

/* Theme Leaflet Zoom Buttons (Globally, as they are hidden on mobile anyway) */
.leaflet-control-zoom a {
    background-color: var(--background-color) !important;
    color: var(--text-color) !important;
    border-bottom: 1px solid var(--border-color) !important;
    transition: all 0.3s;
}
.leaflet-control-zoom a:hover {
    background-color: var(--primary-color) !important;
    color: var(--background-color) !important;
}
.leaflet-control-zoom {
    border: 1px solid var(--border-color) !important;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}
/* Hide Leaflet Scale (Globally) */
.leaflet-control-scale {
    display: none !important;
}


/* Deprecated custom zoom control styling (can be removed if not used) */
.leaflet-control-custom-zoom {
    /* background-color: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5); */
}
.leaflet-control-custom-zoom a {
    /* display: block;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    font-size: 18px;
    font-weight: bold;
    padding: 5px 10px;
    line-height: 30px;
    background-color: var(--background-color); */
}
.leaflet-control-custom-zoom a:first-child {
    /* border-bottom: 1px solid var(--border-color); */
}
.leaflet-control-custom-zoom a:hover {
    /* background-color: var(--primary-color);
    color: var(--background-color); */
}


.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background-color: rgba(0, 0, 0, 0.6);
}

.marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 15px;
    font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
    color: #fff;
}

.marker-cluster span {
    line-height: 30px;
}

.waveform {
    margin-top: 10px;
    background-color: rgba(0, 255, 0, 0.1);
    border: 1px solid var(--border-color);
}

.audio-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    margin-bottom: 10px;
}

.play-pause {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 12px;
    background-color: var(--hover-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s;
    margin-right: 5px;
}

.play-pause:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 0 10px var(--primary-color);
}

/* Common styles for both volume and heatmap intensity sliders */
.volume, #heatmap-intensity {
    -webkit-appearance: none;
    width: 100%;
    height: 8px; /* Increased height for better visibility */
    background: transparent; /* Make default background transparent */
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    border: 1px solid var(--text-color);
    border-radius: 4px;
}

.volume:hover, #heatmap-intensity:hover {
    opacity: 1;
}

/* Thumb styles */
.volume::-webkit-slider-thumb, #heatmap-intensity::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    border: 1px solid #000000; /* Changed border to black */
    margin-top: -5px; /* Adjusted margin-top */
}

.volume::-moz-range-thumb, #heatmap-intensity::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    border: 1px solid #000000; /* Changed border to black */
}

/* Track styles */
.volume::-webkit-slider-runnable-track, #heatmap-intensity::-webkit-slider-runnable-track {
    height: 8px;
    background: rgba(0, 255, 0, 0.1); /* Lighter track background */
    border-radius: 4px;
    border: 1px solid var(--border-color); /* Keep border */
}

.volume::-moz-range-track, #heatmap-intensity::-moz-range-track {
    height: 8px;
    background: rgba(0, 255, 0, 0.1); /* Lighter track background */
    border-radius: 4px;
    border: 1px solid var(--border-color); /* Keep border */
}

/* MS-specific styles */
.volume::-ms-track, #heatmap-intensity::-ms-track {
    width: 100%;
    height: 8px;
    background: transparent;
    border-color: transparent;
    color: transparent;
}

.volume::-ms-fill-lower,
#heatmap-intensity::-ms-fill-lower {
    background: rgba(0, 255, 0, 0.1); /* Lighter track background */
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.volume::-ms-fill-upper,
#heatmap-intensity::-ms-fill-upper {
    background: transparent; /* Make upper track transparent */
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.volume::-ms-thumb, #heatmap-intensity::-ms-thumb {
    width: 16px;
    height: 16px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    border: 1px solid #000000; /* Changed border to black */
    margin-top: 0;
}

/* Specific adjustments for volume slider */
.volume {
    max-width: 150px;
    vertical-align: middle;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: var(--background-color);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid var(--border-color);
    width: 80%;
    max-width: 500px;
    color: var(--text-color);
    font-family: 'Share Tech Mono', monospace;
}

.modal-content h2 {
    margin-top: 0;
}

.modal-content label {
    display: block;
    margin-top: 10px;
}

.modal-content input[type="date"],
.modal-content input[type="time"] {
    width: 100%;
    padding: 5px;
    margin-top: 5px;
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.modal-content button {
    margin-top: 20px;
    padding: 8px 12px;
    background-color: var(--hover-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
}

.modal-content button:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
}

/* Confirmation Modal Styles */
.confirmation-modal-content {
    max-width: 400px;
    text-align: center;
}

.confirmation-message {
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(255, 255, 0, 0.1);
    border: 1px solid rgba(255, 255, 0, 0.3);
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.4;
}

.confirmation-modal-content .modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.confirmation-modal-content .modal-buttons button {
    min-width: 120px;
    padding: 10px 20px;
    font-size: 14px;
}

.heatmap-controls label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.heatmap-controls input[type="checkbox"] {
    margin-right: 5px;
    accent-color: var(--primary-color);
}

#new-call-banner {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: 130px !important; /* Position below summary bar and sidebar */
    background-color: rgba(0, 0, 0, 1);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    z-index: 1001;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    transition: opacity 0.3s ease-in-out, top 0.3s ease-in-out;
    padding: 10px 20px;
    font-size: 18px;
    text-align: center;
    width: 80%;
    max-width: 400px;
}

#new-call-banner.hidden {
    opacity: 0;
    pointer-events: none;
    top: -50px; /* Move it off-screen when hidden */
}

.ellipsis::after {
    content: '...';
    animation: ellipsis 1.5s infinite;
    display: inline-block;
    width: 20px;
    text-align: left;
}

@keyframes ellipsis {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

/* Ticker Styles - Desktop Base */
 #summary-bar {
    position: absolute;
    top: 70px; /* Position it just below the control panel */
    left: 200px; /* Position to the right of the sidebar */
    right: 10px; /* Adjust right padding */
    height: 40px;
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    z-index: 998; /* Below sidebar */
    overflow: hidden; /* Crucial: Hide overflowing content */
    font-family: 'Share Tech Mono', monospace;
    transition: left 0.3s ease-in-out;
    display: flex; /* Use flexbox for vertical centering */
    align-items: center; /* Vertically center content */
 }

 .ticker-wrap {
    width: 100%;
    /* height: 100%; No longer needed with flex on parent */
    overflow: hidden; /* Should be redundant due to #summary-bar, but safe */
    position: relative; /* Needed if using pseudo-elements for complex loops */
    /* display: flex; No longer needed with flex on parent */
    /* align-items: center; No longer needed with flex on parent */
 }

 .ticker {
    display: inline-block; /* Treat the container of items as a block for animation */
    white-space: nowrap; /* Ensure all .ticker-item stay on one line */
    will-change: transform; /* Performance hint */
    animation: ticker-scroll 45s linear infinite; /* Adjust duration as needed */
 }

 .ticker-item {
    display: inline-block; /* Keep items inline */
    padding: 0 25px; /* Horizontal spacing between items/sections */
    color: var(--text-color);
    font-size: 20px; /* Desktop font size */
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    vertical-align: middle; /* Ensure vertical alignment */
 }

 /* Style for the highlighted talk groups */
 .summary-highlight {
    color: #00ccff; /* Blue color */
    font-weight: bold;
    text-shadow: 0 0 8px rgba(0, 204, 255, 0.7); /* Blue glow */
    margin: 0 3px; /* Add slight spacing */
 }

 /* Ticker Animation */
 @keyframes ticker-scroll {
   0% {
     transform: translateX(0%);
   }
   100% {
     /* Scroll one full copy (-50% because there are two identical copies) */
     transform: translateX(-50%);
   }
 }

/* Desktop Specific Adjustments (Excluding Ticker and Leaflet Controls) */
@media screen and (min-width: 769px) {
    #map {
        /* Adjust padding if sidebar is shown */
        padding-left: 0; /* Default */
        transition: padding-left 0.3s ease-in-out;
    }

    #map.sidebar-visible {
       padding-left: 180px; /* Width of the sidebar */
    }

    #category-sidebar {
      position: absolute;
      left: 0px;
      top: 70px; /* Position below the control panel */
      width: 180px;
      background-color: rgba(0, 0, 0, 0.8);
      color: var(--text-color);
      border: 1px solid var(--border-color);
      border-radius: 0 4px 4px 0; /* Rounded corners on the right */
      box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
      z-index: 999;
      font-family: 'Share Tech Mono', monospace;
      padding: 10px;
      overflow-y: auto;
      max-height: calc(100vh - 120px); /* Adjust height */
      transition: transform 0.3s ease-in-out;
      transform: translateX(0); /* Default: visible */
    }

    .category-header {
      font-size: 16px;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--border-color);
      margin-bottom: 10px;
      text-align: center;
    }

    .category-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 5px;
      border-bottom: 1px solid rgba(0, 255, 0, 0.2);
      cursor: pointer;
      transition: all 0.2s;
    }

    .category-item:hover {
      background-color: var(--hover-color);
    }

    .category-item.active {
      background-color: rgba(0, 50, 0, 0.8);
      border-left: 3px solid var(--primary-color);
      box-shadow: inset 0 0 10px rgba(0, 255, 0, 0.3);
      padding-left: 7px; /* Adjust padding for border */
    }

    /* Desktop Category Font Size Increase */
    .category-name {
      font-size: 18px; /* Increased from 14px */
    }

    .category-count {
      background-color: var(--hover-color);
      color: var(--text-color);
      border-radius: 12px;
      padding: 2px 8px;
      font-size: 20px; /* Increased from 12px */
      font-weight: bold; /* Make count bold */
      min-width: 28px; /* Adjust min width */
      text-align: center;
    }

    .leaflet-control-zoom {
      position: absolute;
      right: 10px;
      left: auto !important;
      top: 120px !important; /* Below summary bar */
      z-index: 999;
    }

    .leaflet-control-attribution {
        z-index: 996 !important; /* Lower z-index than control panel */
        background-color: rgba(0, 0, 0, 0.7) !important;
        color: var(--text-color) !important;
        border: 1px solid var(--border-color);
        font-size: 10px !important;
        padding: 2px 5px !important;
        border-radius: 3px !important;
    }
    /* .leaflet-control-scale is hidden globally now */
}

/* --- SIDEBAR TOGGLE BUTTON & HIDING CLASS --- */
#sidebar-toggle-btn {
    display: none; /* Hidden on desktop by default */
    position: fixed;
    left: 10px;
    z-index: 1001;  /* Above sidebar */
    padding: 5px 10px;
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Share Tech Mono', monospace;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    transition: all 0.3s;
}

#sidebar-toggle-btn:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
}

/* Class to hide/slide the sidebar */
.sidebar-hidden {
    transform: translateX(-110%) !important; /* Slide out fully */
}
/* --- END SIDEBAR TOGGLE --- */


/* ============================================ */
/* Mobile Responsiveness (max-width: 768px)     */
/* ============================================ */
@media screen and (max-width: 768px) {
    #map {
        /* Map height adjusted for summary bar (50px) and bottom controls (180px) */
        height: calc(100vh - 50px - 180px);
        padding-top: 50px; /* Prevent map content hiding under summary bar */
        box-sizing: border-box;
        width: 100%;
    }
	.leaflet-control-zoom {
		display: none !important;
	}

    /* --- Control Panel Mobile GRID Makeover --- */
    #control-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        background: rgba(0, 0, 0, 0.9);
        padding: 10px; /* Padding around the grid */
        box-sizing: border-box;
        display: grid; /* USE GRID */
        grid-template-columns: 1fr 1fr; /* Two equal columns */
        /* Define 3 rows: auto height based on content */
        grid-template-rows: auto auto auto;
        gap: 8px; /* Gap between grid cells */
        height: 180px; /* Increased height */
        z-index: 1000;
        align-items: center; /* Vertically center content within grid cells */
    }

    /* Assign grid areas */
    #control-panel .center-controls { /* Search + Heatmap */
        grid-column: 1 / -1; /* Span both columns */
        grid-row: 1 / 2;     /* First row */
        display: flex;       /* Use flex for internal layout */
        flex-direction: column;
        gap: 5px;
        margin: 0; /* Reset margin */
        order: 0; /* Reset order */
    }
    #control-panel .left-controls { /* Time Filter + Mode */
        grid-column: 1 / 2; /* First column */
        grid-row: 2 / 3;     /* Second row */
        display: flex;
        gap: 5px;
        justify-content: stretch; /* Stretch items */
    }
     #control-panel .right-controls { /* Checkboxes + User Mgmt */
        grid-column: 2 / 3; /* Second column */
        grid-row: 2 / 3;     /* Second row */
        display: flex;
        flex-direction: column; /* Stack checkboxes and button */
        gap: 5px;
        align-items: stretch; /* Stretch items */
    }

    /* Style elements within the grid areas */
    #control-panel .search-heatmap-container {
        display: contents; /* Let children participate in parent grid/flex */
    }

    #control-panel #search-input {
        width: 100%;
        max-width: none;
        padding: 5px 8px; /* Further reduced padding */
        font-size: 12px; /* Further reduced font */
        box-sizing: border-box;
        margin: 0;
    }

    #control-panel .heatmap-controls {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 5px;
        padding: 0 5px; /* Add padding for spacing */
    }
    #control-panel .heatmap-controls label {
        font-size: 10px; /* Smaller label */
        white-space: nowrap;
        margin: 0;
        flex-shrink: 0; /* Prevent shrinking */
    }
    #control-panel #heatmap-intensity-container {
        flex-grow: 1;
        margin: 0;
        min-width: 60px; /* Smaller min-width */
    }
    #control-panel #heatmap-intensity {
        height: 6px;
    }
     #control-panel #heatmap-intensity::-webkit-slider-thumb {
        width: 12px; height: 12px; margin-top: -3px;
    }
     #control-panel #heatmap-intensity::-moz-range-thumb {
        width: 12px; height: 12px;
    }

    /* General buttons/selects inside the mobile panel */
    #control-panel button,
    #control-panel select {
        flex-grow: 1; /* Allow filling space */
        flex-basis: 0; /* Allow shrinking/growing */
        width: auto;
        margin: 0;
        padding: 6px 5px; /* Adjusted padding */
        font-size: 11px; /* Slightly smaller font */
        box-sizing: border-box;
        text-align: center;
        min-width: 0; /* Remove minimum width if needed */
    }

    /* Checkboxes group adjustments within the grid */
    #control-panel .controls-checkbox-group {
        display: flex;
        flex-direction: row;
        justify-content: space-around; /* Space out */
        align-items: center;
        gap: 5px; /* Gap between labels */
        width: 100%; /* Take full width of its grid cell */
        padding: 3px 0; /* Add some vertical padding */
        margin: 0;
    }
    #control-panel .controls-checkbox-group label {
        font-size: 10px; /* Even smaller */
        margin: 0;
        white-space: nowrap;
        display: flex;
        align-items: center;
    }
     #control-panel .controls-checkbox-group input[type="checkbox"] {
         width: 11px; height: 11px;
         margin-right: 2px;
         vertical-align: middle;
         flex-shrink: 0;
     }

    /* User management button */
    #control-panel .user-management-dropdown {
        width: 100%; /* Full width of its cell */
        display: flex; /* Enable flex for button alignment */
    }
     #control-panel #user-menu-btn {
         width: 100%; /* Button takes full width */
     }
    /* --- End Control Panel Mobile GRID Makeover --- */


    .custom-popup {
        max-width: 90vw; /* Use viewport width */
        width: 280px; /* Fixed width if preferred */
    }

     /* --- Ticker Mobile Styles --- */
     #summary-bar {
        position: fixed; /* Keep fixed position */
        top: 0px; /* Summary bar at the very top */
        left: 10px;
        right: 10px;
        height: 50px; /* Mobile height */
        z-index: 1001; /* Keep high z-index */
        background-color: rgba(0, 0, 0, 0.8);
        color: var(--text-color);
        border: 1px solid var(--border-color);
        border-radius: 4px;
        box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
        overflow: hidden; /* Ensure overflow is hidden */
        font-family: 'Share Tech Mono', monospace;
        display: flex; /* Ensure flex is used for centering */
        align-items: center; /* Vertically center content */
     }

     .ticker-wrap {
        width: 100%;
        overflow: hidden; /* Ensure overflow hidden */
        position: relative;
     }

     .ticker {
        display: inline-block; /* Ensure display is correct */
        white-space: nowrap; /* CRUCIAL: Prevent wrapping on mobile */
        will-change: transform;
        animation: ticker-scroll 55s linear infinite; /* Slower mobile animation */
     }

     .ticker-item {
        display: inline-block; /* Ensure display is correct */
        padding: 0 15px; /* Mobile padding */
        font-size: 21px; /* Mobile font size */
        color: var(--text-color); /* Ensure base color */
        text-shadow: 0 0 5px rgba(0, 255, 0, 0.5); /* Ensure base shadow */
        vertical-align: middle;
		line-height: 40px;
     }

     /* Explicitly define summary highlight for mobile to avoid overrides */
     .summary-highlight {
        color: #00ccff; /* Blue color */
        font-weight: bold; /* Ensure bold */
        text-shadow: 0 0 8px rgba(0, 204, 255, 0.7); /* Blue glow */
        margin: 0 3px; /* Ensure spacing */
     }
     /* --- End Ticker Mobile Styles --- */


    /* --- SIDEBAR MOBILE STYLES --- */
      #sidebar-toggle-btn {
          display: block; /* Show button */
          position: fixed; /* Fixed position */
          top: 60px;      /* Position below summary bar */
          left: 10px;
          z-index: 1001; /* Above sidebar */
          transition: left 0.3s ease-in-out; /* Add transition for moving */
      }

      /* Style for when sidebar is OPEN - move the button */
      #category-sidebar:not(.sidebar-hidden) + #sidebar-toggle-btn {
         left: 190px; /* Move button to the right of the opened sidebar (180px width + 10px buffer) */
      }

      #category-sidebar {
        position: fixed; /* Fixed position for sliding */
        top: 50px; /* Position below summary bar */
        /* Adjust bottom based on new control panel height */
        bottom: 180px; /* Position above control panel */
        left: 0px;
        width: 180px; /* Keep width */
        /* Adjust max/height based on new control panel height */
        max-height: calc(100vh - 50px - 180px);
        height: calc(100vh - 50px - 180px);
        box-shadow: 0 0 15px rgba(0, 255, 0, 0.6);
        z-index: 1000; /* Below toggle button, above map */
        background-color: rgba(0, 0, 0, 0.95); /* More opaque */
        border: 2px solid var(--border-color);
        padding: 10px; /* Add padding for content */
        box-sizing: border-box;
        overflow-y: auto; /* Ensure vertical scrolling */
        transition: transform 0.3s ease-in-out;
        transform: translateX(-110%); /* Start hidden */
      }

      /* Class to SHOW the sidebar */
      #category-sidebar:not(.sidebar-hidden) {
         transform: translateX(0);
      }

      .category-header {
        font-size: 16px;
        padding: 10px 0;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
		margin-bottom: 5px;
      }

      .category-item {
        padding: 10px 8px;
        margin-bottom: 2px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		border-bottom: 1px solid rgba(0, 255, 0, 0.2);
		cursor: pointer;
		transition: all 0.2s;
      }
	  .category-item:hover {
        background-color: var(--hover-color); /* Ensure hover works */
       }
      .category-item.active {
        background-color: rgba(0, 50, 0, 0.8); /* Darker green */
        border-left: 3px solid var(--primary-color); /* Green indicator */
        box-shadow: inset 0 0 10px rgba(0, 255, 0, 0.3); /* Inner glow */
        padding-left: 5px; /* Adjust padding for the border */
      }
      .category-item.active:hover {
        background-color: rgba(0, 50, 0, 0.8); /* Keep active background on hover */
       }

       /* Mobile Category Font Size Increase */
      .category-name {
        font-size: 15px; /* Increased from 14px */
      }

      .category-count {
        font-size: 18px; /* Increased from 12px */
        min-width: 28px; /* Adjusted min width */
        padding: 2px 8px;
        font-weight: bold;
        background-color: var(--hover-color);
        color: var(--text-color);
        border-radius: 12px;
        text-align: center;
      }
    /* --- END SIDEBAR MOBILE --- */


    /* Other Mobile Adjustments */
    .modal-content {
        width: 90%;
        margin: 10% auto;
    }

    .modal-content input[type="date"],
    .modal-content input[type="time"] {
        font-size: 14px;
    }

    .modal-content button {
        font-size: 14px;
        padding: 6px 5px;
    }

    .audio-controls {
        display: flex;
        flex-direction: row; /* Keep horizontal */
        justify-content: space-between;
        align-items: center;
        margin-top: 10px;
        margin-bottom: 10px;
        flex-wrap: wrap; /* Allow wrapping */
    }

    .play-pause, .get-more-info {
        flex-basis: 48%; /* Roughly half width */
        margin: 5px 1%;
        padding: 5px 0px;
        font-size: 11px;
        text-align: center;
    }

    .volume {
        width: 100%; /* Full width */
        margin-top: 10px;
    }

    /* Hide unnecessary controls on mobile */
    .leaflet-control-zoom { /* Already hidden globally now */
        /* display: none !important; */
    }
    /* .leaflet-control-scale is hidden globally */

    .leaflet-control-attribution {
        display: none !important;
    }


    #new-call-banner {
       top: 60px !important; /* Position below summary bar */
       font-size: 14px; /* Smaller font */
       padding: 6px 12px;
       z-index: 998; /* Below summary/sidebar, above map */
       max-width: calc(100% - 40px); /* Prevent overflow */
   }

    /* Adjust notification position for taller control panel */
    .notification {
        bottom: 200px; /* Position above the taller control panel (180px + 20px buffer) */
    }
}

/* Further adjustments for very small screens (if needed) */
@media screen and (max-width: 480px) {
    /* Grid layout should adapt reasonably well, but fine-tune if needed */
     #control-panel {
         height: auto; /* Allow height to grow if needed */
         min-height: 180px;
         gap: 5px; /* Reduce gap slightly */
     }
     #control-panel button,
     #control-panel select {
        font-size: 10px;
        padding: 4px;
     }
     #control-panel .controls-checkbox-group {
         gap: 8px; /* Smaller gap */
     }
     #control-panel .controls-checkbox-group label {
        font-size: 9px;
     }
     #control-panel .controls-checkbox-group input[type="checkbox"] {
        width: 10px; height: 10px;
     }
      #search-input {
        font-size: 11px;
        padding: 4px 6px;
     }
     .heatmap-controls label {
        font-size: 9px;
     }

    #new-call-banner {
        font-size: 12px;
        padding: 5px 10px;
    }

    .ticker-item {
        font-size: 14px;
        padding: 0 10px;
    }

     .play-pause, .get-more-info {
        font-size: 10px;
     }

     #category-sidebar {
        bottom: auto; /* Let height control */
        height: calc(100vh - 50px - 190px); /* Adjust approx height */
        max-height: calc(100vh - 50px - 190px);
     }
     .notification {
         bottom: 210px; /* Adjust further if needed */
     }
}

/* Ensure consistent styling across browsers */
input[type="date"],
input[type="time"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Improve visibility of selection */
::selection {
    background-color: var(--primary-color);
    color: var(--background-color);
}

/* Improve focus visibility for accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
#live-stream-button {
    margin-left: 10px;
    padding: 8px 12px;
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Share Tech Mono', monospace;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

#live-stream-button:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 0 10px var(--primary-color);
}

#live-stream-button.playing {
    animation: pulse 2s infinite;
    background-color: var(--hover-color);
}

.stream-warning-modal .modal-content {
    max-width: 400px;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 10px; /* Add gap between buttons */
    margin-top: 20px;
}

/* Style modal confirmation/cancel buttons */
.modal-buttons button.confirm-btn {
    background-color: var(--hover-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}
.modal-buttons button.confirm-btn:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
}
.modal-buttons button.cancel-btn {
    background-color: #330000;
    color: #ff0000;
    border: 1px solid #ff0000;
}
.modal-buttons button.cancel-btn:hover {
    background-color: #ff0000;
    color: var(--background-color);
}

.modal-buttons button.undo-btn {
    background-color: #ffc107;
    color: #212529;
    border: 1px solid #ffc107;
}

.modal-buttons button.undo-btn:hover {
    background-color: #e0a800;
    border-color: #e0a800;
}

.modal-buttons button.undo-btn:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}


@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(0, 255, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 0, 0);
    }
}

/* Mobile responsiveness for live stream button */
@media screen and (max-width: 768px) {
    #control-panel #live-stream-button { /* Target specifically inside panel */
        margin-left: 0; /* Use grid gap */
        margin-right: 0;
        /* Flex handles width */
    }

    .stream-warning-modal .modal-content {
        width: 90%;
        margin: 10% auto;
    }
}

@media screen and (max-width: 480px) {
    #control-panel #live-stream-button {
        font-size: 10px; /* Match other buttons */
        padding: 4px;
    }
}
/* Marker Correction Styles */

.marker-correction-link a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 12px;
    opacity: 0.7;
    transition: all 0.3s;
}

.marker-correction-link a:hover {
    opacity: 1;
    text-shadow: 0 0 5px var(--primary-color);
}

/* Correction Modal */
.correction-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: modalAppear 0.3s ease-out;
}

.correction-modal .modal-content {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    padding: 20px;
    max-width: 400px;
    width: 90%;
}

.correction-modal .modal-content h2 {
    color: var(--text-color);
    margin-bottom: 20px;
    text-shadow: 0 0 5px var(--primary-color);
}

.correction-modal button {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    cursor: pointer;
    transition: all 0.3s;
}

.correction-modal button:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 0 10px var(--primary-color);
}

/* Delete button specific styling */
.correction-modal #delete-marker {
    border-color: #ff3333;
    color: #ff3333;
}

.correction-modal #delete-marker:hover {
    background-color: #ff3333;
    color: var(--background-color);
    box-shadow: 0 0 10px #ff3333;
}

/* Relocation Banner */
.relocation-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    color: var(--text-color);
    text-align: center;
    padding: 15px;
    font-family: 'Share Tech Mono', monospace;
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
    z-index: 2000;
    animation: slideDown 0.3s ease-out;
}

.relocation-banner button {
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-color);
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    margin: 0 5px;
}

.relocation-banner button:hover {
    box-shadow: 0 0 10px var(--primary-color);
    background-color: var(--primary-color);
    color: var(--background-color);
}
/* Preview Marker */
.preview-marker {
    cursor: move;
}

.preview-marker .marker-pulse {
    transition: transform 0.2s;
}

.preview-marker:hover .marker-pulse {
    transform: scale(1.2);
}

/* Notifications */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    z-index: 2000;
    animation: notificationSlideIn 0.3s ease-out;
    transition: all 0.3s ease-out;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    box-shadow: 0 0 10px var(--primary-color);
}

/* Animations */
@keyframes modalAppear {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

@keyframes notificationSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Responsiveness for Correction/Relocation */
@media screen and (max-width: 768px) {
    .correction-modal .modal-content {
        width: 95%;
        margin: 10px;
        padding: 15px;
    }

    .correction-modal button {
        padding: 10px;
        font-size: 14px;
    }

    .notification {
        /* Moved to main mobile block */
        right: 10px;
        left: 10px;
        text-align: center;
    }

    .relocation-banner button {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Popup link styles */
.popup-top-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 5px 12px 5px;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

/* Links container within top container */
.popup-top-links {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    border-bottom: none;
}

/* Individual link styles */
.street-view-link, .correction-link {
    color: var(--text-color) !important;
    text-decoration: none !important;
    font-size: 12px;
    padding: 4px 8px;
    background-color: var(--hover-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s;
    outline: none;
    display: inline-block;
    text-align: center;
    width: auto;
    min-width: 80px;
    font-family: 'Share Tech Mono', monospace;
}

/* Timestamp container styles */
.popup-timestamp {
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.8;
    white-space: nowrap; /* Prevent wrapping */
    padding-left: 10px; /* Add some space */
}

/* Hover effects for links */
.street-view-link:hover, .correction-link:hover {
    background-color: var(--primary-color);
    color: var(--background-color) !important;
    box-shadow: 0 0 10px var(--primary-color);
    text-decoration: none !important;
}

/* Admin-only elements styling */
.correction-link.admin-only {
    background-color: #4a148c; /* Purple background for admin elements */
    border-color: #7b1fa2;
}

.correction-link.admin-only:hover {
    background-color: #6a1b9a;
    border-color: #8e24aa;
}

/* Admin-only message styling */
.admin-only-message {
    color: #9e9e9e !important;
    font-size: 11px;
    padding: 4px 8px;
    background-color: #424242;
    border: 1px solid #616161;
    border-radius: 4px;
    opacity: 0.7;
    cursor: not-allowed;
    display: inline-block;
    text-align: center;
    width: auto;
    min-width: 80px;
    font-family: 'Share Tech Mono', monospace;
}

/* Mobile responsiveness for popup links */
@media screen and (max-width: 768px) {
    .popup-top-container {
        padding: 0 5px 10px 5px;
    }

    .street-view-link, .correction-link, .admin-only-message {
        font-size: 11px;
        padding: 3px 6px;
        min-width: 70px;
    }

    .popup-timestamp {
        font-size: 11px;
    }
}

.user-management-dropdown {
    position: relative;
    display: inline-block; /* Let grid/flex control size */
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--background-color);
    min-width: 160px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    border: 1px solid var(--border-color);
    z-index: 1002;
    border-radius: 4px;
    right: 0; /* Align to the right */
    top: 100%; /* Position below the button */
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s;
}

.dropdown-content a:hover {
    background-color: var(--hover-color);
}

.show {
    display: block;
}

/* User Management Modals */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 8px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: 'Share Tech Mono', monospace;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width */
}

.users-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 20px 0;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    border-radius: 4px;
}

.user-item:hover {
    background-color: var(--hover-color);
}

.user-info {
    flex-grow: 1;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.delete-user-btn {
    background-color: #330000;
    color: #ff0000;
    border: 1px solid #ff0000;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s;
}

.delete-user-btn:hover {
    background-color: #ff0000;
    color: var(--background-color);
    box-shadow: 0 0 10px #ff0000;
}

/* Mobile responsiveness for user management dropdown */
@media screen and (max-width: 768px) {
    /* Dropdown button width is handled by grid */
    .dropdown-content {
        /* Use fixed positioning for mobile overlay effect */
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 300px;
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    }

    .user-item {
        flex-direction: column;
        text-align: center;
    }

    .user-actions {
        margin-top: 10px;
    }
}
.sessions-list {
    max-height: 400px;
    overflow-y: auto;
}

.session-item {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--background-color);
}

.session-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.session-details {
    flex-grow: 1;
    padding-right: 10px; /* Add space between details and button */
}

.session-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px; /* Add margin if it wraps */
}

.terminate-session-btn {
    background-color: #330000;
    color: #ff0000;
    border: 1px solid #ff0000;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s;
}

.terminate-session-btn:hover {
    background-color: #ff0000;
    color: var(--background-color);
    box-shadow: 0 0 10px #ff0000;
}

.current-session {
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
}

.session-item small {
    opacity: 0.7;
    display: block; /* Ensure small tags take full width if needed */
}

.device-info {
    font-size: 0.9em;
    margin-top: 5px;
    color: var(--text-color);
    opacity: 0.8;
}
/* Styled Select Box */
.styled-select {
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    width: 100%;
    appearance: none; /* Remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%2300ff00" height="12" viewBox="0 0 24 24" width="12" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>'); /* Changed fill color */
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    box-sizing: border-box;
}

.user-selection {
    margin-bottom: 15px;
}

.user-selection label {
    margin-right: 10px;
    font-weight: bold;
    color: var(--text-color);
    font-family: 'Share Tech Mono', monospace;
    display: block; /* Make label take full width */
    margin-bottom: 5px;
}

.styled-select:hover {
    border-color: var(--primary-color);
}

.styled-select:focus {
    outline: none;
    box-shadow: 0 0 5px var(--primary-color);
    border-color: var(--primary-color);
}
/* Scrollbar Styles for Session List */
.sessions-list::-webkit-scrollbar {
    width: 12px;
}

.sessions-list::-webkit-scrollbar-track {
    background: var(--background-color);
}

.sessions-list::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 6px;
    border: 2px solid var(--background-color);
}

.sessions-list::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-color);
}

/* For Firefox */
.sessions-list {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-color);
}

/* Category Badge Style */
.category-badge {
  background-color: var(--hover-color);
  color: #00ccff;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 12px;
  margin-left: 5px;
  display: inline-block;
  vertical-align: middle; /* Align with text */
}

/* Pulsing icon CSS */
.leaflet-pulsing-icon {
    border-radius: 1%;
    box-shadow: 0px 0px 0px 0 rgba(0,0,0,.75);
    background-color: transparent !important; /* Make the center transparent */
}

.leaflet-pulsing-icon:after {
    content: "";
    border-radius: 100%;
    height: 300%;
    width: 300%;
    position: absolute;
    margin: -100% 0 0 -100%;
    /* Increased shadow size and spread */
    box-shadow: 0 0 10px 4px red; /* Default color set in JS, increased size */
    -webkit-animation: pulsate 1s ease-out;
    animation: pulsate 1s ease-out;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
    -webkit-animation-delay: 1.1s;
    animation-delay: 1.1s;
    opacity: 0; /* Start invisible */
}

@-webkit-keyframes pulsate {
    0% {
        -webkit-transform: scale(0.1, 0.1);
        transform: scale(0.1, 0.1);
        opacity: 0;
    }
    50% {
        /* Keep full opacity longer */
        opacity: 1;
    }
    80% {
        /* Start fading later */
        opacity: 1;
    }
    100% {
        -webkit-transform: scale(1.2, 1.2);
        transform: scale(1.2, 1.2);
        opacity: 0;
    }
}

@keyframes pulsate {
     0% {
        -webkit-transform: scale(0.1, 0.1);
        transform: scale(0.1, 0.1);
        opacity: 0;
    }
    50% {
        /* Keep full opacity longer */
        opacity: 1;
    }
    80% {
        /* Start fading later */
        opacity: 1;
    }
    100% {
        -webkit-transform: scale(1.2, 1.2);
        transform: scale(1.2, 1.2);
        opacity: 0;
    }
}
/* Checkbox group styles */
.controls-checkbox-group {
    display: flex;
    flex-direction: column; /* Default desktop layout */
    margin-right: 10px;
}

.controls-checkbox-group label {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    cursor: pointer;
    color: var(--text-color);
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s;
    font-size: 12px; /* Slightly smaller font */
}

.controls-checkbox-group label:hover {
    text-shadow: 0 0 5px var(--primary-color);
}

.controls-checkbox-group input[type="checkbox"] {
    margin-right: 5px;
    appearance: none;
    -webkit-appearance: none;
    width: 14px; /* Smaller checkbox */
    height: 14px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    top: -1px; /* Align better */
}

.controls-checkbox-group input[type="checkbox"]:checked {
    background-color: var(--hover-color);
    border-color: var(--primary-color);
}

.controls-checkbox-group input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: var(--primary-color);
    font-size: 10px; /* Smaller checkmark */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.controls-checkbox-group input[type="checkbox"]:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
}

/* Mobile responsiveness for checkboxes is handled within #control-panel mobile rules */

/* Address search bar styles */
.address-search-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.9);
  color: var(--text-color);
  text-align: center;
  padding: 15px;
  font-family: 'Share Tech Mono', monospace;
  border-bottom: 2px solid var(--primary-color);
  box-shadow: 0 0 10px var(--primary-color);
  z-index: 2000;
  animation: slideDown 0.3s ease-out;
}

/* Style the new PlaceAutocompleteElement's input part */
place-autocomplete-element::part(input) {
    width: 100%;
    padding: 8px 10px;
    background-color: #000 !important;
    color: #00ff00 !important;
    border: 1px solid #00ff00 !important;
    border-radius: 4px !important;
    font-family: 'Share Tech Mono', monospace !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
}

/* Style for the icons inside the input (search, clear) */
place-autocomplete-element::part(icon) {
    fill: var(--primary-color) !important;
}


/* Google Autocomplete dropdown theming */
.pac-container, .gmp-pac-container {
  /* This container is added to the body, so we style it globally */
  z-index: 2001 !important;
  background-color: #0d0d0d;
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  font-family: 'Share Tech Mono', monospace;
}

.pac-item, .gmp-pac-item {
  padding: 10px;
  color: var(--text-color);
  border-bottom: 1px solid rgba(0, 255, 0, 0.1);
  transition: all 0.2s;
  background-color: #0d0d0d;
}

.pac-item:hover, .gmp-pac-item:hover {
  background-color: rgba(0, 255, 0, 0.1);
  cursor: pointer;
}

.pac-item-query, .gmp-pac-suggestion-main-text {
  color: var(--text-color) !important;
  font-size: 14px;
}

.pac-matched, .gmp-pac-suggestion-main-text-match {
  color: var(--primary-color) !important;
  font-weight: bold;
}

/* Scrollbar styling */
.pac-container::-webkit-scrollbar, .gmp-pac-container::-webkit-scrollbar {
  width: 8px;
  background-color: var(--background-color);
}

.pac-container::-webkit-scrollbar-thumb, .gmp-pac-container::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 4px;
  border: 1px solid rgba(0, 255, 0, 0.3);
}

/* Mobile responsiveness for address search */
@media screen and (max-width: 768px) {
  .address-search-banner {
    padding: 10px;
  }

  place-autocomplete-element::part(input) {
    font-size: 14px !important; /* Keep readable size */
    padding: 6px 8px !important;
  }

  .pac-container, .gmp-pac-container {
    margin: 0 10px;
    max-width: calc(100% - 20px);
  }

  .pac-item, .gmp-pac-item {
    padding: 8px;
    font-size: 14px;
  }
}

/* Hide Google branding */
.pac-logo::after, .gmp-pac-logo {
  display: none !important;
}

.pac-icon, .gmp-pac-icon {
  display: none !important;
}

/* LocationIQ Dropdown Styles */
.locationiq-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #000;
  border: 1px solid #00ff00;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 255, 0, 0.3);
}

.locationiq-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #333;
  color: #00ff00;
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  transition: background-color 0.2s ease;
}

.locationiq-item:hover {
  background-color: #003300;
}

.locationiq-item:last-child {
  border-bottom: none;
}

.locationiq-dropdown::-webkit-scrollbar {
  width: 8px;
}

.locationiq-dropdown::-webkit-scrollbar-track {
  background: #000;
}

.locationiq-dropdown::-webkit-scrollbar-thumb {
  background: #00ff00;
  border-radius: 4px;
}

.locationiq-dropdown::-webkit-scrollbar-thumb:hover {
  background: #00cc00;
}

/* Mobile responsive styles for LocationIQ dropdown */
@media screen and (max-width: 768px) {
  .locationiq-dropdown {
    max-height: 150px;
    font-size: 11px;
  }
  
  .locationiq-item {
    padding: 6px 10px;
    font-size: 11px;
  }
}
/* Scrollbar Styles for Category Sidebar */
#category-sidebar::-webkit-scrollbar {
  width: 12px; /* Width of the scrollbar */
}

#category-sidebar::-webkit-scrollbar-track {
  background: var(--background-color); /* Match sidebar background */
  border-radius: 0 4px 4px 0; /* Match sidebar border-radius if needed */
}

#category-sidebar::-webkit-scrollbar-thumb {
  background-color: var(--primary-color); /* Green thumb */
  border-radius: 6px; /* Rounded thumb */
  border: 2px solid var(--background-color); /* Space around thumb */
}

#category-sidebar::-webkit-scrollbar-thumb:hover {
  background-color: var(--text-color); /* Brighter green on hover */
}

/* Firefox Scrollbar Styles */
#category-sidebar {
  scrollbar-width: thin; /* Use 'auto' or 'thin' */
  scrollbar-color: var(--primary-color) var(--background-color); /* thumb track */
}

/* --- END Scrollbar Styles for Category Sidebar --- */

/* NEW: Custom Location Control Button Styles */
.leaflet-control-custom.leaflet-bar { /* Container for our button */
    background-color: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4); /* Match Leaflet's default control shadow */
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.leaflet-control-custom .location-button { /* The button itself */
    background-color: transparent; /* Uses container background */
    width: 30px; /* Slightly larger for easier touch interaction */
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-bottom: none; /* Remove default leaflet-bar border between items if only one */
    text-decoration: none;
}

.leaflet-control-custom .location-button:hover {
    background-color: var(--hover-color);
}

.leaflet-control-custom .location-button svg {
    fill: var(--primary-color); /* CHANGED: Default icon color to primary theme color */
    transition: fill 0.2s ease-in-out;
    width: 20px; /* Ensure SVG size is consistent */
    height: 20px;
}

.leaflet-control-custom .location-button.active svg {
    fill: var(--primary-color); /* Icon color when active (already primary, but good to be explicit) */
}

/* END NEW: Custom Location Control Button Styles */


/* End of CSS file */

/* --- Talkgroup Modal Styles --- */
.talkgroup-modal-content {
  width: 90%; /* Wider modal */
  max-width: 700px;
  max-height: 80vh; /* Limit height */
  display: flex;
  flex-direction: column;
  margin: 5vh auto; /* Position near top instead of center */
}

.talkgroup-modal-content h2 {
  text-align: center;
  margin-bottom: 15px;
  text-shadow: 0 0 8px var(--primary-color);
}

.talkgroup-list {
  flex-grow: 1; /* Allow list to take available space */
  overflow-y: auto; /* Enable scrolling */
  padding-right: 10px; /* Space for scrollbar */
  margin-bottom: 15px;
}

/* Scrollbar for talkgroup list */
.talkgroup-list::-webkit-scrollbar {
  width: 10px;
}

.talkgroup-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
}

.talkgroup-list::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 5px;
  border: 2px solid rgba(0, 0, 0, 0.3);
}

.talkgroup-list {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.3);
}

.talkgroup-list-item {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 10px 15px;
  margin-bottom: 10px;
  background-color: rgba(0, 51, 0, 0.1); /* Subtle green background */
  transition: background-color 0.3s;
}

.talkgroup-list-item:hover {
  background-color: rgba(0, 51, 0, 0.2);
}

.talkgroup-item-timestamp {
  font-size: 12px;
  opacity: 0.8;
  margin-bottom: 5px;
  display: block;
}

.talkgroup-item-transcription {
  margin-bottom: 10px;
  line-height: 1.5;
}

.talkgroup-item-audio .waveform {
  height: 25px; /* Smaller waveform */
  margin-top: 5px;
}

.talkgroup-item-audio .audio-controls {
  justify-content: flex-start; /* Align controls left */
  gap: 10px;
}

.talkgroup-item-audio .play-pause {
  padding: 4px 8px;
  font-size: 12px;
  margin-top: 0;
}

.talkgroup-item-audio .volume {
  max-width: 100px; /* Shorter volume slider */
  height: 6px;
}

.talkgroup-item-audio .volume::-webkit-slider-thumb {
    width: 12px;
    height: 12px;
    margin-top: -3px;
}

.talkgroup-item-audio .volume::-moz-range-thumb {
    width: 12px;
    height: 12px;
}

.loading-placeholder {
  text-align: center;
  padding: 20px;
  opacity: 0.7;
}

.new-item-highlight {
  animation: newItemFadeIn 0.5s ease-out;
}

@keyframes newItemFadeIn {
  from { background-color: rgba(0, 255, 0, 0.3); }
  to { background-color: rgba(0, 51, 0, 0.1); }
}

/* Mobile Adjustments for Talkgroup Modal */
@media screen and (max-width: 768px) {
  .talkgroup-modal-content {
    width: 95%;
    max-height: 85vh;
  }

  .talkgroup-list-item {
    padding: 8px 10px;
  }

  .talkgroup-modal-content h2 {
    font-size: 1.2em;
  }
}

/* --- END Talkgroup Modal Styles --- */

/* NEW: Style for the History button */
.talkgroup-history-btn {
    display: inline-block;
    padding: 8px 12px;
    background-color: var(--hover-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.3s;
    margin-right: 5px;
    text-align: center; /* Center text */
    min-width: auto; /* Remove min-width */
    flex-grow: 0; /* Don't grow */
    flex-shrink: 0; /* Don't shrink */
}

.talkgroup-history-btn:hover {
    background-color: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 0 10px var(--primary-color);
}

/* Apply mobile styles to history button */
.talkgroup-history-btn {
    flex-basis: auto; /* Let content determine size */
    margin: 5px 1%;
    padding: 5px 10px; /* Adjust padding */
    font-size: 11px;
    text-align: center;
}

.popup-timestamp {
    font-size: 11px;
}

/* NEW: Style for the talkgroup modal controls (autoplay toggle) */
.talkgroup-modal-controls {
  text-align: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.talkgroup-modal-controls label {
  display: inline-flex; /* Use inline-flex for better alignment */
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-color);
}

.talkgroup-modal-controls input[type="checkbox"] {
  margin-right: 8px;
  accent-color: var(--primary-color);
  width: 16px; /* Slightly larger checkbox */
  height: 16px;
}

/* NEW Ellipsis Animation */
@keyframes ellipsisCycle {
  0%   { content: '.'; }
  33%  { content: '..'; }
  66%  { content: '...'; }
  100% { content: '.'; }
}

/* NEW Style for the ellipsis */
.loading-ellipsis::after {
  content: '.'; /* Initial state */
  display: inline-block;
  width: 1.5em; /* Reserve space for three dots */
  text-align: left;
  vertical-align: bottom;
  overflow: hidden;
  animation: ellipsisCycle 1.5s infinite step-start;
  margin-left: 4px; /* Space after the label text */
}

/* --- Live Feed Setup Modal Styles --- */
.live-feed-modal-content {
  width: 90%;
  max-width: 500px; /* Adjust width as needed */
  max-height: 85vh; /* Limit height */
  display: flex;
  flex-direction: column;
  margin: 5vh auto; /* 5% from top, centered horizontally */
}

.live-feed-modal-content h2 {
  text-align: center;
  margin-bottom: 15px;
  text-shadow: 0 0 8px var(--primary-color);
}

#live-feed-search { /* Style for search input moved here */
    width: 100%;
    padding: 8px 10px;
    background-color: #000;
    color: #00ff00;
    border: 1px solid #00ff00;
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.live-feed-master-controls { /* Style for master controls container */
    display: flex;
    /* MODIFIED: Center the single remaining item */
    justify-content: center; 
    align-items: center; /* Vertically align */
    padding: 10px 0;
    margin-bottom: 15px;
    border-top: 1px solid rgba(0, 255, 0, 0.2);
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}

.live-feed-master-controls label { /* Style for master control labels */
    display: inline-flex; /* Keep inline-flex */
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
}

.live-feed-master-controls input[type="checkbox"] { /* Style for master control checkboxes */
    margin-right: 8px;
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

#live-feed-talkgroup-list { /* Style for talkgroup list container */
  flex-grow: 1; /* Allow list to take available space */
  overflow-y: auto; /* Enable scrolling */
  padding-right: 10px; /* Space for scrollbar */
  margin-bottom: 15px;
  border: 1px solid rgba(0, 255, 0, 0.2);
  padding: 5px;
  min-height: 200px; /* Ensure it has some height */
}

/* Scrollbar for talkgroup list */
#live-feed-talkgroup-list::-webkit-scrollbar { /* Style for scrollbar */
  width: 10px;
}

#live-feed-talkgroup-list::-webkit-scrollbar-track { /* Style for scrollbar track */
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
}

#live-feed-talkgroup-list::-webkit-scrollbar-thumb { /* Style for scrollbar thumb */
  background-color: var(--primary-color);
  border-radius: 5px;
  border: 2px solid rgba(0, 0, 0, 0.3);
}

#live-feed-talkgroup-list { /* Firefox scrollbar styles */
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.3);
}

.live-feed-tg-item { /* Style for individual talkgroup items */
  display: flex;
  align-items: center;
  padding: 8px 5px;
  margin-bottom: 3px;
  border-radius: 3px;
  transition: background-color 0.2s;
  cursor: pointer;
}

.live-feed-tg-item:hover { /* Hover style for talkgroup items */
    background-color: rgba(0, 51, 0, 0.2);
}

.live-feed-tg-item input[type="checkbox"] { /* Style for talkgroup checkboxes */
    margin-right: 10px;
    accent-color: var(--primary-color);
    flex-shrink: 0;
    width: 15px;
    height: 15px;
}

.live-feed-tg-item label { /* Style for talkgroup labels */
    font-size: 14px;
    color: var(--text-color);
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* --- END Live Feed Setup Modal Styles --- */

/* --- RE-INSERTED: Live Feed Display Styles --- */
#live-feed-display {
  position: fixed !important; /* Add !important */
  /* NEW: Position at the bottom */
  bottom: 10px !important; /* Add !important */
  left: 50%;
  transform: translateX(-50%);
  /* END NEW */
  width: 90%;
  max-width: 500px;
  max-height: 150px; /* Approx 5 lines */
  background-color: rgba(0, 0, 0, 0.85);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
  z-index: 997 !important; /* Add !important (just in case) */
  overflow: hidden; /* Prevent scrollbars */
  display: flex !important; /* Add !important */
  flex-direction: column-reverse;
  padding: 5px;
  box-sizing: border-box;
  pointer-events: none; /* Allow clicks to pass through to map */
  transition: bottom 0.3s ease-in-out; /* For mobile positioning */
}

.live-feed-item { /* Style for individual live feed items */
    padding: 4px 8px;
    margin-bottom: 3px; /* Space between items */
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    white-space: nowrap; /* Keep text on one line */
    overflow: hidden; /* Hide overflowing text */
    text-overflow: ellipsis; /* Keep ellipsis as default */
    background-color: rgba(0, 20, 0, 0.7); /* Slight background */
    border-radius: 3px;
    opacity: 1;
    transition: opacity 1.5s ease-out; /* Slower fade out */
    border-left: 2px solid var(--primary-color); /* Indicator */
    position: relative; /* Needed for absolute positioning of inner span if used */
    box-sizing: border-box;
}

/* NEW: Inner span for scrolling content */
.live-feed-item .scroll-content {
    display: inline-block; /* Allows transform */
    padding-right: 15px; /* Add space at the end before looping */
}

/* NEW: Class applied when scrolling is needed */
.live-feed-item.scrolling .scroll-content {
    text-overflow: clip; /* Remove ellipsis when scrolling */
    animation: marquee-scroll 15s linear infinite; /* Adjust duration as needed */
    will-change: transform;
}

.live-feed-item.fading-out { /* Style for fading out items */
    opacity: 0;
}

.live-feed-item strong { /* Style for talkgroup name highlight */
    color: #00ccff; /* Highlight talkgroup name */
    margin-right: 5px;
}

/* NEW: Marquee animation */
@keyframes marquee-scroll {
    0% {
        transform: translateX(0%);
    }
    100% {
        /* Calculate based on JS later, but start with a large enough value */
        transform: translateX(-100%);
    }
}


/* Mobile adjustment for live feed display position */
@media screen and (max-width: 768px) {
    #live-feed-display {
        /* NEW: Position just above mobile control panel (180px height + 10px buffer) */
        bottom: 190px !important; /* Add !important */
        max-width: calc(100% - 20px); /* Adjust width for mobile */
        max-height: 120px; /* Slightly shorter on mobile */
    }
    .live-feed-item {
        font-size: 12px; /* Smaller font on mobile */
    }
}
@media screen and (max-width: 480px) {
    #live-feed-display {
       /* NEW: Adjust if control panel height changes on very small screens */
       bottom: 195px !important; /* Add !important - Give a little extra space if panel wraps */
    }
}
/* --- END Live Feed Display Styles --- */

/* Apply themed styles to specific checkboxes */
#enable-heatmap,
.popup-live-feed-toggle {
    appearance: none;
    -webkit-appearance: none;
    width: 14px; /* Match other themed checkboxes */
    height: 14px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    top: -1px; /* Align better */
    margin-right: 5px; /* Add space like other checkboxes */
}

#enable-heatmap:checked,
.popup-live-feed-toggle:checked {
    background-color: var(--hover-color);
    border-color: var(--primary-color);
}

#enable-heatmap:checked::after,
.popup-live-feed-toggle:checked::after {
    content: '✓';
    position: absolute;
    color: var(--primary-color);
    font-size: 10px; /* Match other themed checkboxes */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#enable-heatmap:hover,
.popup-live-feed-toggle:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
}

/* ... existing code ... */

/* --- END Live Feed Display Styles --- */

.scrolled-to-highlight {
  background-color: var(--hover-color) !important; /* Or another distinct highlight color */
  border: 1px dashed var(--primary-color) !important; /* Add a dashed border for more emphasis */
  box-shadow: 0 0 10px var(--primary-color);
  transition: background-color 0.3s ease-in-out, border 0.3s ease-in-out;
}

.subtle-loader {
  font-style: italic;
  color: #aaa !important; /* Lighter color */
}

/* ... existing code ... */
.leaflet-control-custom .location-button:hover {
    background-color: var(--hover-color);
}

/* NEW: Explicitly set color on the button itself to avoid interference */
.leaflet-control-custom .location-button {
    color: initial !important; /* Try to reset any inherited link color */
}

.leaflet-control-custom .location-button:active,
.leaflet-control-custom .location-button:focus {
    color: transparent !important; /* Prevent link active/focus color from affecting SVG */
    text-decoration: none !important; /* Ensure no underline */
    outline: none !important; /* Remove focus outline that might interfere */
    box-shadow: none !important; /* Remove any box shadow */
}

/* More specific rule for :active on the button */
.leaflet-control-custom a.location-button:active {
    background-color: var(--hover-color) !important; /* Match hover background, prevent flash */
}

/* STYLES FOR LOCATION BUTTON ICON STATES (Grey default, Green active) */
.leaflet-control-custom .location-button svg path {
    fill: #757575 !important; /* Default: Grey icon */
    transition: fill 0.2s ease-in-out;
}

.leaflet-control-custom .location-button:hover svg path {
    fill: var(--primary-color) !important; /* Hover on non-active: Green (theme color) */
}

/* When location service is active AND button has .active class */
.leaflet-control-custom .location-button.active svg path {
    fill: #00C853 !important; /* Active: A distinct, clear green */
}

/* Optional: if you want hover on an active button to be different */
.leaflet-control-custom .location-button.active:hover svg path {
    fill: #00E676 !important; /* Active + Hover: Brighter green */
}
/* === Location Button End === */

/* Base (Desktop) positioning for the location button container */
#location-control-container.leaflet-control-custom.leaflet-bar.leaflet-control {
    top: 190px; /* ADJUSTED: Increased top margin further for desktop */
    right: 10px; 
    z-index: 1000; 
}


/* Mobile specific positioning for the location button */
@media screen and (max-width: 768px) {
    #location-control-container.leaflet-control-custom.leaflet-bar.leaflet-control { 
        top: 55px !important;    /* Position higher on mobile */
        right: 10px !important;  /* Keep it to the right */
        /* bottom: auto !important; left: auto !important; are implicitly handled or not needed */
        z-index: 1001 !important; 
    }
}

/* Mobile responsiveness for Call Purge modal */
@media screen and (max-width: 768px) {
    .call-purge-modal-content {
        max-width: 95vw;
        max-height: 90vh;
    }
    
    .time-range-options {
        justify-content: center;
    }
    
    .time-preset-btn {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .time-input-row {
        flex-direction: column;
        gap: 10px;
    }
}

/* Call Purge Modal Content Styles */
.call-purge-modal-content {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.time-input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: var(--text-color);
}

.time-input-group input {
    width: 100%;
    padding: 6px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: 'Share Tech Mono', monospace;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Additional Call Purge Modal Styles */
.purge-description {
    color: var(--text-color);
    margin-bottom: 20px;
    padding: 10px;
    background-color: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.purge-talkgroup-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
    background-color: var(--background-color);
}

.purge-talkgroup-item {
    display: flex;
    align-items: center;
    padding: 8px 5px;
    margin-bottom: 3px;
    border-radius: 3px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.purge-talkgroup-item:hover {
    background-color: rgba(0, 51, 0, 0.2);
}

.purge-talkgroup-item input[type="checkbox"] {
    margin-right: 10px;
    accent-color: var(--primary-color);
    flex-shrink: 0;
    width: 15px;
    height: 15px;
}

.purge-talkgroup-item label {
    font-size: 14px;
    color: var(--text-color);
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.time-range-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.time-preset-btn {
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    transition: all 0.3s;
}

.time-preset-btn:hover {
    background-color: var(--hover-color);
    border-color: var(--primary-color);
}

.time-preset-btn.active {
    background-color: var(--primary-color);
    color: var(--background-color);
    border-color: var(--primary-color);
}

.custom-time-section {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: rgba(0, 255, 0, 0.05);
}

.custom-time-inputs {
    margin-top: 15px;
}

.time-input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.time-input-group {
    flex: 1;
}

.time-input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: var(--text-color);
    font-weight: 500;
}

.time-input-group input[type="date"],
.time-input-group input[type="time"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    transition: border-color 0.3s;
}

.time-input-group input[type="date"]:focus,
.time-input-group input[type="time"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 255, 0, 0.2);
}

.time-input-group input[type="date"]:hover,
.time-input-group input[type="time"]:hover {
    border-color: var(--hover-color);
}

/* Custom time toggle styling */
.custom-time-section label[for="purge-custom-time-toggle"] {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
}

.custom-time-section input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Responsive design for custom time inputs */
@media (max-width: 768px) {
    .time-input-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .time-input-group {
        flex: none;
    }
}

