/**
 * BAOLU Map Styles
 * CSS for map page and Leaflet map styling
 * 
 * Version: 1.6.2 (SOS Rescue Status Styles)
 * 
 * CHANGELOG:
 * - v1.1.0: Basic + Vietnam Islands Labels
 * - v1.2.0: Added styles for period filter, province filter,
 *           location search, keyword search, reset button
 * - v1.3.0: Day 6 - Enhanced popup design, swipe carousel,
 *           pure CSS lightbox, social share buttons, mobile responsive
 * - v1.5.0: Day 8 - Emergency contact box, community updates
 * - v1.6.0: v3 Compact popup - Smaller width (270px), single line water level,
 *           compact emergency box (no header/note), smaller buttons
 * - v1.6.2: SOS Rescue Status - Added styles for rescue status buttons
 *           (pending, in_progress, completed) and read-only display for users
 * 
 * @package BAOLU
 */

/* ============================================
   MAP CONTAINER
   ============================================ */

#baolu-map {
    width: 100%;
    height: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.map-container-section {
    padding: 2rem 0;
    background-color: #f8f9fa;
}

.map-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ============================================
   MAP HEADER
   ============================================ */

.map-header {
    background: linear-gradient(135deg, #0066CC 0%, #004C99 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.map-title {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    font-weight: 700;
}

.map-description {
    margin: 0;
    font-size: 1.125rem;
    opacity: 0.9;
}

/* ============================================
   MAP FILTERS (Updated Day 5)
   ============================================ */

.map-filters-section {
    background-color: white;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
    position: sticky;
    top: 0; /* Changed from 60px */
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.map-filters {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Filter Rows (Day 5 NEW) */
.filters-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.filters-row-severity {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.filters-row-advanced {
    padding: 0.5rem 0;
}

.filters-row-location {
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}

/* Severity Filter Buttons */
.severity-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #dee2e6;
    background-color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: #0066CC;
    background-color: #f0f7ff;
}

.filter-btn.active {
    background-color: #0066CC;
    border-color: #0066CC;
    color: white;
}

.filter-btn[data-severity="ngap-nang"].active {
    background-color: #FF0000;
    border-color: #FF0000;
}

.filter-btn[data-severity="ngap-vua"].active {
    background-color: #FFD700;
    border-color: #FFD700;
    color: #000;
}

.filter-btn[data-severity="can-cuu"].active {
    background-color: #FF6600;
    border-color: #FF6600;
}

.filter-btn[data-severity="thoat-nuoc"].active {
    background-color: #00CC00;
    border-color: #00CC00;
}

/* ============================================
   FILTER GROUPS (Day 5 NEW)
   ============================================ */

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
}

/* Select Dropdowns (Day 5 NEW) */
.filter-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.875rem;
    background-color: white;
    cursor: pointer;
    min-width: 150px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: all 0.2s ease;
}

.filter-select:hover {
    border-color: #0066CC;
}

.filter-select:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Search Input Groups (Day 5 NEW) */
.filter-group-search,
.filter-group-location {
    flex: 1;
    min-width: 200px;
}

.search-input-wrapper,
.location-search-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    flex: 1;
}

.filter-input {
    flex: 1;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.filter-input:hover {
    border-color: #adb5bd;
}

.filter-input:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.filter-input::placeholder {
    color: #adb5bd;
}

/* Search Buttons (Day 5 NEW) */
.search-btn {
    padding: 0.5rem 0.75rem;
    border: 2px solid #0066CC;
    background-color: #0066CC;
    color: white;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
    white-space: nowrap;
}

.search-btn:hover {
    background-color: #004C99;
    border-color: #004C99;
}

.clear-btn {
    position: absolute;
    right: 60px; /* Adjust based on search button width */
    top: 50%;
    transform: translateY(-50%);
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.clear-btn:hover {
    color: #dc3545;
}

/* Location Search Results Dropdown (Day 5 NEW) */
.location-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.filter-group-location {
    position: relative;
}

.location-result-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.location-result-item:last-child {
    border-bottom: none;
}

.location-result-item:hover {
    background-color: #f0f7ff;
}

.result-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.result-name {
    font-size: 0.875rem;
    color: #333;
    line-height: 1.4;
}

.no-results {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Map Controls */
.map-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-left: auto;
}

.auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.875rem;
}

.auto-refresh-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    white-space: nowrap;
}

.btn-primary {
    background-color: #0066CC;
    border-color: #0066CC;
    color: white;
}

.btn-primary:hover {
    background-color: #004C99;
    border-color: #004C99;
    text-decoration: none;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
}

/* Outline Button (Day 5 NEW) */
.btn-outline {
    background-color: transparent;
    border-color: #dee2e6;
    color: #495057;
}

.btn-outline:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

/* ============================================
   MAP LEGEND
   ============================================ */

.map-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 180px;
}

.map-legend h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.map-legend ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.map-legend li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.legend-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

.legend-marker.severe {
    background-color: #FF0000;
}

.legend-marker.moderate {
    background-color: #FFD700;
}

.legend-marker.emergency {
    background-color: #FF6600;
}

.legend-marker.resolved {
    background-color: #00CC00;
}

/* ============================================
   MAP STATS
   ============================================ */

