/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    overflow: hidden;
    background: #1a1a1a;
}

/* ===== FULL SCREEN MAP ===== */
.fullscreen-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ===== FLOATING ACTION BUTTONS ===== */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Ensure floating actions stay above overlay panels */
    z-index: 11050;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    min-width: 120px;
    justify-content: center;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.4);
}

.action-btn.primary {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, #ff5722, #ff6b35);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #2196F3, #21CBF3);
    color: white;
}

.action-btn.secondary:hover {
    background: linear-gradient(135deg, #1976D2, #2196F3);
}

.action-btn.info {
    background: linear-gradient(135deg, #17a2b8, #20c997);
    color: white;
}

.action-btn.info:hover {
    background: linear-gradient(135deg, #138496, #17a2b8);
}

.action-btn.warning {
    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: #333;
}

.action-btn.warning:hover {
    background: linear-gradient(135deg, #ffb300, #ffa000);
}

.action-btn i {
    font-size: 18px;
}

/* ===== OVERLAY PANELS ===== */
.overlay-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 400px;
    max-height: calc(100vh - 40px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 1001;
    transform: translateX(-450px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

/* ===== SEARCH PANEL SPECIFIC ===== */
.search-panel {
    width: 400px;
}

.search-form {
    margin-bottom: 20px;
}

.search-input-group {
    position: relative;
    display: flex;
    margin-bottom: 15px;
}

.search-input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input-group input:focus {
    border-color: #007bff;
}

.search-submit-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 15px;
    margin-left: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-submit-btn:hover {
    background: #0056b3;
}

.search-filters {
    margin-bottom: 20px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
}

.search-placeholder {
    text-align: center;
    color: #666;
    padding: 40px 20px;
}

.search-placeholder i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ccc;
}

.search-result-item.emergency-result {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.search-result-item.emergency-result:hover {
    background: #f8f9fa;
    border-left-color: #007bff;
    transform: translateX(2px);
}

.search-result-item.emergency-result:last-child {
    border-bottom: none;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.emergency-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
}

.emergency-info i {
    color: #007bff;
    font-size: 14px;
}

.emergency-type-text {
    font-size: 14px;
}

.result-details {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

.result-details > div {
    margin-bottom: 4px;
}

.result-details i {
    width: 14px;
    margin-right: 6px;
    color: #999;
}

.result-id {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #495057;
}

.result-notes {
    font-style: italic;
    color: #6c757d;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

/* Emergency-specific urgency badge styling in search results */
.search-result-item .urgency-badge {
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.search-result-item .urgency-badge.urgency-critical {
    background: #dc3545;
}

.search-result-item .urgency-badge.urgency-high {
    background: #fd7e14;
}

.search-result-item .urgency-badge.urgency-medium {
    background: #28a745;
}

.search-result-item .urgency-badge.urgency-low {
    background: #6c757d;
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.result-address {
    color: #666;
    font-size: 13px;
    margin-bottom: 5px;
}

.result-distance {
    color: #999;
    font-size: 12px;
}

.loading-spinner {
    text-align: center;
    padding: 20px;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-results i {
    font-size: 36px;
    margin-bottom: 15px;
    color: #ccc;
}

.overlay-panel.collapsed {
    transform: translateX(-100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.overlay-panel:not(.collapsed) {
    transform: translateX(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.panel-header {
    background: linear-gradient(135deg, #333, #555);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-panel-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.close-panel-btn:hover {
    background: rgba(255,255,255,0.2);
}

.panel-content {
    padding: 20px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

/* Keep form actions visible on small screens by making them sticky */
.overlay-panel .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

@media (max-width: 700px) {
    .overlay-panel {
        left: 10px;
        right: 10px;
        width: auto;
        max-height: calc(100vh - 40px);
        top: 10px;
    }

    .overlay-panel .panel-content {
        padding-bottom: 96px; /* leave space for sticky actions / keyboard */
    }

    .overlay-panel .form-actions {
        /* Keep actions visible by providing bottom spacing in the panel content; avoid sticky positioning */
        position: static;
        bottom: auto;
        background: transparent;
        padding-top: 8px;
        padding-bottom: 8px;
        margin-top: 8px;
    }
}

/* ===== REPORTS LIST PANEL SPECIFIC ===== */
.reports-list-panel {
    width: 700px;
}

.reports-controls {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.filter-controls {
    display: flex;
    gap: 10px;
}

.filter-select {
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 12px;
    background: white;
}

.action-controls {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 11px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.btn-small.secondary {
    background: #6c757d;
    color: white;
}

.btn-small.secondary:hover {
    background: #5a6268;
}

.btn-small.primary {
    background: #007bff;
    color: white;
}

.btn-small.primary:hover {
    background: #0056b3;
}

.stats-row {
    display: flex;
    gap: 20px;
    font-size: 12px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    color: #6c757d;
    font-weight: 500;
}

.stat-value {
    font-weight: 600;
    font-size: 14px;
}

.stat-value.critical {
    color: #dc3545;
}

.stat-value.high {
    color: #fd7e14;
}

.reports-table-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    contain: layout style;
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.reports-table th {
    background: #f8f9fa;
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.reports-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}

.reports-table tbody tr {
    transition: all 0.2s ease;
    cursor: pointer;
    contain: layout style;
}

.reports-table tr:hover {
    background: #e3f2fd;
    cursor: pointer;
    transform: translateY(-1px);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.reports-table tr.selected-report {
    background: #1976d2 !important;
    color: white !important;
    font-weight: 500;
    box-shadow: 0 3px 6px rgba(25, 118, 210, 0.3);
}

.reports-table tr.selected-report:hover {
    background: #1565c0 !important;
    transform: translateY(-1px);
}

.reports-table tr.selected-report .table-urgency {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.reports-table tr:last-child td {
    border-bottom: none;
}

.table-urgency {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

.table-urgency.critical {
    background: #dc3545;
}

.table-urgency.high {
    background: #fd7e14;
}

.table-urgency.medium {
    background: #28a745;
}

.table-urgency.low {
    background: #6c757d;
}

.table-emergency-type {
    display: flex;
    align-items: center;
    gap: 6px;
}

.table-emergency-type i {
    font-size: 12px;
    width: 14px;
}

.table-actions {
    display: flex;
    gap: 4px;
}

.table-btn {
    padding: 2px 6px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 2px;
    transition: all 0.2s ease;
}

.table-btn.view {
    background: #007bff;
    color: white;
}

.table-btn.view:hover {
    background: #0056b3;
}

.table-btn.locate {
    background: #28a745;
    color: white;
}

.table-btn.locate:hover {
    background: #1e7e34;
}

.table-btn.delete {
    background: #dc3545;
    color: white;
}

.table-btn.delete:hover {
    background: #c82333;
}

.table-id {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #495057;
}

.table-location {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-contact {
    font-family: 'Courier New', monospace;
}

.table-time {
    color: #6c757d;
    font-size: 11px;
}

.no-reports {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.no-reports i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #dee2e6;
}

/* ===== REPORT PANEL SPECIFIC ===== */
.report-panel {
    width: 450px;
}

.location-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-btn {
    padding: 12px 16px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
}

.location-btn:hover {
    background: linear-gradient(135deg, #45a049, #4CAF50);
    transform: translateY(-1px);
}

#selectedLocation {
    color: #666;
    font-size: 14px;
    margin: 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
    border-left: 4px solid #2196F3;
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.checkbox-label:hover {
    background: #f5f5f5;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkmark {
    display: inline-block;
}

.image-preview {
    margin-top: 10px;
}

.image-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn.primary {
    background: linear-gradient(135deg, #2196F3, #21CBF3);
    color: white;
}

.btn.primary:hover {
    background: linear-gradient(135deg, #1976D2, #2196F3);
    transform: translateY(-1px);
}

.btn.secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.btn.secondary:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

/* Disabled button appearance: prevent hover effects and show not-allowed cursor */
.btn:disabled,
.action-btn:disabled,
.search-submit-btn:disabled,
.btn-small:disabled {
    cursor: not-allowed !important;
    opacity: 0.65 !important;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none !important; /* prevent hover styles and clicks */
}

/* Ensure hover styles apply only to enabled buttons (defensive) */
.action-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.4);
}

.btn:not(:disabled):hover {
    transform: translateY(-1px);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Welcome Modal Specific Styles */
#welcomeModal .modal-content {
    max-width: 500px;
    animation: slideInDown 0.4s ease-out;
}

#welcomeModal .modal-header {
    background: linear-gradient(135deg, #ff9800, #ff6f00);
    color: white;
}

#welcomeModal .modal-header h2 {
    color: white;
    font-size: 22px;
}

#welcomeModal .modal-header i {
    color: rgba(255, 255, 255, 0.9);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    position: relative;
}

.modal-content.large {
    max-width: 800px;
}

.modal-content.image-modal {
    max-width: min(600px, 70vw);
    max-height: min(400px, 70vh);
    background: transparent;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.modal-content.image-modal img {
    max-width: min(550px, 60vw);
    max-height: min(350px, 60vh);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    display: block;
    margin: auto;
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.modal-header h2 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px; /* Smaller modal title */
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f8f9fa;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(0,0,0,0.1);
    color: #333;
}

/* Image Placeholder Styles */
.image-placeholder {
    background: #f5f5f5;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

.image-placeholder:hover {
    background: #f0f0f0;
    border-color: #2196f3;
}

.image-placeholder.no-image {
    cursor: default;
    opacity: 0.7;
}

.image-placeholder.no-image:hover {
    background: #f5f5f5;
    border-color: #ddd;
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.placeholder-content i {
    font-size: 24px;
    color: #666;
}

.placeholder-content span {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.image-container {
    position: relative;
}

.image-container img {
    max-width: 100%;
    max-height: 200px; /* Smaller default for better display */
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    object-fit: cover; /* Maintain aspect ratio */
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.image-container img:hover {
    opacity: 0.9;
}

.image-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.image-actions .btn {
    font-size: 11px; /* Smaller button text */
    padding: 5px 10px;
}

/* Image Modal Styles */
.image-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.9);
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.image-modal img {
    max-width: min(550px, 60vw);
    max-height: min(350px, 60vh);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    object-fit: contain;
    display: block;
}

.image-modal .close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: all 0.2s ease;
}

.image-modal .close-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* ===== CUSTOM MAP MARKERS ===== */
.custom-marker {
    background: transparent;
    border: none;
}

.marker-inner {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid rgba(255,255,255,0.8);
    transition: all 0.3s ease;
}

.marker-inner.urgency-critical {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.marker-inner.urgency-high {
    background: linear-gradient(135deg, #fd7e14, #e55100);
}

.marker-inner.urgency-medium {
    background: linear-gradient(135deg, #ffc107, #ff8f00);
}

.marker-inner.urgency-low {
    background: linear-gradient(135deg, #28a745, #20c997);
}

/* ===== LOCATION ALERTS & MODALS ===== */
.location-alert,
.map-instructions-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(5px);
}

.alert-content,
.instructions-content {
    background: white;
    border-radius: 15px;
    padding: 25px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    position: relative;
}

.alert-header,
.instructions-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.alert-header h3,
.instructions-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.alert-header i {
    color: #ff6b35;
    font-size: 20px;
}

.instructions-header i {
    color: #2196F3;
    font-size: 20px;
}

.alert-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.alert-actions,
.instructions-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.location-success {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 3000;
    animation: slideInFromTop 0.3s ease;
}

.success-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.success-content i {
    font-size: 18px;
}

@keyframes slideInFromTop {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Instructions Modal Specific Styles */
.instructions-content {
    max-width: 600px;
}

.instructions-body {
    margin-bottom: 25px;
}

.instruction-step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.step-number {
    background: linear-gradient(135deg, #2196F3, #21CBF3);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
}

.step-content p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

.instructions-header .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.instructions-header .close-btn:hover {
    background: rgba(0,0,0,0.1);
    color: #333;
}

/* Button Loading State */
.location-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.location-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE DESIGN FOR LARGER SCREENS ===== */
@media (min-width: 1200px) {
    /* Large Desktop Styles - Very Conservative Sizing */
    .image-container img {
        max-height: 180px;
        max-width: 300px;
    }
    
    .image-preview img {
        max-height: 120px;
        max-width: 250px;
    }
    
    .image-modal img,
    .modal-content.image-modal img {
        max-width: min(450px, 30vw);
        max-height: min(300px, 40vh);
    }
    
    .modal-content.image-modal {
        max-width: min(500px, 40vw);
        max-height: min(350px, 50vh);
    }
    
    .overlay-panel {
        max-width: 600px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    /* Tablet and Medium Desktop Styles */
    .image-container img {
        max-height: 160px;
        max-width: 280px;
    }
    
    .image-preview img {
        max-height: 130px;
        max-width: 220px;
    }
    
    .image-modal img,
    .modal-content.image-modal img {
        max-width: min(500px, 50vw);
        max-height: min(350px, 50vh);
    }
    
    .modal-content.image-modal {
        max-width: min(550px, 60vw);
        max-height: min(400px, 60vh);
    }
    
    .overlay-panel {
        max-width: 500px;
    }
}

@media (max-width: 767px) {
    /* Mobile Styles - Use more screen space on small devices */
    .image-modal img,
    .modal-content.image-modal img {
        max-width: 85vw;
        max-height: 60vh;
    }
    
    .modal-content.image-modal {
        max-width: 90vw;
        max-height: 70vh;
        padding: 10px;
    }
}

/* Mobile Responsiveness for Alerts */
@media (max-width: 768px) {
    .alert-content,
    .instructions-content {
        margin: 20px;
        width: auto;
        padding: 20px;
    }
    
    .alert-actions,
    .instructions-footer {
        flex-direction: column;
    }
    
    .instruction-step {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .step-number {
        align-self: center;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .floating-actions {
        bottom: 20px;
        right: 20px;
    }
    
    .action-btn {
        padding: 12px 16px;
        font-size: 14px;
        min-width: 100px;
    }
    
    .overlay-panel {
        top: 10px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        transform: translateY(-110%);
    }
    
    .overlay-panel:not(.collapsed) {
        transform: translateY(0);
    }
    
    .report-panel {
        width: auto;
    }
    
    .modal-content {
        margin: 20px;
        width: auto;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    /* Update panel responsive */
    .update-panel {
        width: auto;
        max-width: calc(100vw - 40px);
        margin: 0 20px;
    }
}

@media (max-width: 480px) {
    .floating-actions {
        /* Center the FAB row and respect safe-area insets on phones */
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        bottom: max(12px, env(safe-area-inset-bottom));
        width: calc(100% - 30px);
        max-width: 800px;
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 10px;
    }
    
    .action-btn {
        flex: 1 1 auto;
        max-width: 140px;
        min-width: 56px;
        padding: 10px 12px;
    }
    
    .action-btn span {
        display: none;
    }

    /* For very small screens, make buttons icon-only and slightly larger icons */
    @media (max-width: 360px) {
        .floating-actions { width: calc(100% - 20px); gap: 8px; }
        .action-btn { padding: 10px; min-width: 48px; max-width: 64px; border-radius: 50%; }
        .action-btn i { font-size: 18px; }
    }
    
    .overlay-panel {
        top: 5px;
        left: 5px;
        right: 5px;
    }
    
    /* Update panel for very small screens */
    .update-panel {
        width: auto;
        max-width: calc(100vw - 10px);
        margin: 0 5px;
    }
    
    .update-form .form-group {
        margin-bottom: 15px;
    }
    
    .update-form label {
        font-size: 14px;
    }
    
    .update-form input,
    .update-form select,
    .update-form textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
    }
    
    .panel-content {
        padding: 15px;
    }
}

/* ===== CUSTOM MAP MARKERS ===== */
.custom-marker {
    background: transparent;
    border: none;
}

.marker-inner {
    width: 35px;
    height: 35px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

.marker-inner i {
    transform: rotate(45deg);
    color: white;
    font-size: 16px;
}

/* Status badge on marker */
.marker-status-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    transform: rotate(45deg);
    z-index: 10;
}

/* Status colors */
.marker-status-badge.status-active {
    background: #d9534f;  /* Red - Active/Reported */
    animation: pulse-status 2s infinite;
}

.marker-status-badge.status-in-progress {
    background: #f0ad4e;  /* Orange - In Progress */
}

.marker-status-badge.status-resolved {
    background: #5cb85c;  /* Green - Resolved */
}

.marker-status-badge.status-false-alarm {
    background: #6c757d;  /* Gray - False Alarm */
}

@keyframes pulse-status {
    0%, 100% {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 8px rgba(217, 83, 79, 0.8);
    }
}

.marker-inner.urgency-critical {
    border: 3px solid #dc3545;
    animation: pulse-critical 2s infinite;
}

.marker-inner.urgency-high {
    border: 3px solid #fd7e14;
}

.marker-inner.urgency-medium {
    border: 3px solid #28a745;
}

.marker-inner.urgency-low {
    border: 3px solid #6c757d;
}

@keyframes pulse-critical {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(220, 53, 69, 0.8);
    }
}

/* ===== CLEAN POPUP DESIGN ===== */
.leaflet-popup.custom-popup .leaflet-popup-content-wrapper {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    border: 1px solid #e0e0e0 !important;
    padding: 0 !important;
}

.leaflet-popup.custom-popup .leaflet-popup-content {
    margin: 0 !important;
    min-width: 280px !important;
    max-width: 300px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 13px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.leaflet-popup.custom-popup .emergency-popup-clean {
    padding: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

.leaflet-popup.custom-popup .popup-header-clean {
    padding: 16px 0 !important;
    margin: 0 -16px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.leaflet-popup.custom-popup .emergency-type {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: 600 !important;
    color: #333 !important;
}

.leaflet-popup.custom-popup .emergency-type i {
    color: #2196f3 !important;
    font-size: 16px !important;
}

/* Emergency type specific icon colors */
.leaflet-popup.custom-popup .emergency-type i.fa-fire {
    color: #e74c3c !important;
}

.leaflet-popup.custom-popup .emergency-type i.fa-heart-pulse {
    color: #e91e63 !important;
}

.leaflet-popup.custom-popup .emergency-type i.fa-car-crash {
    color: #ff9800 !important;
}

.leaflet-popup.custom-popup .emergency-type i.fa-water {
    color: #2196f3 !important;
}

.leaflet-popup.custom-popup .emergency-type i.fa-house-crack {
    color: #795548 !important;
}

.leaflet-popup.custom-popup .emergency-type i.fa-shield-alt {
    color: #9c27b0 !important;
}

.leaflet-popup.custom-popup .emergency-type i.fa-gas-pump {
    color: #607d8b !important;
}

.leaflet-popup.custom-popup .emergency-type i.fa-bolt {
    color: #ffc107 !important;
}

.leaflet-popup.custom-popup .emergency-type i.fa-exclamation-triangle {
    color: #6c757d !important;
}

.leaflet-popup.custom-popup .popup-details-clean {
    padding: 12px 0 !important;
}

.leaflet-popup.custom-popup .detail-item {
    display: flex !important;
    align-items: center !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #f5f5f5 !important;
    gap: 8px !important;
}

.leaflet-popup.custom-popup .detail-item:last-child {
    border-bottom: none !important;
}

.leaflet-popup.custom-popup .detail-item .label {
    min-width: 60px !important;
    font-weight: 600 !important;
    color: #666 !important;
    font-size: 12px !important;
}

.leaflet-popup.custom-popup .detail-item .value {
    flex: 1 !important;
    color: #333 !important;
    word-break: break-word !important;
    line-height: 1.3 !important;
}

.notes-item .notes-value {
    white-space: pre-wrap;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notes-item .notes-value-full {
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: none;
    overflow: visible;
}

/* Update images inside notes section */
.notes-value-full .image-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    transition: all 0.2s ease !important;
}

.notes-value-full .image-item:hover {
    background: #e7f3ff !important;
    border-color: #0969da !important;
    box-shadow: 0 2px 6px rgba(9, 105, 218, 0.15) !important;
}

.notes-value-full .image-item .label {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.notes-value-full .image-item .label i {
    font-size: 14px !important;
}

.notes-value-full .image-item .value {
    flex: 1 !important;
    text-align: right !important;
    margin-right: 8px !important;
}

.notes-value-full .image-item .fa-chevron-right {
    font-size: 12px !important;
}

.location-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.location-details .coordinates {
    font-family: monospace;
    font-size: 0.9em;
    color: #333;
}

.location-details .address {
    font-size: 0.85em;
    color: #666;
    font-style: italic;
    line-height: 1.3;
}

.leaflet-popup.custom-popup .copy-btn-clean {
    background: none !important;
    border: 1px solid #e0e0e0 !important;
    color: #666 !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    font-size: 10px !important;
}

.leaflet-popup.custom-popup .copy-btn-clean:hover {
    background: #f0f0f0 !important;
    border-color: #ccc !important;
    color: #333 !important;
}

.image-item {
    cursor: pointer;
    background: rgba(76, 175, 80, 0.05);
    margin: 0 -16px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

/* Fix spacing for photo items that use both detail-item and image-item classes */
.detail-item.image-item {
    margin: 0 !important;
    padding: 8px !important;
}

.image-item:hover {
    background: rgba(76, 175, 80, 0.1);
}

.image-indicator {
    color: #4caf50 !important;
    font-weight: 500;
}

.update-image-item {
    cursor: pointer;
    background: rgba(76, 175, 80, 0.05);
    margin: 0 !important;
    padding: 8px !important;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.update-image-item:hover {
    background: rgba(76, 175, 80, 0.1);
}

.leaflet-popup.custom-popup .popup-footer-clean {
    padding: 12px 0 !important;
    margin: 0 -16px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    border-top: 1px solid #e9ecef !important;
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
}

.report-time {
    color: #666;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.report-time i {
    color: #888;
}

.action-btn-clean {
    /* flex: 1; */
    padding: 4px 8px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.action-btn-clean.primary {
    background: #2196f3;
    color: white;
}

.action-btn-clean.primary:hover {
    background: #1976d2;
    transform: translateY(-1px);
}

.action-btn-clean.secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e9ecef;
}

.action-btn-clean.secondary:hover {
    background: #e9ecef;
    color: #333;
}

.leaflet-popup.custom-popup .urgency-badge {
    padding: 4px 8px !important;
    border-radius: 8px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: white !important;
}

.leaflet-popup.custom-popup .urgency-badge.urgency-critical {
    background: #dc3545 !important;
}

.leaflet-popup.custom-popup .urgency-badge.urgency-high {
    background: #fd7e14 !important;
}

.leaflet-popup.custom-popup .urgency-badge.urgency-medium {
    background: #28a745 !important;
}

.leaflet-popup.custom-popup .urgency-badge.urgency-low {
    background: #6c757d !important;
}

/* Enhanced popup interaction - allow map panning */
.leaflet-popup.custom-popup {
    pointer-events: auto !important; /* Keep popup interactive */
}

.leaflet-popup.custom-popup .leaflet-popup-content-wrapper {
    pointer-events: auto !important; /* Content wrapper interactive */
}

.leaflet-popup.custom-popup .leaflet-popup-tip {
    pointer-events: none !important; /* Popup tip transparent */
}

.leaflet-popup.custom-popup .leaflet-popup-close-button {
    pointer-events: auto !important; /* Keep close button functional */
}

/* Make non-interactive content areas allow map interaction via JS */
.leaflet-popup.custom-popup .emergency-popup-clean {
    position: relative; /* Let JavaScript handle the event forwarding */
}

/* Ensure all interactive elements work properly */
.leaflet-popup.custom-popup .action-btn-clean,
.leaflet-popup.custom-popup .image-item,
.leaflet-popup.custom-popup button,
.leaflet-popup.custom-popup a,
.leaflet-popup.custom-popup input,
.leaflet-popup.custom-popup select,
.leaflet-popup.custom-popup textarea {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 1000 !important;
    cursor: pointer !important;
}

/* Ensure interactive elements have proper hover states */
.leaflet-popup.custom-popup .action-btn-clean:hover,
.leaflet-popup.custom-popup .image-item:hover,
.leaflet-popup.custom-popup button:hover {
    pointer-events: auto !important;
}

/* Make text selectable */
.leaflet-popup.custom-popup .detail-item .value {
    pointer-events: auto !important;
    user-select: text !important;
}

/* Image Preview Modal */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preview-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.preview-content img {
    max-width: 100%;
    max-height: inherit;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.close-preview {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    background: white;
    border: none;
    border-radius: 50%;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.close-preview:hover {
    transform: scale(1.1);
}

/* Copy Toast */
.copy-toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%) translateY(30px);
    background: rgba(40, 40, 40, 0.95);
    color: #fff;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* In-map progress badge for loading reports - centered at top of map */
#mapBadge {
    position: fixed;
    left: 50%;
    top: 20px;
    transform: translateX(-50%) translateY(-6px);
    background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(245,245,245,0.95));
    color: #111;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    z-index: 1200;
    pointer-events: none; /* non-blocking */
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

#mapBadge.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Map link button inside popups */
/* removed map-link-btn styles (plane button deprecated) */

/* Small location action controls next to coordinates */
.leaflet-popup.custom-popup .location-action-controls {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.leaflet-popup.custom-popup .location-map-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.leaflet-popup.custom-popup .location-map-link i {
    transform: rotate(0deg);
    font-size: 14px;
}

/* ===== UPDATE REPORT STYLES ===== */
.update-panel {
    width: 450px;
}

.update-form .form-help {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    font-style: italic;
}

/* Status indicators in reports table */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.status-badge.status-in-progress {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.status-badge.status-resolved {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.status-badge.status-false-alarm {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

/* Update history in popup */
.update-history {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.update-history-title {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.update-entry {
    font-size: 11px;
    color: #ccc;
    margin-bottom: 4px;
    padding: 4px 0;
}

.update-entry:last-child {
    margin-bottom: 0;
}

.update-status-change {
    font-weight: 600;
    color: #fff;
}

/* Form styling for update panel */
.update-form select option {
    background: #333;
    color: #fff;
}

.update-form input:focus,
.update-form select:focus,
.update-form textarea:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

/* ===== ADMIN AUTHENTICATION STYLES ===== */
.admin-control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-status-section {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    justify-content: space-between;
}

.admin-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-status.admin-active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.admin-status.admin-inactive {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

/* Hide admin-only elements by default */
.admin-only {
    display: none !important;
}

/* Admin login button styling */
#adminToggle {
    font-size: 12px;
    padding: 8px 12px;
    min-width: auto;
}

/* Admin mode indicator animation */
.admin-status i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Admin active state for buttons */
.admin-active .admin-only {
    display: block !important;
}

/* Special styling for admin buttons */
.admin-only.btn-small {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Admin Access Link */
.admin-access-link {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 10500;
}

.admin-access-link a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0f4250, #1a5f72);
    color: #ffd29a;
    border-radius: 50%;
    text-decoration: none;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(15, 66, 80, 0.4);
    transition: all 0.3s ease;
}

.admin-access-link a:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(15, 66, 80, 0.6);
    background: linear-gradient(135deg, #1a5f72, #0f4250);
}

.admin-access-link a i {
    animation: shield-pulse 2s infinite;
}

@keyframes shield-pulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Map Legend Button */
.map-legend-button {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* Auto-refresh indicator - positioned below legend button */
.auto-refresh-indicator {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 999;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #2c5282;
    animation: fadeIn 0.3s ease-in-out;
}

.auto-refresh-indicator i {
    color: #3182ce;
    font-size: 14px;
}

.auto-refresh-indicator span {
    white-space: nowrap;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left-side controls container (map type + zoom fraction) */
.map-left-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    /* Keep left controls above the map but below overlay panels/modals */
    z-index: 300; /* intentionally low so modals (z-index >=1000) cover controls when open */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Typhoon mode: hide most UI buttons to declutter the Windy iframe view
   Keep only the map type toggle visible so users can exit typhoon mode. */
body.typhoon-mode .floating-actions,
body.typhoon-mode .map-legend-button,
body.typhoon-mode .auto-refresh-indicator,
body.typhoon-mode .map-top-center-status {
    display: none !important;
}

/* In typhoon mode, hide all left-control children except the main mapTypeToggle */
body.typhoon-mode .map-left-controls > *:not(#mapTypeToggle) {
    display: none !important;
}

/* Ensure the mapTypeToggle remains visible and elevated */
body.typhoon-mode #mapTypeToggle {
    z-index: 1000; /* above the embed container */
}

/* Introduce safe-area offsets and smooth movement when overlays appear */
:root {
    --controls-offset-top: 20px;
    --controls-offset-left: 20px;
    --controls-offset-bottom: 20px;
}

.map-left-controls,
.map-top-center-status {
    transition: transform 220ms cubic-bezier(.2,.9,.2,1), top 220ms ease, bottom 220ms ease, left 220ms ease, right 220ms ease;
    will-change: transform, top, bottom, left, right;
}

/* When an overlay is active we will add .controls-offset-up or .controls-offset-down classes (JS will toggle) */
.map-left-controls.controls-offset-up { top: calc(var(--controls-offset-top) + 80px); }
.map-left-controls.controls-offset-down { bottom: calc(var(--controls-offset-bottom) + 80px); top: auto; }

/* Top-center status moved slightly when overlays appear */
.map-top-center-status.controls-offset-up { top: calc(var(--controls-offset-top) + 60px); }
.map-top-center-status.controls-offset-down { bottom: calc(var(--controls-offset-bottom) + 60px); top: auto; }

/* Respect modals with high z-index: when modal is open, we prefer to keep controls smaller and slightly transparent */
.map-left-controls.modal-open,
.map-top-center-status.modal-open {
    opacity: 0.98;
}

/* Center-top status container: placed between left controls and legend */
.map-top-center-status {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    /* Keep this below modals/toasts but above the map itself */
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* keep non-interactive unless hovered */
}

.map-top-center-status .map-status-indicator {
    pointer-events: auto; /* allow interaction with badges themselves */
}

/* Small screens: top-center and compact */
@media (max-width: 768px) {
    .map-top-center-status {
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        pointer-events: none;
        z-index: 500;
    }

    .map-top-center-status .map-status-indicator {
        gap: 15px;
    }

    .map-status-indicator .status-badge {
        font-size: 11px;
        padding: 3px 6px;
        border-radius: 10px;
    }

    .map-status-indicator .status-badge i { font-size: 11px; }
}

/* Larger screens: move to bottom-left and enlarge */
@media (min-width: 769px) {
    .map-top-center-status {
        top: auto;
        bottom: 20px;
        left: 20px;
        transform: none;
        pointer-events: none; /* container non-blocking */
        z-index: 500; /* still below modals/toasts */
    }

    .map-top-center-status .map-status-indicator {
        flex-direction: row;
        gap: 12px;
        pointer-events: auto; /* badges interactive */
    }

    .map-status-indicator .status-badge {
        font-size: 14px;
        padding: 8px 12px;
        border-radius: 14px;
        min-width: 40px;
    }

    .map-status-indicator .status-badge i { font-size: 14px; }
}

.map-type-toggle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    font-size: 18px;
}

.map-type-toggle:active {
    transform: scale(0.96);
}

/* Info button style - similar to map type toggle */
.map-info-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    color: #ff9800;
    margin-top: 8px;
}

.map-info-btn:hover {
    background: #ff9800;
    color: white;
    transform: scale(1.05);
}

.map-info-btn:active {
    transform: scale(0.96);
}

/* Evacuation Centers button - blue styling */
.evac-centers-btn {
    color: #2196F3;
}

.evac-centers-btn:hover {
    background: #2196F3;
    color: white;
}

/* Admin button - shown only when logged in */
.map-admin-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9800, #ff6f00);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    color: white;
    margin-top: 8px;
    text-decoration: none;
}

.map-admin-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.6);
}

.map-admin-btn:active {
    transform: scale(0.96);
}

.zoom-fraction {
    background: transparent; /* remove solid background to be unobtrusive */
    padding: 2px 4px; /* small hit-target padding but visually minimal */
    border-radius: 4px;
    font-weight: 600;
    color: rgba(255,255,255,0.85); /* subtle light color over map */
    font-size: 12px; /* slightly smaller */
    box-shadow: none;
    min-width: 32px;
    text-align: center;
    opacity: 0.85;
    backdrop-filter: none;
}

.zoom-fraction #zoomValue {
    display: inline-block;
    min-width: 24px;
}

/* Map status indicator badges shown near left controls */
.map-status-indicator {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    align-items: center;
}

.map-status-indicator .status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: white;
}

.map-status-indicator .status-badge i {
    font-size: 12px;
    opacity: 0.95;
}

.map-status-indicator .status-active {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.map-status-indicator .status-inprogress {
    background: linear-gradient(135deg, #f0ad4e, #e09b2b);
}

.map-status-indicator span {
    font-weight: 700;
    /* min-width: 28px; */
    text-align: right;
}

/* Status label text (shown on larger screens, hidden on compact views) */
.status-label {
    margin-left: 6px;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    max-width: 0; /* collapsed by default on small screens */
    opacity: 0;
    transform: translateY(-4px);
    transition: max-width 220ms ease, opacity 220ms ease, transform 220ms ease;
}

@media (min-width: 769px) {
    /* On larger screens the labels are always visible */
    .status-label { max-width: 200px; opacity: 1; transform: none; }
}

/* Revealed state for small screens: temporary display */
@media (max-width: 768px) {
    .status-label.revealed { max-width: 140px; opacity: 1; transform: none; }
}

/* Badge scaling animation when revealed */
.status-badge {
    transition: transform 220ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms ease, padding 220ms ease;
}

.status-badge.revealed {
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

/* When revealed on small screens increase spacing and padding to avoid overlap */
@media (max-width: 768px) {
    .map-status-indicator.revealed, .map-status-indicator.controls-offset-up {
        gap: 12px; /* increase gap between badges when revealed/offset */
    }

    .map-status-indicator .status-badge.revealed {
        padding: 6px 10px; /* make badges slightly larger to prevent text clipping */
        font-size: 12px;
        min-width: 50px;
    }

    /* Ensure labels get sufficient room when revealed */
    .status-label.revealed { max-width: 160px;
    gap: 12px; }
    
}
.legend-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0969da, #0550ae);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.legend-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(9, 105, 218, 0.3);
    background: linear-gradient(135deg, #0550ae, #033d8b);
}

/* Evacuation Centers Toggle Button - Simple fade effect */
#toggleEvacCentersBtn {
    transition: opacity 0.3s ease;
}

/* Responsive legend button for smaller screens */
@media (max-width: 768px) {
    .map-legend-button {
        top: 15px;
        right: 15px;
    }
    
    .legend-toggle-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    /* Position auto-refresh indicator below legend on smaller screens */
    .auto-refresh-indicator {
        top: 70px;
        right: 15px;
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .auto-refresh-indicator i {
        font-size: 12px;
    }
}

/* Ensure left controls align with legend on tablet */
@media (max-width: 768px) {
    .map-left-controls {
        top: 15px;
        left: 15px;
        gap: 6px;
    }

    .map-type-toggle {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .map-info-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
        margin-top: 6px;
    }

    .map-admin-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
        margin-top: 6px;
    }
}

@media (max-width: 480px) {
    .map-legend-button {
        top: 10px;
        right: 10px;
    }
    
    .legend-toggle-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    /* Position auto-refresh indicator for very small screens */
    .auto-refresh-indicator {
        top: 60px;
        right: 10px;
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .auto-refresh-indicator i {
        font-size: 11px;
    }
}

/* Ensure left controls align with legend on small phones */
@media (max-width: 480px) {
    .map-left-controls {
        top: 10px;
        left: 10px;
        gap: 6px;
    }

    .map-type-toggle {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .map-info-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
        margin-top: 5px;
        box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    }

    .map-admin-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
        margin-top: 5px;
    }

    /* Keep zoom fraction small and unobtrusive */
    .zoom-fraction {
        font-size: 11px;
        opacity: 0.8;
    }
}

/* Legend Panel */
.legend-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 380px;
    /* Use viewport aware sizing and safe-area insets so the panel never exceeds screen */
    max-height: calc(100vh - 100px);
    background: white;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 11100;
    overflow: hidden;
    transition: all 0.3s ease;
}

.legend-panel.collapsed {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px) scale(0.95);
}

/* Responsive legend panel for tablets */
@media (max-width: 768px) {
    .legend-panel {
        /* Make the legend use most of the viewport but leave space for status bar / notch */
        top: calc(12px + env(safe-area-inset-top, 0px));
        right: calc(12px + env(safe-area-inset-right, 0px));
        left: calc(12px + env(safe-area-inset-left, 0px));
        width: auto;
        max-width: calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
        /* Reserve extra space at the bottom so the legend footer doesn't overlap the floating action buttons */
        --legend-top-offset: calc(12px + env(safe-area-inset-top, 0px));
        --legend-bottom-reserve: calc(84px + env(safe-area-inset-bottom, 0px)); /* 84px default reserve for FABs + margin */
        /* Anchor using top/bottom to avoid 100vh/dynamic-viewport issues in Brave/Chromium mobile */
        top: var(--legend-top-offset);
        bottom: var(--legend-bottom-reserve);
        height: auto;
        margin: 0 auto;
        border-radius: 8px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
}

/* Responsive legend panel for mobile */
@media (max-width: 480px) {
    .legend-panel {
        top: 60px;
        right: 10px;
        left: 10px;
        width: auto;
        max-height: calc(100vh - 75px);
    }
    
    .legend-header h3 {
        font-size: 14px;
    }
    
    .legend-section h4 {
        font-size: 13px;
    }
    
    .legend-text {
        font-size: 12px;
    }
    
    .example-marker .marker-inner {
        width: 24px;
        height: 24px;
    }
    
    .example-marker .marker-inner i {
        font-size: 10px;
    }
    
    .legend-content {
        padding: 12px;
    }
    
    .legend-header {
        padding: 12px;
    }
}

/* Sticky header and safe bottom padding for legend on small screens */
@media (max-width: 768px) {
    .legend-panel {
        display: flex;
        flex-direction: column;
    }

    .legend-header {
        position: sticky;
        top: 0;
        z-index: 2;
        background: inherit; /* keep the same header background while scrolling */
    }

    .legend-content {
        /* Make content flex to fill the panel between header and bottom and scroll internally */
        flex: 1 1 auto;
        box-sizing: border-box;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.legend-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f6f8fa;
    border-bottom: 1px solid #d0d7de;
}

.legend-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #24292f;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-header h3 i {
    color: #0969da;
    font-size: 18px;
}

.close-legend-btn {
    background: none;
    border: none;
    color: #57606a;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-legend-btn:hover {
    background: #d0d7de;
    color: #24292f;
}

.legend-content {
    padding: 16px;
    /* Constrain content height and make it scroll internally so the panel fits the screen */
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.legend-section {
    margin-bottom: 24px;
}

.legend-section:last-child {
    margin-bottom: 0;
}

.legend-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #24292f;
    padding-bottom: 8px;
    border-bottom: 1px solid #d0d7de;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.legend-item-row:hover {
    background: #f6f8fa;
}

.example-marker {
    flex-shrink: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.example-marker .marker-inner {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.example-marker .marker-inner i {
    transform: rotate(45deg);
    font-size: 12px;
    color: white;
}

.example-marker .marker-status-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.legend-text {
    font-size: 13px;
    color: #24292f;
    flex: 1;
}

/* Legend scrollbar styling */
.legend-content::-webkit-scrollbar {
    width: 8px;
}

.legend-content::-webkit-scrollbar-track {
    background: #f6f8fa;
    border-radius: 4px;
}

.legend-content::-webkit-scrollbar-thumb {
    background: #d0d7de;
    border-radius: 4px;
}

.legend-content::-webkit-scrollbar-thumb:hover {
    background: #afb8c1;
}

.admin-only.btn-small:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* Admin delete button in table */
.admin-only.table-btn.delete {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.admin-only.table-btn.delete:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Map type button group (top-right) */
.map-type-buttons {
    display: flex;
    gap: 6px;
}



/* Map type menu styles */
.map-type-menu {
    position: fixed;
    top: 20px;
    right: 82px; /* place left of legend button (legend at right:20px, width ~50) */
    z-index: 1000;
}

.map-type-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 6px;
    border: none;
    background: linear-gradient(135deg, #ffffff, #f5f7fb);
    color: #333;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.map-type-toggle:focus {
    outline: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.map-type-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    display: none;
    min-width: 160px;
}

.map-type-dropdown.show {
    display: block;
}



/* Responsive placement to match legend button */
@media (max-width: 768px) {
    .map-type-menu {
        top: 15px;
        right: 70px;
    }
    .map-type-toggle {
        width: 45px;
        height: 45px;
    }
    .map-type-toggle i {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .map-type-menu {
        top: 10px;
        right: 60px;
    }
    .map-type-toggle {
        width: 40px;
        height: 40px;
    }
    .map-type-toggle i {
        font-size: 16px;
    }
}

/* ===== EVACUATION CENTER MARKERS (PUBLIC MAP) ===== */
.evac-center-marker-public {
    background: transparent;
    border: none;
}

.evac-marker-public {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.evac-marker-public:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(9, 105, 218, 0.6);
}

.evac-marker-public i {
    color: white;
    font-size: 18px;
}

/* Evacuation Center Popup Styles - Uniform with Emergency Reports */
.evac-center-popup-container .leaflet-popup-content-wrapper {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    border: 1px solid #e0e0e0 !important;
    padding: 0 !important;
}

.evac-center-popup-container .leaflet-popup-content {
    margin: 0 !important;
    min-width: 280px !important;
    max-width: 320px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 13px !important;
    padding: 0 !important;
}

.evac-center-popup {
    padding: 0 16px 16px 16px !important;
}

.evac-header {
    padding: 16px 0 !important;
    margin: 0 -16px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.evac-header h4 {
    font-size: 14px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #333 !important;
}

.evac-header i {
    color: #2196f3 !important;
    font-size: 16px !important;
}

.evac-header .status-badge {
    font-size: 10px !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.evac-status-active {
    background: #d4edda !important;
    color: #155724 !important;
    border: 1px solid #c3e6cb !important;
}

.evac-status-full {
    background: #fff3cd !important;
    color: #856404 !important;
    border: 1px solid #ffeaa7 !important;
}

.evac-status-inactive {
    background: #f8f9fa !important;
    color: #6c757d !important;
    border: 1px solid #e9ecef !important;
}

.popup-details {
    padding: 12px 0 0 0 !important;
}

.popup-details > div {
    display: flex !important;
    align-items: flex-start !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #f5f5f5 !important;
    gap: 8px !important;
    line-height: 1.4 !important;
}

.popup-details > div:last-child {
    border-bottom: none !important;
}

.popup-details strong {
    min-width: 75px !important;
    font-weight: 600 !important;
    color: #666 !important;
    font-size: 12px !important;
}

.popup-details i {
    color: #2196f3 !important;
    margin-right: 4px !important;
    font-size: 12px !important;
}

.evac-facilities {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #f5f5f5 !important;
}

.evac-facilities strong {
    min-width: 75px !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    font-weight: 600 !important;
    color: #666 !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
}

.evac-facilities strong i {
    color: #2196f3 !important;
    font-size: 12px !important;
}

.evac-facilities .facilities-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    flex: 1 !important;
}

.facility-item {
    display: inline-block !important;
    background: #f8f9fa !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    color: #495057 !important;
    margin: 0 !important;
    border: 1px solid #e9ecef !important;
    white-space: nowrap !important;
}

.facility-item i {
    color: #28a745 !important;
    font-size: 10px !important;
    margin-right: 4px !important;
}

.evac-notes {
    padding: 8px 0 !important;
    font-size: 12px !important;
    color: #666 !important;
    line-height: 1.4 !important;
    border-bottom: none !important;
}

.evac-notes i {
    color: #ffc107 !important;
    margin-right: 6px !important;
}

/* Image Preview Styles for Update Form */
.image-preview-container {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    background: #f9f9f9;
}

.image-preview-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.image-previews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.update-image-preview-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px;
    background: white;
    transition: all 0.2s;
    position: relative;
}

.update-image-preview-item:hover {
    border-color: #ff9800;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
}

.update-image-preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 6px;
}

.update-image-preview-item button {
    transition: transform 0.2s, opacity 0.2s;
}

.update-image-preview-item button:hover {
    transform: scale(1.1);
    opacity: 1 !important;
}

.update-image-preview-item button:active {
    transform: scale(0.95);
}

.update-preview-info {
    font-size: 11px;
    color: #666;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.update-preview-info span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.update-preview-size {
    color: #999;
    font-weight: 500;
}

.update-preview-loading,
.update-preview-error {
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #666;
}

.update-preview-error {
    color: #d9534f;
}

.update-preview-loading i,
.update-preview-error i {
    font-size: 20px;
}

@media (max-width: 768px) {
    .image-previews-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .update-image-preview-item img {
        height: 80px;
    }
}