.map-stats {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-item strong {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0066CC;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-item span {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   LEAFLET POPUP CUSTOMIZATION
   Day 6 - Enhanced Popup Design
   ============================================ */

.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-content {
    margin: 0;
    width: 230px !important;
    max-width: 90vw;
}

.leaflet-popup-close-button {
    color: #666 !important;
    font-size: 24px !important;
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    right: 8px !important;
    top: 8px !important;
    z-index: 10;
}

.leaflet-popup-close-button:hover {
    color: #333 !important;
}

/* Day 6 - Enhanced Popup Content */
.baolu-popup-content {
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Popup Header - Day 6 UPDATED */
.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 40px 6px 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    margin: 0;
}

.severity-badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.severity-badge.ngap-nang {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

.severity-badge.ngap-vua {
    background: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
    color: #333;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.severity-badge.can-cuu,
.severity-badge.can-cuu-khan-cap {
    background: linear-gradient(135deg, #FF6600 0%, #E65C00 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
    animation: pulse-emergency 2s ease-in-out infinite;
}

.severity-badge.thoat-nuoc,
.severity-badge.da-thoat-nuoc {
    background: linear-gradient(135deg, #00CC00 0%, #00AA00 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 204, 0, 0.3);
}

@keyframes pulse-emergency {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.report-time {
    font-size: 0.6rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 3px;
}

.report-time::before {
    content: '🕐';
    font-size: 0.7rem;
}

/* Popup Title - Day 6 UPDATED */
.popup-title {
    margin: 0;
    padding: 6px 10px 5px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.4;
}

/* Popup Badges - Day 6 UPDATED */
.popup-badges {
    padding: 0 10px 5px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.verified-badge,
.resolved-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.verified-badge {
    background-color: #d4edda;
    color: #155724;
}

.verified-badge::before {
    content: '✓';
}

.resolved-badge {
    background-color: #cce5ff;
    color: #004085;
}

.resolved-badge::before {
    content: '✓';
}

/* ============================================
   Day 6 NEW - IMAGE CAROUSEL (Swipe Enabled)
   ============================================ */

.popup-carousel {
    position: relative;
    width: 100%;
    height: 94px;
    overflow: hidden;
    background: #f0f0f0;
    touch-action: pan-y pinch-zoom;
}

.popup-carousel-inner {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.popup-carousel-inner.dragging {
    transition: none;
}

.popup-carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    flex-shrink: 0;
}

.popup-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #e9ecef;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.popup-carousel-slide img:hover {
    transform: scale(1.02);
}

/* Carousel Navigation Arrows */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #333;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    z-index: 5;
}

.carousel-nav:hover {
    background: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.carousel-nav.prev {
    left: 6px;
}

.carousel-nav.next {
    right: 6px;
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Carousel Dots Indicator */
.carousel-dots {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 5;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Image Counter Badge */
.carousel-counter {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.64rem;
    font-weight: 600;
    z-index: 5;
}

/* Click to View Overlay */
.carousel-view-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 5;
}

.popup-carousel:hover .carousel-view-hint {
    opacity: 1;
}

/* No Image Placeholder */
.popup-no-image {
    height: 94px;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.popup-no-image .no-image-icon {
    font-size: 1.7rem;
    margin-bottom: 3px;
    opacity: 0.5;
}

.popup-no-image .no-image-text {
    font-size: 0.64rem;
}

/* ============================================
   Day 6 NEW - POPUP DETAILS SECTION
   v3 UPDATE - Compact single line layout
   ============================================ */

.popup-details {
    padding: 3px 10px;
    background: white;
}

/* Original 2-line style (kept for compatibility) */
.popup-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.popup-detail-row:last-child {
    border-bottom: none;
}

.popup-detail-icon {
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.popup-detail-content {
    flex: 1;
    min-width: 0;
}

.popup-detail-label {
    font-size: 0.65rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1px;
}

.popup-detail-value {
    font-size: 0.8rem;
    color: #212529;
    font-weight: 500;
    word-break: break-word;
}

/* v3 NEW - Single line inline style */
.popup-detail-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    border-bottom: 1px solid #f0f0f0;
}

.popup-detail-inline:last-child {
    border-bottom: none;
}

.popup-detail-inline .detail-icon {
    font-size: 0.76rem;
    flex-shrink: 0;
}

.popup-detail-inline .detail-text {
    font-size: 0.72rem;
    color: #212529;
}

.popup-detail-inline .detail-label {
    color: #6c757d;
}

.popup-detail-inline .detail-value {
    font-weight: 600;
    margin-left: 3px;
}

/* Water level color classes */
.water-level-high {
    color: #dc3545 !important;
}

.water-level-medium {
    color: #ffc107 !important;
}

.water-level-low {
    color: #28a745 !important;
}

/* Description with truncation */
.popup-description {
    padding: 0 10px 6px;
}

.popup-description-text {
    font-size: 0.68rem;
    color: #495057;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popup-description-text.expanded {
    -webkit-line-clamp: unset;
}

.popup-read-more {
    background: none;
    border: none;
    color: #0066CC;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 0;
    font-weight: 500;
}

.popup-read-more:hover {
    text-decoration: underline;
}

/* ============================================
   Day 6 NEW - POPUP ACTIONS (Enhanced)
   v3 UPDATE - Compact layout
   ============================================ */

.popup-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    padding: 5px 8px 6px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.popup-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 6px;
    border-radius: 5px;
    font-size: 0.62rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Directions Button - Primary */
.popup-action-btn.btn-directions {
    background: linear-gradient(135deg, #0066CC 0%, #004C99 100%);
    color: white;
}

.popup-action-btn.btn-directions:hover {
    background: linear-gradient(135deg, #004C99 0%, #003366 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

/* Share Button */
.popup-action-btn.btn-share {
    background: white;
    color: #495057;
    border: 1px solid #dee2e6;
}

.popup-action-btn.btn-share:hover {
    background: #f0f7ff;
    border-color: #0066CC;
    color: #0066CC;
}

/* View Details Button */
.popup-action-btn.btn-details {
    background: white;
    color: #495057;
    border: 1px solid #dee2e6;
}

.popup-action-btn.btn-details:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

/* Report Issue Button */
.popup-action-btn.btn-report-issue {
    background: white;
    color: #dc3545;
    border: 1px solid #f5c6cb;
}

.popup-action-btn.btn-report-issue:hover {
    background: #fff5f5;
    border-color: #dc3545;
}

/* ============================================
   Day 6 NEW - SHARE DROPDOWN
   ============================================ */

.share-dropdown {
    position: relative;
    display: block;
    width: 100%;
}

.share-dropdown .popup-action-btn {
    width: 100%;
}

.share-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px;
    margin-bottom: 8px;
    display: none;
    z-index: 100;
    min-width: 160px;
}

.share-menu.active {
    display: block;
    animation: fadeInUp 0.2s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.share-menu::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 20px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #333;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.share-option:hover {
    background: #f0f7ff;
}

.share-option.facebook {
    color: #1877f2;
}

.share-option.zalo {
    color: #0068ff;
}

.share-option.copy-link {
    color: #495057;
}

.share-option-icon {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

/* ============================================
   Day 6 NEW - PURE CSS LIGHTBOX
   ============================================ */

.baolu-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.baolu-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    transition: transform 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.2s ease;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav.prev {
    left: -70px;
}

.lightbox-nav.next {
    right: -70px;
}

.lightbox-counter {
    color: white;
    font-size: 0.875rem;
    margin-top: 16px;
    opacity: 0.8;
}

.lightbox-caption {
    color: white;
    font-size: 1rem;
    margin-top: 8px;
    text-align: center;
    max-width: 600px;
}

/* ============================================
   MAP INSTRUCTIONS
   ============================================ */

.map-instructions {
    padding: 3rem 0;
    background-color: white;
}

.map-instructions h3 {
    text-align: center;
    margin-bottom: 2rem;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.instruction-item {
    text-align: center;
}

.instruction-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.instruction-item h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
}

.instruction-item p {
    margin: 0;
    color: #6c757d;
    font-size: 0.875rem;
}

/* ============================================
   EMERGENCY CONTACTS
   ============================================ */

.emergency-contacts-section {
    padding: 3rem 0;
    background-color: #f8f9fa;
}

.emergency-contacts-section h3 {
    text-align: center;
    margin-bottom: 2rem;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.contact-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

.contact-card strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.contact-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0066CC;
    text-decoration: none;
}

.contact-number:hover {
    color: #004C99;
}

/* ============================================
   LOADING STATE
   ============================================ */

.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.map-loading .spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
}

/* Loading Spinner Animation */
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e9ecef;
    border-top-color: #0066CC;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   LABELS CHỦ QUYỀN QUẦN ĐẢO VIỆT NAM
   Hoàng Sa & Trường Sa Islands Labels
   ============================================ */
.vietnam-island-label {
    background: transparent !important;
    border: none !important;
}
.island-label {
    background: rgba(218, 37, 29, 0.95);  /* Màu đỏ cờ Việt Nam */
    color: #FFD700;  /* Màu vàng sao */
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 9px;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    border: 1px solid #FFD700;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%);
}
.island-label span {
    display: block;
    font-size: 7px;
    font-weight: normal;
    opacity: 0.95;
    margin-top: 1px;
}
.island-label.hoang-sa,
.island-label.truong-sa {
    animation: pulse-island 2s ease-in-out infinite;
}
/* Subtle pulse animation for visibility */
@keyframes pulse-island {
    0%, 100% {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 1px 8px rgba(218, 37, 29, 0.6);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   Day 6 - Enhanced Mobile Support
   ============================================ */

@media (max-width: 992px) {
    .filters-row-advanced {
        flex-wrap: wrap;
    }
    
    .filter-group {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 180px;
    }
    
    .filter-group-search,
    .filter-group-location {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    #baolu-map {
        height: 400px;
    }
    
    .map-title {
        font-size: 1.5rem;
    }
    
    .map-filters {
        padding: 0 0.5rem;
    }
    
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        flex: 1 1 100%;
    }
    
    .filter-label {
        min-width: 80px;
    }
    
    .filter-select {
        flex: 1;
        min-width: auto;
    }
    
    .severity-filters {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .filter-btn {
        flex: 1 1 auto;
        min-width: calc(50% - 0.25rem);
        text-align: center;
    }
    
    .map-controls {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin-left: 0;
    }
    
    .map-controls .btn {
        width: 100%;
    }
    
    .auto-refresh-toggle {
        justify-content: center;
        padding: 0.5rem 0;
    }
    
    .map-legend,
    .map-stats {
        position: static;
        margin-top: 1rem;
    }
    
    .map-stats {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
    }
    
    .instructions-grid,
    .contacts-grid {
        grid-template-columns: 1fr;
    }
    
    /* Responsive cho island labels */
    .island-label {
        font-size: 10px;
        padding: 6px 10px;
    }
    
    .island-label span {
        font-size: 8px;
    }
    
    /* Location results full width on mobile */
    .location-results {
        position: fixed;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        max-height: 50vh;
        border-radius: 8px 8px 0 0;
    }
    
    /* Day 6 - Mobile Popup Adjustments */
    .leaflet-popup-content {
        width: 290px !important;
    }
    
    .popup-carousel {
        height: 160px;
    }
    
    .popup-actions {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 10px 12px;
    }
    
    .popup-action-btn {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    
    /* Lightbox mobile */
    .lightbox-nav {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-nav.prev {
        left: 10px;
    }
    
    .lightbox-nav.next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    #baolu-map {
        height: 300px;
        border-radius: 0;
    }
    
    .filter-btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
        min-width: calc(50% - 0.25rem);
    }
    
    .leaflet-popup-content {
        width: 260px !important;
    }
    
    .popup-title {
        font-size: 1rem;
        padding: 10px 14px 6px;
    }
    
    
    .popup-header {
        padding: 10px 14px;
    }
    
    .popup-details {
        padding: 10px 14px;
    }
    
    .popup-carousel {
        height: 140px;
    }
    
    .carousel-nav {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .popup-actions {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .map-stats {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Smaller island labels on mobile */
    .island-label {
        font-size: 9px;
        padding: 4px 8px;
    }
    
    .island-label span {
        font-size: 7px;
    }
    
    .search-btn {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Lightbox mobile small */
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 1.5rem;
    }
    
    .lightbox-nav {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .map-filters-section,
    .map-legend,
    .map-stats,
    .popup-actions,
    .btn,
    .map-controls {
        display: none;
    }
    
    #baolu-map {
        height: 500px;
        page-break-inside: avoid;
    }
    
    /* Show island labels in print */
    .island-label {
        animation: none;
        box-shadow: none;
        border: 2px solid #000;
    }
}

/* ============================================
   Day 6 NEW - TOAST NOTIFICATIONS
   ============================================ */

.baolu-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.875rem;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.baolu-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.baolu-toast.success {
    background: #28a745;
}

.baolu-toast.error {
    background: #dc3545;
}

.baolu-toast.info {
    background: #0066CC;
}

/* ============================================
   Day 6 FIX - MOBILE COLLAPSIBLE FILTERS
   Makes filter panel collapsible on mobile
   to maximize map viewing area
   ============================================ */

/* Mobile Filter Toggle Button */
.mobile-filter-toggle {
    display: none;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #0066CC 0%, #004C99 100%);
    color: white;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.mobile-filter-toggle:active {
    transform: scale(0.98);
}

.mobile-filter-toggle .toggle-icon {
    transition: transform 0.3s ease;
}

.mobile-filter-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

/* Mobile Filter Panel */
@media (max-width: 768px) {
    /* Show toggle button on mobile */
    .mobile-filter-toggle {
        display: flex;
    }
    
    /* Map takes more space */
    #baolu-map {
        height: calc(100vh - 180px) !important;
        min-height: 400px;
    }
    
    /* Collapsible filter container */
    .map-filters {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding: 0;
        margin: 0;
    }
    
    .map-filters.expanded {
        max-height: 1000px;
        padding: 0.5rem;
        margin-bottom: 10px;
    }
    
    /* Compact severity buttons */
    .severity-filters {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    .filter-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    /* Stack filter groups */
    .filters-row {
        gap: 8px;
    }
    
    .filter-group {
        margin-bottom: 6px;
    }
    
    /* Map controls compact */
    .map-controls {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .map-controls .btn {
        flex: 1 1 calc(50% - 3px);
        padding: 10px;
        font-size: 0.85rem;
    }
    
    /* Legend and stats at bottom */
    .map-legend {
        position: fixed;
        bottom: 70px;
        left: 10px;
        z-index: 1000;
        background: white;
        padding: 8px 12px;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        font-size: 0.75rem;
    }
    
    .map-legend-title {
        display: none;
    }
    
    .legend-items {
        display: flex;
        flex-direction: row;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .legend-item {
        font-size: 0.7rem;
        gap: 4px;
    }
    
    .legend-color {
        width: 10px;
        height: 10px;
    }
    
    /* Stats compact */
    .map-stats {
        position: fixed;
        top: 60px;
        right: 10px;
        z-index: 1000;
        background: white;
        padding: 6px 10px;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        flex-direction: row;
        gap: 15px;
    }
    
    .stat-item {
        font-size: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.1rem;
    }
    
    /* Refresh button fixed position */
    .btn-refresh-fixed {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1001;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
    }
}

/* Even smaller screens */
@media (max-width: 400px) {
    #baolu-map {
        height: calc(100vh - 150px) !important;
        min-height: 350px;
    }
    
    .severity-filters {
        grid-template-columns: 1fr 1fr;
    }
    
    .filter-btn {
        font-size: 0.7rem;
        padding: 6px 8px;
    }
    
    .mobile-filter-toggle {
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    /* Popup even more compact */
    .leaflet-popup-content {
        width: 240px !important;
    }
    
    .popup-carousel {
        height: 140px;
    }
    
    .popup-actions {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        padding: 8px;
    }
    
    .popup-action-btn {
        padding: 6px 8px;
        font-size: 0.7rem;
        gap: 4px;
    }
}

/* ============================================
   EMERGENCY CONTACT BOX
   Hiển thị SĐT cho "Cần Cứu Khẩn Cấp"
   ============================================ */

.emergency-contact-box {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #fd7e14;
    border-radius: 6px;
    padding: 6px 8px;
    margin: 5px 10px;
    animation: emergencyPulse 2s ease-in-out infinite;
}

/* v3 - Header hidden by default, kept for backwards compatibility */
.emergency-contact-header {
    display: none;
}

.emergency-icon {
    font-size: 0.95rem;
    animation: emergencyShake 0.5s ease-in-out infinite;
}

.emergency-label {
    font-weight: 700;
    color: #e65100;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
}

.emergency-contact-phone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-radius: 5px;
    padding: 5px 8px;
}

.phone-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: #333;
}

.call-now-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: linear-gradient(135deg, #fd7e14 0%, #e65100 100%);
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.64rem;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(253, 126, 20, 0.3);
}

.call-now-btn:hover {
    background: linear-gradient(135deg, #e65100 0%, #bf360c 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(253, 126, 20, 0.4);
}

.call-now-btn:active {
    transform: scale(0.98);
}

/* v3 - Note hidden by default */
.emergency-contact-note {
    display: none;
}

@keyframes emergencyPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(253, 126, 20, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(253, 126, 20, 0); }
}

@keyframes emergencyShake {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

/* Mobile responsive for emergency contact */
@media (max-width: 400px) {
    .emergency-contact-phone {
        flex-direction: row;
        gap: 8px;
        text-align: left;
    }
    
    .call-now-btn {
        flex-shrink: 0;
    }
}

/* ============================================
   COMMUNITY UPDATE MODAL
   Chat cộng đồng cập nhật tình hình
   ============================================ */

.update-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.update-modal.active {
    display: block;
}

.update-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.update-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
}

.update-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
    color: white;
}

.update-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.update-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.update-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.update-modal-report-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.report-icon {
    font-size: 1rem;
}

.report-title-text {
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
}

/* Comments Section */
.update-comments-section {
    flex: 1;
    overflow-y: auto;
    min-height: 60px;
    max-height: 550px;
    padding: 8px 16px;
    background: #e8f4fd;
}

.update-comments-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comments-loading,
.comments-empty,
.comments-error {
    text-align: center;
    color: #666;
    padding: 20px;
    font-size: 0.85rem;
}

.comments-error {
    color: #d32f2f;
}

.update-comment-item {
    background: white;
    border-radius: 10px;
    padding: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.comment-author {
    font-weight: 600;
    color: #333;
    font-size: 0.75rem;
}

.comment-time {
    font-size: 0.7rem;
    color: #888;
}

.comment-content {
    color: #444;
    font-size: 0.75rem;
    line-height: 1.4;
}

.comment-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 600;
    color: white;
    margin-top: 4px;
}

/* Form Section */
.update-form-section {
    padding: 10px 14px;
    border-top: 1px solid #e0e0e0;
    background: white;
    flex-shrink: 0;
}

.status-buttons-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.status-buttons {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.status-btn {
    flex: 1;
    min-width: 90px;
    padding: 6px 8px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.status-btn:hover {
    border-color: #bdbdbd;
}

.status-btn.selected {
    border-width: 3px;
}

.status-btn.status-ngap-nang {
    color: #c62828;
}

.status-btn.status-ngap-nang.selected {
    background: #ffebee;
    border-color: #c62828;
}

.status-btn.status-ngap-vua {
    color: #f9a825;
}

.status-btn.status-ngap-vua.selected {
    background: #fffde7;
    border-color: #f9a825;
}

.status-btn.status-da-thoat {
    color: #2e7d32;
}

.status-btn.status-da-thoat.selected {
    background: #e8f5e9;
    border-color: #2e7d32;
}

/* ============================================
   RESCUE STATUS BUTTONS (SOS Reports - Admin)
   ============================================ */

/* Pending - Chưa cứu hộ */
.status-btn.status-pending {
    color: #e65100;
}

.status-btn.status-pending:hover {
    border-color: #e65100;
    background: #fff3e0;
}

.status-btn.status-pending.selected {
    background: #fff3e0;
    border-color: #e65100;
}

/* In Progress - Cứu hộ đang đến */
.status-btn.status-in-progress {
    color: #f57c00;
}

.status-btn.status-in-progress:hover {
    border-color: #f57c00;
    background: #fff8e1;
}

.status-btn.status-in-progress.selected {
    background: #fff8e1;
    border-color: #f57c00;
}

/* Completed - Đã cứu hộ */
.status-btn.status-completed {
    color: #2e7d32;
}

.status-btn.status-completed:hover {
    border-color: #2e7d32;
    background: #e8f5e9;
}

.status-btn.status-completed.selected {
    background: #e8f5e9;
    border-color: #2e7d32;
}

/* ============================================
   RESCUE STATUS DISPLAY (Read-only for Users)
   Hiển thị trạng thái cứu hộ cho user thường
   (không có quyền chỉnh sửa)
   ============================================ */

.rescue-status-display {
    padding: 6px 8px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    font-size: 0.75rem;
}

.rescue-status-display.status-pending {
    background: #fff3e0;
    color: #e65100;
    border: 2px solid #e65100;
}

.rescue-status-display.status-in-progress {
    background: #fff8e1;
    color: #f57c00;
    border: 2px solid #f57c00;
}

.rescue-status-display.status-completed {
    background: #e8f5e9;
    color: #2e7d32;
    border: 2px solid #2e7d32;
}

/* Label cho rescue status */
.rescue-status-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.update-textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 6px;
    transition: border-color 0.3s;
}

.update-textarea:focus {
    outline: none;
    border-color: #1976d2;
}

.update-author-row {
    margin-bottom: 8px;
}

.update-author-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.8rem;
    transition: border-color 0.3s;
}

.update-author-input:focus {
    outline: none;
    border-color: #1976d2;
}

.submit-update-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-update-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1565c0 0%, #0a3d91 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.submit-update-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mobile responsive for modal */
@media (max-width: 480px) {
    .update-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .update-modal-header {
        padding: 10px 14px;
    }
    
    .update-modal-header h3 {
        font-size: 0.95rem;
    }
    
    .status-buttons {
        flex-direction: column;
    }
    
    .status-btn {
        min-width: auto;
    }
    
    .update-comments-section {
        padding: 10px 16px;
    }
    
    .update-form-section {
        padding: 14px 16px;
    }
}






/**
 * HOMEPAGE DESKTOP OPTIMIZATION
 * SOS24.VN - Desktop Layout Fixes
 * 
 * Version: 2.0.0
 * Updated: 28/11/2025
 * 
 * THÊM VÀO CUỐI FILE baolu-map.css
 * 
 * CHANGES:
 * - Remove Hero section styles (not needed)
 * - Sticky filters with proper top position
 * - Map container with border/frame
 * - Compact filter layout
 * - Fix scrolling issues
 */

/* ============================================
   DESKTOP OPTIMIZATION - MAP PAGE
   ============================================ */

/* === HIDE HERO SECTION (if still in HTML) === */
.map-header {
    display: none !important;
}

/* === STICKY FILTERS - Position after Header === */
.map-filters-section {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px 0;
    position: sticky;
    top: 60px; /* After header minimal height */
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Admin bar adjustment */
.admin-bar .map-filters-section {
    top: 92px; /* 60px header + 32px admin bar */
}

@media (max-width: 782px) {
    .admin-bar .map-filters-section {
        top: 106px; /* 60px header + 46px mobile admin bar */
    }
}

/* === COMPACT FILTERS LAYOUT === */
.map-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ROW 1: Controls (Time, Province, Search, Location) */
.filters-row-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

/* ROW 2: Severity Buttons */
.filters-row-severity {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 4px;
    border-top: none;
    border-bottom: none;
}

/* Filter Groups - Compact */
.filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

.filter-select {
    padding: 6px 28px 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    min-width: 140px;
    background-color: #fff;
}

.filter-select:focus {
    border-color: #0066CC;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

/* Search Group - Flexible */
.filter-group-search {
    flex: 1;
    min-width: 180px;
    max-width: 300px;
}

.filter-group-search .filter-input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    width: 100%;
}

.filter-group-search .search-btn {
    padding: 6px 10px;
    margin-left: 4px;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* Location Button */
.btn-location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #FF6600 0%, #e55c00 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-location:hover {
    background: linear-gradient(135deg, #ff7519 0%, #FF6600 100%);
    transform: translateY(-1px);
}

/* Auto Refresh Toggle - Compact */
.filter-group-refresh {
    margin-left: auto;
}

.auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
}

.auto-refresh-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

/* Severity Filter Buttons - Compact */
.severity-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 14px;
    border: 2px solid #e0e0e0;
    background-color: #fff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: #0066CC;
    background-color: #f0f7ff;
}

.filter-btn.active {
    background-color: #0066CC;
    border-color: #0066CC;
    color: #fff;
}

/* Severity-specific active colors */
.filter-btn[data-severity="can-cuu"].active {
    background-color: #FF6600;
    border-color: #FF6600;
}

.filter-btn[data-severity="ngap-nang"].active {
    background-color: #FF0000;
    border-color: #FF0000;
}

.filter-btn[data-severity="ngap-vua"].active {
    background-color: #FFD700;
    border-color: #FFD700;
    color: #333;
}

.filter-btn[data-severity="thoat-nuoc"].active {
    background-color: #00CC00;
    border-color: #00CC00;
}

/* Reset Button */
#reset-filters {
    padding: 6px 12px;
    font-size: 0.8rem;
    margin-left: auto;
}

/* === MAP CONTAINER - WITH BORDER/FRAME === */
.map-container-section {
    padding: 20px 16px;
    background-color: #f5f7fa;
}

.map-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* Map Wrapper - The Frame */
.map-wrapper {
    position: relative;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Map - Inside the frame */
#baolu-map {
    width: 100%;
    height: calc(100vh - 280px); /* Viewport height minus header, filters, padding */
    min-height: 500px;
    max-height: 700px;
    border-radius: 0;
    box-shadow: none;
}

/* Legend - Inside map wrapper */
.map-legend {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 500;
    min-width: 160px;
}

.map-legend h4 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
}

.map-legend li {
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.legend-marker {
    width: 16px;
    height: 16px;
}

/* Stats - Inside map wrapper */
.map-stats {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 500;
    display: flex;
    gap: 20px;
}

.stat-item strong {
    font-size: 1.25rem;
}

.stat-item span {
    font-size: 0.7rem;
}

/* === INSTRUCTIONS SECTION - Compact === */
.map-instructions {
    padding: 40px 0;
    background-color: #fff;
}

.map-instructions h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
    color: #333;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.instruction-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.instruction-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.instruction-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

.instruction-item h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: #333;
}

.instruction-item p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
}

/* CTA Instruction Item */
.instruction-item-cta {
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8dc 100%);
    border: 2px solid #FF6600;
}

.instruction-item-cta .instruction-icon {
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.btn-submit-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #FF6600 0%, #e55c00 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-submit-cta:hover {
    background: linear-gradient(135deg, #ff7519 0%, #FF6600 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
    color: #fff;
    text-decoration: none;
}

/* === RESPONSIVE - TABLET === */
@media (max-width: 1024px) {
    .instructions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #baolu-map {
        height: calc(100vh - 320px);
        min-height: 450px;
    }
}

/* === RESPONSIVE - MOBILE === */
@media (max-width: 768px) {
    .map-filters-section {
        top: 56px; /* Smaller header on mobile */
        padding: 10px 0;
    }
    
    .admin-bar .map-filters-section {
        top: 102px;
    }
    
    .map-filters {
        padding: 0 12px;
    }
    
    .filters-row-controls {
        gap: 8px;
    }
    
    .filter-group {
        flex: 1 1 calc(50% - 4px);
        min-width: 140px;
    }
    
    .filter-group-search {
        flex: 1 1 100%;
        max-width: none;
    }
    
    .filter-group-locate {
        flex: 1 1 100%;
    }
    
    .btn-location {
        width: 100%;
        justify-content: center;
    }
    
    .filter-group-refresh {
        flex: 1 1 100%;
        margin-left: 0;
        justify-content: center;
    }
    
    .filters-row-severity {
        flex-direction: column;
        align-items: stretch;
    }
    
    .severity-filters {
        justify-content: center;
    }
    
    #reset-filters {
        margin-left: 0;
        width: 100%;
    }
    
    /* Map on mobile */
    .map-container-section {
        padding: 12px 8px;
    }
    
    .map-wrapper {
        border-radius: 8px;
    }
    
    #baolu-map {
        height: calc(100vh - 380px);
        min-height: 350px;
        max-height: 500px;
    }
    
    .map-legend {
        bottom: 10px;
        left: 10px;
        padding: 10px 12px;
        min-width: 140px;
    }
    
    .map-legend h4 {
        font-size: 0.8rem;
    }
    
    .map-legend li {
        font-size: 0.75rem;
    }
    
    .map-stats {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        gap: 12px;
    }
    
    .stat-item strong {
        font-size: 1rem;
    }
    
    /* Instructions on mobile */
    .instructions-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .map-instructions h3 {
        font-size: 1.25rem;
    }
}

/* === RESPONSIVE - SMALL MOBILE === */
@media (max-width: 480px) {
    .filter-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .filter-select {
        min-width: 120px;
        font-size: 0.8rem;
    }
    
    #baolu-map {
        height: calc(100vh - 400px);
        min-height: 300px;
    }
}

/* ============================================
   END HOMEPAGE DESKTOP OPTIMIZATION
   ============================================ */
   
   
   
   
   
   
   /* ==========================================================================
   HOMEPAGE DESKTOP OPTIMIZATION - COMPACT LAYOUT
   Version: 2.1.0
   Date: November 28, 2025
   
   MỤC TIÊU:
   - Giảm chiều cao filter từ ~180px xuống ~80px
   - Sticky filter ngay dưới header
   - Location search thay thế keyword search
   - Bản đồ chiếm nhiều không gian hơn
   ========================================================================== */

/* ==========================================================================
   1. HIDE HERO SECTION (nếu còn)
   ========================================================================== */
.map-header,
.map-hero,
.hero-section {
    display: none !important;
}

/* ==========================================================================
   2. COMPACT FILTER SECTION
   ========================================================================== */

/* Filter Section Container */
.map-filters-section {
    position: sticky;
    top: 56px; /* Header height */
    z-index: 100;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 6px 15px;
    margin: 0;
}

/* Admin bar adjustment */
.admin-bar .map-filters-section {
    top: 88px; /* 56px header + 32px admin bar */
}

@media screen and (max-width: 782px) {
    .admin-bar .map-filters-section {
        top: 102px; /* 56px header + 46px mobile admin bar */
    }
}

/* Filter Container */
.map-filters-section .map-filters {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ==========================================================================
   3. FILTER ROW 1 - Controls (Compact)
   ========================================================================== */

.filters-row-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
}

/* Filter Groups */
.filters-row-controls .filter-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Labels - Hide text, show emoji only */
.filters-row-controls .filter-label {
    font-size: 0.85rem;
    margin: 0;
    padding: 0;
}

/* Select dropdowns - Compact */
.filters-row-controls .filter-select {
    padding: 4px 24px 4px 8px;
    font-size: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    min-width: 100px;
    height: 28px;
    cursor: pointer;
}

.filters-row-controls .filter-select:focus {
    border-color: #FF6600;
    outline: none;
}

/* Location Search Group - Takes more space */
.filters-row-controls .filter-group-location {
    flex: 1;
    min-width: 200px;
    max-width: 350px;
    position: relative;
}

.filters-row-controls .location-search-wrapper {
    display: flex;
    gap: 4px;
    flex: 1;
}

.filters-row-controls .location-input {
    flex: 1;
    padding: 4px 10px;
    font-size: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 28px;
}

.filters-row-controls .location-input:focus {
    border-color: #FF6600;
    outline: none;
}

.filters-row-controls .search-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    height: 28px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.filters-row-controls .search-btn:hover {
    background: #1976D2;
}

/* Location Results Dropdown */
.location-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.location-results .location-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    border-bottom: 1px solid #eee;
}

.location-results .location-item:hover {
    background: #f5f5f5;
}

.location-results .location-item:last-child {
    border-bottom: none;
}

/* My Location Button - Compact */
.filters-row-controls .btn-location {
    padding: 4px 10px;
    font-size: 0.75rem;
    background: #FF6600;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    height: 28px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.filters-row-controls .btn-location:hover {
    background: #E55B00;
}

/* Auto Refresh Toggle - Compact */
.filters-row-controls .auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
}

.filters-row-controls .auto-refresh-toggle input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

/* ==========================================================================
   4. FILTER ROW 2 - Severity Buttons (Compact)
   ========================================================================== */

.filters-row-severity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 4px;
}

.filters-row-severity .severity-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Severity Buttons - Compact Pill Style */
.filters-row-severity .filter-btn {
    padding: 4px 12px;
    font-size: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    height: 26px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.filters-row-severity .filter-btn:hover {
    border-color: #999;
    background: #f5f5f5;
}

.filters-row-severity .filter-btn.active {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
}

/* Severity Colors */
.filters-row-severity .filter-btn[data-severity="can-cuu"] {
    color: #FF6600;
    border-color: #FF6600;
}

.filters-row-severity .filter-btn[data-severity="can-cuu"].active,
.filters-row-severity .filter-btn[data-severity="can-cuu"]:hover {
    background: #FF6600;
    color: white;
}

.filters-row-severity .filter-btn[data-severity="ngap-nang"] {
    color: #FF0000;
    border-color: #FF0000;
}

.filters-row-severity .filter-btn[data-severity="ngap-nang"].active,
.filters-row-severity .filter-btn[data-severity="ngap-nang"]:hover {
    background: #FF0000;
    color: white;
}

.filters-row-severity .filter-btn[data-severity="ngap-vua"] {
    color: #E6A700;
    border-color: #FFD700;
}

.filters-row-severity .filter-btn[data-severity="ngap-vua"].active,
.filters-row-severity .filter-btn[data-severity="ngap-vua"]:hover {
    background: #FFD700;
    color: #333;
}

.filters-row-severity .filter-btn[data-severity="thoat-nuoc"] {
    color: #00AA00;
    border-color: #00CC00;
}

.filters-row-severity .filter-btn[data-severity="thoat-nuoc"].active,
.filters-row-severity .filter-btn[data-severity="thoat-nuoc"]:hover {
    background: #00CC00;
    color: white;
}

/* Reset Button - Compact */
.filters-row-severity .btn-reset {
    padding: 4px 10px;
    font-size: 0.75rem;
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    height: 26px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.filters-row-severity .btn-reset:hover {
    background: #eee;
    color: #333;
}

/* ==========================================================================
   5. MAP CONTAINER - Maximized Height
   ========================================================================== */

.map-container-section {
    padding: 10px 15px;
    background: #f5f5f5;
}

.map-container {
    max-width: 1400px;
    margin: 0 auto;
}

.map-wrapper {
    position: relative;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Map Height - Maximize viewport usage */
#baolu-map {
    height: calc(100vh - 200px) !important; /* Viewport - header - filters - padding */
    min-height: 450px;
    max-height: 800px;
    width: 100%;
}

/* ==========================================================================
   6. MAP LEGEND & STATS - Overlay Style
   ========================================================================== */

.map-legend {
    position: absolute;
    bottom: 20px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 500;
    backdrop-filter: blur(4px);
}

.map-legend h4 {
    margin: 0 0 6px 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #333;
}

.map-legend ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.map-legend li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: #555;
}

.map-legend .legend-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.map-legend .legend-marker.emergency { background: #FF6600; }
.map-legend .legend-marker.severe { background: #FF0000; }
.map-legend .legend-marker.moderate { background: #FFD700; }
.map-legend .legend-marker.resolved { background: #00CC00; }

/* Map Stats */
.map-stats {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 500;
    display: flex;
    gap: 15px;
    backdrop-filter: blur(4px);
}

.map-stats .stat-item {
    text-align: center;
}

.map-stats .stat-item strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2196F3;
}

.map-stats .stat-item span {
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
}

/* ==========================================================================
   7. INSTRUCTIONS SECTION - Compact
   ========================================================================== */

.map-instructions {
    padding: 20px 15px;
    background: #fff;
}

.map-instructions .container {
    max-width: 1400px;
    margin: 0 auto;
}

.map-instructions h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #333;
}

.map-instructions .instructions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.map-instructions .instruction-item {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.map-instructions .instruction-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 6px;
}

.map-instructions .instruction-item h4 {
    font-size: 0.85rem;
    margin: 0 0 4px 0;
    color: #333;
}

.map-instructions .instruction-item p {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
    line-height: 1.3;
}

/* CTA Item */
.map-instructions .instruction-item-cta {
    background: linear-gradient(135deg, #fff5f0, #fff);
    border: 1px solid #FF6600;
}

.map-instructions .btn-submit-cta {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 16px;
    background: linear-gradient(135deg, #FF6600, #FF8800);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.map-instructions .btn-submit-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.4);
}

/* thean Instruction Items - Color Variants (November 29, 2025) */
.instruction-item-submit {
    border-color: #FF6B35;
}
.instruction-item-submit .instruction-icon {
    background: linear-gradient(135deg, #FF6B35, #F7931E);
}

.instruction-item-hotline {
    border-color: #E53935;
}
.instruction-item-hotline .instruction-icon {
    background: linear-gradient(135deg, #E53935, #C62828);
}

.instruction-item-map {
    border-color: #2196F3;
}
.instruction-item-map .instruction-icon {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.instruction-item-search {
    border-color: #757575;
}
.instruction-item-search .instruction-icon {
    background: linear-gradient(135deg, #757575, #616161);
}

/* Button Hotline CTA */
.btn-hotline-cta {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 16px;
    background: linear-gradient(135deg, #E53935, #C62828);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-hotline-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.4);
}

/* ==========================================================================
   8. RESPONSIVE - TABLET
   ========================================================================== */

@media (max-width: 1024px) {
    .filters-row-controls {
        gap: 6px;
    }
    
    .filters-row-controls .filter-group-location {
        min-width: 150px;
        max-width: 250px;
    }
    
    .filters-row-severity .filter-btn {
        padding: 3px 10px;
        font-size: 0.7rem;
    }
    
    #baolu-map {
        height: calc(100vh - 220px) !important;
        min-height: 400px;
    }
    
    .map-instructions .instructions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   9. RESPONSIVE - MOBILE
   ========================================================================== */

@media (max-width: 768px) {
    .map-filters-section {
        top: 52px;
        padding: 5px 10px;
    }
    
    .admin-bar .map-filters-section {
        top: 98px;
    }
    
    .filters-row-controls {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .filters-row-controls .filter-group {
        flex: 0 0 auto;
    }
    
    .filters-row-controls .filter-group-location {
        flex: 1 1 100%;
        max-width: none;
        order: 10;
    }
    
    .filters-row-controls .filter-select {
        min-width: 80px;
        font-size: 0.75rem;
        padding: 3px 20px 3px 6px;
        height: 26px;
    }
    
    .filters-row-controls .btn-location {
        padding: 3px 8px;
        font-size: 0.7rem;
        height: 26px;
    }
    
    .filters-row-controls .auto-refresh-toggle span {
        display: none;
    }
    
    .filters-row-severity {
        flex-wrap: wrap;
    }
    
    .filters-row-severity .severity-filters {
        gap: 4px;
        justify-content: center;
        width: 100%;
    }
    
    .filters-row-severity .filter-btn {
        padding: 3px 8px;
        font-size: 0.65rem;
        height: 24px;
    }
    
    .filters-row-severity .btn-reset {
        margin-top: 4px;
        width: 100%;
        justify-content: center;
    }
    
    #baolu-map {
        height: calc(100vh - 280px) !important;
        min-height: 350px;
    }
    
    .map-legend {
        bottom: 10px;
        left: 10px;
        padding: 6px 8px;
    }
    
    .map-legend h4 {
        font-size: 0.65rem;
    }
    
    .map-legend li {
        font-size: 0.6rem;
    }
    
    .map-stats {
        top: 10px;
        right: 10px;
        padding: 4px 6px; /* Giảm từ 6px 10px */
        gap: 6px; /* Giảm từ 10px */
    }
    
    .map-stats .stat-item strong {
        font-size: 0.75rem; /* Giảm từ 0.95rem */
    }
    
    .map-stats .stat-item span {
        font-size: 0.45rem; /* Giảm từ 0.55rem */
    }
    
    .map-instructions .instructions-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .map-instructions .instruction-item {
        padding: 10px;
    }
}

/* ==========================================================================
   10. RESPONSIVE - SMALL MOBILE
   ========================================================================== */

@media (max-width: 480px) {
    .map-filters-section {
        padding: 4px 8px;
    }
    
    .filters-row-controls .filter-label {
        font-size: 0.75rem;
    }
    
    .filters-row-severity .filter-btn {
        padding: 2px 6px;
        font-size: 0.6rem;
        border-radius: 12px;
    }
    
    #baolu-map {
        height: calc(100vh - 300px) !important;
        min-height: 300px;
    }
    
    /* Thu nhỏ ô thống kê báo cáo/cập nhật trên mobile nhỏ */
    .map-stats {
        top: 8px;
        right: 8px;
        padding: 3px 5px;
        gap: 5px;
    }
    
    .map-stats .stat-item strong {
        font-size: 0.7rem;
    }
    
    .map-stats .stat-item span {
        font-size: 0.4rem;
    }
}

/* ==========================================================================
   END OF HOMEPAGE COMPACT CSS
   ========================================================================== */
   
   
   
   
   /* ==========================================================================
   HOMEPAGE FIX - STICKY & MAP ASPECT RATIO
   Version: 2.2.0
   Date: November 28, 2025
   
   FIX:
   1. Row 2 bị che khi scroll → Sticky cả section
   2. Bản đồ rộng nhưng ngắn → Giảm width, tăng height
   ========================================================================== */

/* ==========================================================================
   1. FIX STICKY - Toàn bộ Filter Section sticky cùng nhau
   ========================================================================== */

/* Reset any conflicting sticky */
.map-filters-section .filters-row,
.map-filters-section .filters-row-controls,
.map-filters-section .filters-row-severity,
.baolu-filters,
.map-filters {
    position: static !important;
    top: auto !important;
}

/* CHỈ section cha sticky */
.map-filters-section {
    position: sticky !important;
    top: 56px !important; /* Header height */
    z-index: 100 !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    padding: 8px 15px !important;
    margin: 0 !important;
}

/* Admin bar adjustment */
.admin-bar .map-filters-section {
    top: 88px !important; /* 56px header + 32px admin bar */
}

@media screen and (max-width: 782px) {
    .admin-bar .map-filters-section {
        top: 98px !important; /* 56px header + 46px mobile admin bar */
    }
}

/* ==========================================================================
   2. FIX MAP ASPECT RATIO - Giảm width, tăng height
   ========================================================================== */

/* Map Container - Giới hạn width để cân đối hơn */
.map-container-section {
    padding: 10px 15px !important;
    background: #f5f5f5 !important;
}

.map-container {
    max-width: 1200px !important; /* Giảm từ 1400px */
    margin: 0 auto !important;
}

.map-wrapper {
    position: relative !important;
    background: #fff !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Map Height - TĂNG chiều cao */
#baolu-map {
    height: calc(100vh - 180px) !important; /* Tăng height */
    min-height: 500px !important; /* Tăng min */
    max-height: 900px !important; /* Tăng max */
    width: 100% !important;
}

/* ==========================================================================
   3. FILTER ROWS - Compact styling
   ========================================================================== */

.map-filters-section .map-filters {
    max-width: 1200px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

/* Row 1 */
.filters-row-controls {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    padding-bottom: 6px !important;
    border-bottom: 1px solid #eee !important;
}

/* Row 2 */
.filters-row-severity {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding-top: 4px !important;
}

/* ==========================================================================
   4. RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 1024px) {
    .map-container {
        max-width: 100% !important;
    }
    
    #baolu-map {
        height: calc(100vh - 200px) !important;
        min-height: 450px !important;
    }
}

@media (max-width: 768px) {
    .map-filters-section {
        top: 52px !important;
        padding: 6px 10px !important;
    }
    
    .admin-bar .map-filters-section {
        top: 98px !important;
    }
    
    #baolu-map {
        height: calc(100vh - 240px) !important;
        min-height: 400px !important;
    }
}

@media (max-width: 480px) {
    #baolu-map {
        height: calc(100vh - 280px) !important;
        min-height: 350px !important;
    }
}

/* ==========================================================================
   5. HIDE OLD ELEMENTS (nếu còn)
   ========================================================================== */

/* Hide Hero section */
.map-header,
.map-hero,
.hero-section {
    display: none !important;
}

/* Hide old keyword search (nếu còn) */
.filter-group-search:not(.filter-group-location),
.keyword-search-wrapper {
    display: none !important;
}

/* ==========================================================================
   END OF FIX CSS
   ========================================================================== */
   
   
   
   /* ==========================================================================
   ULTRA COMPACT FILTERS - v2.6.0
   Date: November 28, 2025
   
   MỤC TIÊU: Thu nhỏ filter tối đa để bản đồ hiển thị đầy đủ trong viewport
   ========================================================================== */

/* ==========================================================================
   1. FILTER SECTION - ULTRA COMPACT
   ========================================================================== */

.map-filters-section {
    position: sticky !important;
    top: 70px !important;
    z-index: 999 !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    padding: 4px 10px !important; /* Giảm từ 8px 15px */
    margin: 0 !important;
    border-bottom: 1px solid #ddd !important;
}

.admin-bar .map-filters-section {
    top: 102px !important;
}

@media screen and (max-width: 782px) {
    .admin-bar .map-filters-section {
        top: 116px !important;
    }
}

/* ==========================================================================
   2. FILTER CONTAINER - COMPACT
   ========================================================================== */

.map-filters-section .map-filters {
    max-width: 1200px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important; /* Giảm từ 6px */
}

/* ==========================================================================
   3. ROW 1 - CONTROLS (Time, Province, Search, Location)
   ========================================================================== */

.filters-row-controls {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important; /* Giảm từ 10px */
    flex-wrap: wrap !important;
    padding-bottom: 3px !important; /* Giảm từ 6px */
    border-bottom: 1px solid #eee !important;
}

/* Filter Labels - Ẩn text, chỉ giữ emoji */
.filters-row-controls .filter-label {
    font-size: 0.8rem !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Select Dropdowns - Compact */
.filters-row-controls .filter-select,
.map-filters .filter-select {
    padding: 3px 20px 3px 6px !important; /* Giảm padding */
    font-size: 0.75rem !important; /* Giảm font */
    height: 26px !important; /* Giảm height */
    min-width: 90px !important;
    border-radius: 4px !important;
}

/* Search Input - Compact */
.filters-row-controls .filter-input,
.filters-row-controls .location-input,
.map-filters .filter-input {
    padding: 3px 8px !important;
    font-size: 0.75rem !important;
    height: 26px !important;
}

/* Search Button - Compact */
.filters-row-controls .search-btn,
.map-filters .search-btn {
    padding: 3px 8px !important;
    font-size: 0.7rem !important;
    height: 26px !important;
}

/* Location Button - Compact */
.filters-row-controls .btn-location,
#locate-me {
    padding: 3px 8px !important;
    font-size: 0.7rem !important;
    height: 26px !important;
}

/* Auto Refresh Toggle - Compact */
.filters-row-controls .auto-refresh-toggle,
.auto-refresh-toggle {
    font-size: 0.7rem !important;
    gap: 3px !important;
}

.auto-refresh-toggle input[type="checkbox"] {
    width: 14px !important;
    height: 14px !important;
}

/* ==========================================================================
   4. ROW 2 - SEVERITY BUTTONS (Ultra Compact)
   ========================================================================== */

.filters-row-severity {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    padding-top: 2px !important; /* Giảm từ 4px */
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.filters-row-severity .severity-filters,
.severity-filters {
    display: flex !important;
    gap: 4px !important; /* Giảm từ 6px */
    flex-wrap: nowrap !important; /* CHANGED: từ wrap thành nowrap */
    overflow-x: auto !important;
}

/* Severity Buttons - Ultra Compact Pill */
.filters-row-severity .filter-btn,
.severity-filters .filter-btn {
    padding: 4px 8px !important; /* Thu nhỏ padding */
    font-size: 0.65rem !important; /* Giảm font */
    height: auto !important; /* Auto height thay vì fixed */
    border-radius: 12px !important;
    border-width: 1px !important;
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* Reset Button - Compact */
.filters-row-severity .btn-reset,
#reset-filters {
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
    height: 24px !important;
}

/* ==========================================================================
   5. MAP HEIGHT - TĂNG TỐI ĐA
   ========================================================================== */

.map-container-section {
    padding: 8px 15px !important; /* Giảm padding */
    background: #e9ecef !important;
}

.map-container {
    max-width: 100% !important; /* Full width */
    margin: 0 auto !important;
    padding: 0 !important;
}

#baolu-map {
    height: calc(100vh - 130px) !important; /* Tăng height */
    min-height: 500px !important;
    max-height: 1200px !important;
    width: 100% !important;
}

/* ==========================================================================
   6. HIDE HERO
   ========================================================================== */

.map-header,
.map-hero,
.hero-section {
    display: none !important;
}

/* ==========================================================================
   7. RESPONSIVE - TABLET
   ========================================================================== */

@media (max-width: 1024px) {
    .map-filters-section {
        top: 65px !important;
        padding: 4px 8px !important;
    }
    
    .admin-bar .map-filters-section {
        top: 97px !important;
    }
    
    #baolu-map {
        height: calc(100vh - 140px) !important;
        min-height: 450px !important;
    }
}

/* ==========================================================================
   8. RESPONSIVE - MOBILE
   ========================================================================== */

@media (max-width: 768px) {
    .map-filters-section {
        top: 56px !important;
        padding: 3px 6px !important;
    }
    
    .admin-bar .map-filters-section {
        top: 102px !important;
    }
    
    .filters-row-controls {
        gap: 4px !important;
    }
    
    .filters-row-severity .filter-btn,
    .severity-filters .filter-btn {
        padding: 2px 6px !important;
        font-size: 0.6rem !important;
        height: 22px !important;
    }
    
    #baolu-map {
        height: calc(100vh - 160px) !important;
        min-height: 380px !important;
    }
}

@media (max-width: 480px) {
    .filters-row-controls .filter-select,
    .map-filters .filter-select {
        min-width: 70px !important;
        font-size: 0.65rem !important;
    }
    
    .filters-row-severity .filter-btn,
    .severity-filters .filter-btn {
        padding: 2px 5px !important;
        font-size: 0.55rem !important;
    }
    
    #baolu-map {
        height: calc(100vh - 180px) !important;
        min-height: 320px !important;
    }
}

/* ==========================================================================
   END OF ULTRA COMPACT CSS
   ========================================================================== */
   
   
   /* ==========================================================================
   COMPACT HEADER - v1.0
   Date: November 28, 2025
   
   MỤC TIÊU: Thu nhỏ header từ 70px xuống 50px
   Tiết kiệm: ~20px cho bản đồ
   ========================================================================== */

/* ==========================================================================
   1. HEADER CONTAINER - COMPACT
   ========================================================================== */

.site-header.site-header-minimal {
    padding: 6px 0 !important; /* Giảm từ ~12px */
    min-height: 50px !important; /* Giảm từ 70px */
}

.site-header-minimal .container {
    padding: 0 10px !important;
}

.site-header-minimal .header-inner,
.site-header-minimal .header-minimal-inner {
    padding: 0 !important;
    min-height: auto !important;
    gap: 10px !important;
}

/* ==========================================================================
   2. LOGO - COMPACT
   ========================================================================== */

.site-header-minimal .site-logo-minimal {
    gap: 6px !important;
    padding: 4px 8px !important;
}

.site-header-minimal .logo-icon {
    font-size: 1.2rem !important; /* Giảm từ ~1.5rem */
}

.site-header-minimal .logo-text {
    font-size: 1.1rem !important; /* Giảm từ ~1.3rem */
}

/* ==========================================================================
   3. TAGLINE - COMPACT (Ẩn bớt trên màn hình nhỏ hơn)
   ========================================================================== */

.site-header-minimal .site-tagline-minimal {
    padding: 6px 12px !important; /* Giảm padding */
    border-radius: 20px !important;
}

.site-header-minimal .tagline-icon {
    font-size: 0.85rem !important;
}

.site-header-minimal .tagline-text {
    font-size: 0.75rem !important; /* Giảm từ ~0.85rem */
}

/* Ẩn tagline khi màn hình < 1100px để tiết kiệm space */
@media (max-width: 1100px) {
    .site-header-minimal .site-tagline-minimal {
        display: none !important;
    }
}

/* ==========================================================================
   4. CTA BUTTONS - COMPACT
   ========================================================================== */

.site-header-minimal .header-right {
    gap: 6px !important; /* Giảm từ 10px */
}

/* Nút Gửi Báo Cáo */
.site-header-minimal .btn-submit-report {
    padding: 6px 12px !important; /* Giảm padding */
    font-size: 0.8rem !important;
    border-radius: 6px !important;
    gap: 4px !important;
}

.site-header-minimal .btn-submit-report .btn-icon {
    font-size: 0.9rem !important;
}

.site-header-minimal .btn-submit-report .btn-text {
    font-size: 0.75rem !important;
}

/* Nút Hotline 112 */
.site-header-minimal .btn-hotline {
    padding: 6px 12px !important;
    font-size: 0.85rem !important;
    border-radius: 6px !important;
    gap: 4px !important;
}

.site-header-minimal .btn-hotline .btn-icon {
    font-size: 0.85rem !important;
}

.site-header-minimal .btn-hotline .btn-text {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
}

/* Menu Toggle Button */
.site-header-minimal .menu-toggle-minimal {
    padding: 6px 10px !important;
    font-size: 1rem !important;
}

/* ==========================================================================
   5. CẬP NHẬT STICKY TOP VALUES (Header giờ là 50px)
   ========================================================================== */

/* Filter section sticky - cập nhật theo header mới */
.map-filters-section {
    top: 50px !important; /* Giảm từ 70px */
}

/* Với Admin Bar */
.admin-bar .map-filters-section {
    top: 82px !important; /* 50px header + 32px admin bar */
}

@media screen and (max-width: 782px) {
    .admin-bar .map-filters-section {
        top: 96px !important; /* 50px header + 46px mobile admin bar */
    }
}

/* ==========================================================================
   6. MAP HEIGHT - CẬP NHẬT (Có thêm ~20px)
   ========================================================================== */

#baolu-map {
    height: calc(100vh - 110px) !important; /* Giảm từ 130px vì header nhỏ hơn */
    min-height: 500px !important;
    max-height: 1200px !important;
}

@media (max-width: 1024px) {
    #baolu-map {
        height: calc(100vh - 120px) !important;
        min-height: 450px !important;
    }
}

@media (max-width: 768px) {
    .site-header.site-header-minimal {
        padding: 4px 0 !important;
        min-height: 45px !important;
    }
    
    .site-header-minimal .logo-icon {
        font-size: 1.1rem !important;
    }
    
    .site-header-minimal .logo-text {
        font-size: 1rem !important;
    }
    
    .site-header-minimal .btn-submit-report {
        padding: 5px 8px !important;
    }
    
    .site-header-minimal .btn-submit-report .btn-text {
        display: none !important; /* Chỉ hiện icon trên mobile */
    }
    
    .site-header-minimal .btn-hotline {
        padding: 5px 10px !important;
    }
    
    .map-filters-section {
        top: 45px !important;
    }
    
    .admin-bar .map-filters-section {
        top: 91px !important;
    }
    
    #baolu-map {
        height: calc(100vh - 140px) !important;
        min-height: 380px !important;
    }
}

@media (max-width: 480px) {
    .site-header.site-header-minimal {
        min-height: 42px !important;
    }
    
    .site-header-minimal .logo-text {
        font-size: 0.9rem !important;
    }
    
    .map-filters-section {
        top: 42px !important;
    }
    
    #baolu-map {
        height: calc(100vh - 150px) !important;
        min-height: 320px !important;
    }
}

/* ==========================================================================
   END OF COMPACT HEADER CSS
   ========================================================================== */
   
   
   
   
   
   /* ==========================================================================
   FIT VIEWPORT - MAP FILLS SCREEN EXACTLY
   Version: 3.0 FINAL
   Date: November 28, 2025
   
   MỤC TIÊU: Bản đồ vừa khít màn hình, không cần scroll
   
   TÍNH TOÁN:
   - Header: 50px
   - Filter: ~50px (2 rows compact)
   - Padding: giảm tối đa
   - Map: 100vh - header - filter - minimal padding
   ========================================================================== */

/* ==========================================================================
   1. MAP CONTAINER SECTION - XÓA PADDING
   ========================================================================== */

.map-container-section {
    padding: 5px 10px 0 10px !important; /* Giảm tối đa, bỏ padding bottom */
    background: #e9ecef !important;
    margin: 0 !important;
}

.map-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.map-wrapper {
    border-width: 2px !important; /* Giảm border */
    margin: 0 !important;
}

/* ==========================================================================
   2. MAP HEIGHT - FIT VIEWPORT CHÍNH XÁC
   ========================================================================== */

/* Không có Admin Bar */
#baolu-map {
    /* 100vh - 50px header - 50px filter - 10px padding = 100vh - 110px */
    /* Trừ thêm một chút cho border và buffer */
    height: calc(100vh - 130px) !important;
    min-height: 400px !important;
    max-height: none !important; /* Bỏ giới hạn max */
    width: 100% !important;
}

/* Với Admin Bar (32px desktop) */
.admin-bar #baolu-map {
    height: calc(100vh - 162px) !important; /* 115 + 32 */
}

/* ==========================================================================
   3. FILTER SECTION - TINH CHỈNH
   ========================================================================== */

.map-filters-section {
    padding: 4px 10px !important;
    margin: 0 !important;
}

.map-filters-section .map-filters {
    gap: 2px !important; /* Giảm gap */
}

.filters-row-controls {
    padding-bottom: 2px !important;
}

.filters-row-severity {
    padding-top: 2px !important;
}

/* ==========================================================================
   4. ẨN/THU GỌN LEGEND ĐỂ KHÔNG BỊ CẮT
   ========================================================================== */

/* Legend nhỏ gọn hơn */
.map-legend {
    bottom: 10px !important;
    left: 10px !important;
    padding: 6px 10px !important;
    max-width: 120px !important;
}

.map-legend h4 {
    font-size: 0.65rem !important;
    margin-bottom: 4px !important;
}

.map-legend li {
    font-size: 0.6rem !important;
    gap: 4px !important;
}

.map-legend .legend-marker {
    width: 10px !important;
    height: 10px !important;
}

/* ==========================================================================
   5. RESPONSIVE - TABLET
   ========================================================================== */

@media (max-width: 1024px) {
    #baolu-map {
        height: calc(100vh - 135px) !important;
    }
    
    .admin-bar #baolu-map {
        height: calc(100vh - 167px) !important;
    }
}

/* ==========================================================================
   6. RESPONSIVE - MOBILE
   Updated: December 02, 2025 - Giảm chiều cao bản đồ xuống 60vh để thấy nội dung bên dưới
   ========================================================================== */

@media (max-width: 768px) {
    .map-container-section {
        padding: 3px 5px 0 5px !important;
    }
    
    #baolu-map {
        height: 60vh !important; /* Giảm từ calc(100vh-125px) để user thấy nội dung bên dưới */
        min-height: 300px !important; /* Đảm bảo không quá nhỏ */
    }
    
    .admin-bar #baolu-map {
        height: 55vh !important; /* Giảm thêm khi có admin bar */
        min-height: 280px !important;
    }
    
    /* Legend còn nhỏ hơn trên mobile */
    .map-legend {
        padding: 4px 8px !important;
        max-width: 100px !important;
    }
    
    .map-legend h4 {
        font-size: 0.6rem !important;
    }
    
    .map-legend li {
        font-size: 0.55rem !important;
    }
}

@media (max-width: 480px) {
    #baolu-map {
        height: 60vh !important; /* Giữ 60vh cho màn hình nhỏ */
        min-height: 280px !important;
    }
    
    .admin-bar #baolu-map {
        height: 55vh !important;
        min-height: 260px !important;
    }
    
    /* Có thể ẩn legend trên mobile rất nhỏ */
    .map-legend {
        display: none !important; /* Ẩn legend trên mobile nhỏ */
    }
}

/* ==========================================================================
   7. ẨN PHẦN "HƯỚNG DẪN SỬ DỤNG" TRÊN HOMEPAGE
   (Để map chiếm toàn bộ viewport, instructions sẽ thấy khi scroll)
   ========================================================================== */

/* Không cần ẩn, nhưng đảm bảo nó không ảnh hưởng viewport ban đầu */
.map-instructions {
    margin-top: 0 !important;
}

/* ==========================================================================
   END OF FIT VIEWPORT CSS
   ========================================================================== */

/* ==========================================================================
   8. MAP ACTION BUTTONS (Làm mới + Đặt lại + Vị Trí) - TRÊN BẢN ĐỒ GÓC PHẢI
   Updated: November 29, 2025
   ========================================================================== */

.map-action-buttons {
    position: absolute;
    top: 80px;
    right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Style chung cho 3 nút */
.btn-map-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 120px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* Nút Làm mới - Màu xanh dương */
.btn-map-action.btn-refresh {
    background: rgba(33, 150, 243, 0.95);
}
.btn-map-action.btn-refresh:hover {
    background: rgba(25, 118, 210, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

/* Nút Đặt lại - Màu xám */
.btn-map-action.btn-reset-map {
    background: rgba(158, 158, 158, 0.95);
}
.btn-map-action.btn-reset-map:hover {
    background: rgba(117, 117, 117, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

/* Nút Vị Trí - Màu xanh lá */
.btn-map-action.btn-locate {
    background: rgba(76, 175, 80, 0.95);
}
.btn-map-action.btn-locate:hover {
    background: rgba(56, 142, 60, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

/* Active/Loading state */
.btn-map-action:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-map-action.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .map-action-buttons {
        top: 70px;
        right: 8px;
    }
    
    .btn-map-action {
        width: 110px;
        height: 38px;
        font-size: 13px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .map-action-buttons {
        top: auto;
        bottom: 25px; /* Gần đáy bản đồ */
        right: 8px;
    }
    
    .btn-map-action {
        width: 80px;
        height: 36px;
        font-size: 12px;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .map-action-buttons {
        bottom: 20px; /* Gần đáy bản đồ */
        right: 6px;
        gap: 6px;
    }
    
    .btn-map-action {
        width: 75px;
        height: 34px;
        font-size: 11px;
        border-radius: 6px;
    }
}

/* ==========================================================================
   END OF MAP ACTION BUTTONS
   ========================================================================== */


/* ==========================================================================
   SEVERITY FILTER BAR - Nằm dưới bản đồ, trên Stats Bar (1 dòng ngang)
   Added: December 02, 2025
   ========================================================================== */

.severity-filter-bar {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    padding: 10px 15px !important;
    border-bottom: 1px solid #dee2e6 !important;
}

.severity-filter-bar .severity-filters {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: nowrap !important; /* QUAN TRỌNG: Không xuống dòng */
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.severity-filter-bar .severity-filters::-webkit-scrollbar {
    display: none;
}

.severity-filter-bar .filter-btn {
    padding: 8px 16px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 20px !important;
    background: white !important;
    color: #333 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap !important;
    flex-shrink: 0 !important; /* Không co lại */
    height: auto !important;
}

.severity-filter-bar .filter-btn:hover {
    background: #f5f5f5 !important;
    border-color: #ccc !important;
    transform: translateY(-1px);
}

.severity-filter-bar .filter-btn.active {
    background: #2196F3 !important;
    color: white !important;
    border-color: #2196F3 !important;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.4);
}

/* Màu sắc cho từng nút khi active */
.severity-filter-bar .filter-btn[data-severity="can-cuu"].active {
    background: #FF6600 !important;
    border-color: #FF6600 !important;
    box-shadow: 0 2px 6px rgba(255, 102, 0, 0.4);
}

.severity-filter-bar .filter-btn[data-severity="ngap-nang"].active {
    background: #f44336 !important;
    border-color: #f44336 !important;
    box-shadow: 0 2px 6px rgba(244, 67, 54, 0.4);
}

.severity-filter-bar .filter-btn[data-severity="ngap-vua"].active {
    background: #FFC107 !important;
    border-color: #FFC107 !important;
    color: #333 !important;
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.4);
}

.severity-filter-bar .filter-btn[data-severity="thoat-nuoc"].active {
    background: #4CAF50 !important;
    border-color: #4CAF50 !important;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4);
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .severity-filter-bar {
        padding: 8px 12px !important;
    }
    
    .severity-filter-bar .filter-btn {
        padding: 7px 14px !important;
        font-size: 12px !important;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .severity-filter-bar {
        padding: 8px 10px !important;
    }
    
    .severity-filter-bar .severity-filters {
        justify-content: flex-start !important;
        gap: 6px !important;
        flex-wrap: nowrap !important;
    }
    
    .severity-filter-bar .filter-btn {
        padding: 6px 12px !important;
        font-size: 12px !important;
        border-radius: 16px !important;
        height: auto !important;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .severity-filter-bar {
        padding: 8px 8px !important;  /* Tăng padding */
        margin-bottom: 0 !important;  /* Bỏ margin bottom */
    }
    
    .severity-filter-bar .severity-filters {
        gap: 5px !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
    }
    
    .severity-filter-bar .filter-btn {
        padding: 8px 12px !important;  /* Tăng từ 4px 6px */
        font-size: 12px !important;    /* Tăng từ 10px */
        border-radius: 16px !important;
        border-width: 1.5px !important;
        height: auto !important;
        min-width: auto !important;
    }
}

/* ==========================================================================
   END OF SEVERITY FILTER BAR
   ========================================================================== */


/* ==========================================================================
   MAP FILTER PANEL - Góc trên trái bản đồ
   Added: December 02, 2025
   ========================================================================== */

.map-filter-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Nút Toggle */
.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-toggle-btn:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.filter-toggle-btn .toggle-icon {
    font-size: 10px;
    transition: transform 0.2s ease;
}

/* Dropdown Panel */
.filter-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 280px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 15px;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Khi mở */
.map-filter-panel.open .filter-dropdown {
    display: block;
}

/* Filter Groups */
.map-filter-panel .filter-group {
    margin-bottom: 12px;
}

.map-filter-panel .filter-group:last-child {
    margin-bottom: 0;
}

.map-filter-panel .filter-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
}

.map-filter-panel .filter-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.map-filter-panel .filter-select:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* Location Search */
.map-filter-panel .location-search-wrapper {
    display: flex;
    gap: 6px;
}

.map-filter-panel .location-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.map-filter-panel .location-input:focus {
    outline: none;
    border-color: #2196F3;
}

.map-filter-panel .search-btn {
    padding: 10px 14px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.map-filter-panel .search-btn:hover {
    background: #1976D2;
}

/* Location Results */
.map-filter-panel .location-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .map-filter-panel {
        top: 8px;
        left: 8px;
    }
    
    .filter-toggle-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .filter-dropdown {
        min-width: 260px;
        padding: 12px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .map-filter-panel {
        top: 6px;
        left: 6px;
    }
    
    .filter-toggle-btn {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    .filter-dropdown {
        min-width: 240px;
        padding: 10px;
        border-radius: 8px;
    }
    
    .map-filter-panel .filter-select,
    .map-filter-panel .location-input {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .map-filter-panel .search-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .map-filter-panel {
        top: 5px;
        left: 5px;
        right: 5px;
    }
    
    .filter-toggle-btn {
        padding: 7px 10px;
        font-size: 11px;
    }
    
    .filter-dropdown {
        min-width: auto;
        width: calc(100vw - 20px);
        max-width: 300px;
    }
    
    .map-filter-panel .filter-label {
        font-size: 11px;
    }
    
    .map-filter-panel .filter-select,
    .map-filter-panel .location-input {
        padding: 7px 8px;
        font-size: 12px;
    }
}

/* ==========================================================================
   END OF MAP FILTER PANEL
   ========================================================================== */


/* ==========================================================================
   MAP STATS BAR - Nằm dưới bản đồ, trên "Hướng Dẫn Sử Dụng"
   Added: December 02, 2025
   ========================================================================== */

.map-stats-bar {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 10px 15px;
    border-bottom: 1px solid #dee2e6;
}

.map-stats-bar .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
}

.map-stats-bar .stats-content {
    display: flex;
    flex-direction: row !important; /* Bắt buộc nằm ngang */
    justify-content: flex-start; /* Căn trái */
    align-items: center;
    gap: 20px;
}

.map-stats-bar .stat-item {
    display: inline-flex !important; /* Nằm ngang */
    flex-direction: row !important;
    align-items: center;
    gap: 5px;
}

.map-stats-bar .stat-icon {
    font-size: 0.9rem;
}

.map-stats-bar .stat-item strong {
    font-size: 1rem;
    font-weight: 700;
    color: #2196F3;
}

.map-stats-bar .stat-label {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
}

.map-stats-bar .stat-divider {
    color: #adb5bd;
    font-size: 1rem;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .map-stats-bar {
        padding: 8px 12px;
    }
    
    .map-stats-bar .stats-content {
        gap: 15px;
        justify-content: flex-start; /* Căn trái */
    }
    
    .map-stats-bar .stat-icon {
        font-size: 0.85rem;
    }
    
    .map-stats-bar .stat-item strong {
        font-size: 0.9rem;
    }
    
    .map-stats-bar .stat-label {
        font-size: 0.6rem;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .map-stats-bar {
        padding: 6px 10px;
    }
    
    .map-stats-bar .stats-content {
        gap: 10px;
        justify-content: flex-start; /* Căn trái */
    }
    
    .map-stats-bar .stat-icon {
        font-size: 0.8rem;
    }
    
    .map-stats-bar .stat-item strong {
        font-size: 0.85rem;
    }
    
    .map-stats-bar .stat-label {
        font-size: 0.55rem;
    }
    
    .map-stats-bar .stat-divider {
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   END OF MAP STATS BAR
   ========================================================================== */


/* ==========================================================================
   FINAL OVERRIDE: SEVERITY FILTER BAR - 1 HÀNG NGANG
   Added: December 02, 2025
   Đảm bảo các nút severity hiển thị 1 hàng ngang trên mobile
   ========================================================================== */

/* Force nowrap cho tất cả severity-filters */
.severity-filter-bar .severity-filters,
section.severity-filter-bar .severity-filters,
.map-page .severity-filter-bar .severity-filters {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 0 5px !important;
}

/* Hide scrollbar */
.severity-filter-bar .severity-filters::-webkit-scrollbar {
    display: none !important;
    height: 0 !important;
}

/* Ultra compact buttons */
.severity-filter-bar .severity-filters .filter-btn,
section.severity-filter-bar .severity-filters .filter-btn {
    padding: 5px 8px !important;
    font-size: 11px !important;
    border-radius: 14px !important;
    border-width: 1.5px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: auto !important;
    min-width: auto !important;
    line-height: 1.2 !important;
}

/* Mobile - Thu nhỏ hơn nữa */
@media (max-width: 480px) {
    .severity-filter-bar .severity-filters,
    section.severity-filter-bar .severity-filters {
        gap: 3px !important;
        padding: 0 3px !important;
    }
    
    .severity-filter-bar .severity-filters .filter-btn,
    section.severity-filter-bar .severity-filters .filter-btn {
        padding: 4px 6px !important;
        font-size: 10px !important;
        border-radius: 10px !important;
        border-width: 1px !important;
    }
}

/* ==========================================================================
   END OF FINAL OVERRIDE
   ========================================================================== */


/* ==========================================================================
   MOBILE POPUP COMPACT - Thu nhỏ popup marker trên mobile
   Added: December 02, 2025
   Updated: December 02, 2025 - Thu nhỏ thêm SOS popup
   ========================================================================== */

@media (max-width: 480px) {
    /* Giảm chiều rộng popup */
    .leaflet-popup-content {
        width: 200px !important;
        max-width: 70vw !important;
    }
    
    /* Thu nhỏ header */
    .popup-header {
        padding: 4px 30px 4px 6px !important;
    }
    
    /* Thu nhỏ badge severity */
    .popup-header .severity-badge,
    .severity-badge {
        padding: 2px 5px !important;
        font-size: 0.5rem !important;
    }
    
    /* Thu nhỏ thời gian */
    .popup-header .report-time,
    .report-time {
        font-size: 0.5rem !important;
    }
    
    /* Thu nhỏ title */
    .popup-title {
        font-size: 0.75rem !important;
        padding: 4px 6px 3px !important;
        line-height: 1.25 !important;
    }
    
    /* ============ SOS EMERGENCY BOX - THU NHỎ ============ */
    .emergency-contact-box {
        padding: 4px 5px !important;
        margin: 3px 6px !important;
        border-width: 1px !important;
        border-radius: 4px !important;
    }
    
    .emergency-contact-phone {
        padding: 3px 5px !important;
        border-radius: 3px !important;
    }
    
    .phone-number {
        font-size: 0.7rem !important;
    }
    
    .call-now-btn {
        padding: 3px 6px !important;
        font-size: 0.55rem !important;
        border-radius: 10px !important;
        gap: 2px !important;
    }
    
    .sos-badge-icon {
        width: 18px !important;
        height: 18px !important;
        font-size: 0.5rem !important;
    }
    
    /* ============ RESCUE STATUS - THU NHỎ ============ */
    .rescue-status-display {
        padding: 3px 5px !important;
        margin: 3px 6px !important;
        font-size: 0.65rem !important;
        border-radius: 4px !important;
    }
    
    .rescue-status-label {
        font-size: 0.6rem !important;
    }
    
    .rescue-status-value {
        font-size: 0.65rem !important;
    }
    
    /* ============ CAROUSEL HÌNH ẢNH - THU NHỎ ============ */
    .popup-carousel {
        height: 90px !important;
        overflow: hidden !important;
        position: relative !important;
        width: 100% !important;
    }
    
    .popup-carousel-inner {
        display: flex !important;
        height: 100% !important;
        width: 100% !important;
    }
    
    .popup-carousel-slide {
        flex: 0 0 100% !important;  /* CRITICAL: không co giãn, chiếm đúng 100% */
        min-width: 100% !important;
        width: 100% !important;
        height: 100% !important;
        position: relative !important;
    }
    
    .popup-carousel-slide img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        display: block !important;
    }
    
    .carousel-nav {
        width: 24px !important;
        height: 24px !important;
        font-size: 10px !important;
    }
    
    .carousel-counter {
        font-size: 0.5rem !important;
        padding: 2px 5px !important;
    }
    
    .popup-no-image {
        padding: 10px 6px !important;
    }
    
    .popup-no-image .no-image-icon {
        font-size: 1.2rem !important;
    }
    
    .popup-no-image .no-image-text {
        font-size: 0.6rem !important;
    }
    
    /* ============ DETAILS - THU NHỎ ============ */
    .popup-details {
        padding: 4px 6px !important;
    }
    
    .popup-detail-inline {
        font-size: 0.65rem !important;
        padding: 2px 0 !important;
    }
    
    .water-level-value {
        font-size: 0.7rem !important;
    }
    
    /* ============ ACTION BUTTONS - THU NHỎ ============ */
    .popup-actions {
        padding: 4px 5px !important;
        gap: 3px !important;
    }
    
    .popup-action-btn {
        padding: 4px 5px !important;
        font-size: 0.55rem !important;
        gap: 2px !important;
        border-radius: 3px !important;
    }
    
    /* Close button nhỏ hơn */
    .leaflet-popup-close-button {
        font-size: 18px !important;
        width: 24px !important;
        height: 24px !important;
        right: 4px !important;
        top: 4px !important;
    }
    
    /* Popup wrapper */
    .leaflet-popup-content-wrapper {
        border-radius: 8px !important;
    }
}

/* Màn hình rất nhỏ (< 360px) */
@media (max-width: 360px) {
    .leaflet-popup-content {
        width: 180px !important;
        max-width: 80vw !important;
    }
    
    .popup-title {
        font-size: 0.7rem !important;
    }
    
    .popup-carousel {
        height: 80px !important;
        overflow: hidden !important;
    }
    
    .popup-carousel-slide {
        flex: 0 0 100% !important;
    }
    
    .popup-carousel-slide img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        display: block !important;
    }
    
    .popup-action-btn {
        font-size: 0.5rem !important;
        padding: 3px 4px !important;
    }
    
    .emergency-contact-box {
        padding: 3px 4px !important;
        margin: 2px 5px !important;
    }
    
    .phone-number {
        font-size: 0.65rem !important;
    }
    
    .call-now-btn {
        padding: 2px 5px !important;
        font-size: 0.5rem !important;
    }
}

/* ==========================================================================
   END OF MOBILE POPUP COMPACT
   ========================================================================== */


/* ==========================================================================
   MOBILE HOMEPAGE SPACING FIX
   Fix khoảng cách giữa filter bar và hướng dẫn sử dụng
   Added: December 03, 2025
   ========================================================================== */

@media (max-width: 768px) {
    /* Giảm padding section Hướng dẫn sử dụng */
    .map-instructions {
        padding: 15px 10px !important;
    }
    
    .map-instructions h3 {
        margin-bottom: 12px !important;
        font-size: 1rem !important;
    }
    
    .map-instructions .instructions-grid {
        gap: 10px !important;
    }
    
    .map-instructions .instruction-item {
        padding: 10px !important;
    }
    
    .map-instructions .instruction-item p {
        font-size: 0.7rem !important;
        margin-bottom: 8px !important;
    }
}

@media (max-width: 480px) {
    /* Thu gọn hơn nữa trên mobile nhỏ */
    .map-instructions {
        padding: 12px 8px !important;
    }
    
    .map-instructions h3 {
        margin-bottom: 10px !important;
        font-size: 0.95rem !important;
    }
    
    .map-instructions .instructions-grid {
        gap: 8px !important;
    }
    
    .map-instructions .instruction-item {
        padding: 8px !important;
    }
    
    .map-instructions .instruction-item h4 {
        font-size: 0.8rem !important;
    }
    
    .map-instructions .instruction-item p {
        font-size: 0.65rem !important;
        line-height: 1.3 !important;
    }
    
    .map-instructions .btn-submit-cta,
    .map-instructions .btn-hotline-cta {
        padding: 6px 12px !important;
        font-size: 0.7rem !important;
    }
}

/* ==========================================================================
   END OF MOBILE HOMEPAGE SPACING FIX
   ========================================================================== */


/* ============================================
   END OF BAOLU-MAP.CSS
   Version: 1.7.6
   Last Updated: December 03, 2025 - Fix filter buttons size & homepage spacing on mobile
   ============================================ */
