/* ========================================
   VARIABLES & RESET
   ======================================== */
:root {
    /* Light Theme Colors - DINCO Brand Colors */
    --primary-color: #004a8f;  /* DINCO Blue */
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --danger-color: #ed1c24;  /* DINCO Red */
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f6;
    --bg-tertiary: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Icon Colors */
    --color-industrial: #3b82f6;
    --color-airport: #8b5cf6;
    --color-seaport: #06b6d4;
    --color-admin: #f59e0b;
    --color-hotel: #ec4899;
    
    /* Sizes */
    --header-height: 70px;
    --sidebar-width: 360px;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    --primary-color: #0066cc;  /* DINCO Blue (lighter for dark mode) */
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --danger-color: #ed1c24;  /* DINCO Red */
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --bg-tertiary: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border-color: #4b5563;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

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

/* ========================================
   MAP CONTAINER
   ======================================== */
/* .map-container now handled by Tailwind classes (fixed positioning) */

#map {
    width: 100%;
    height: 100%;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity var(--transition-speed);
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay p {
    margin-top: 1rem;
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

/* Map Controls */
.map-controls {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
}

.btn-control {
    width: 44px;
    height: 44px;
    border: none;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
    font-size: 1.1rem;
}

.btn-control:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* ========================================
   INFO CARD
   ======================================== */
/* Info Card - Old Modal Style (Keep for compatibility) */
.info-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    background-color: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    z-index: 3000;
    overflow: hidden;
    transition: all var(--transition-speed);
}

.info-card.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.9);
}

/* Info Card - Top-Left Fixed Position (v2.7.0.2: More Compact) */
.info-card-fixed {
    position: fixed;
    top: calc(var(--header-height) + 20px);
    left: calc(var(--sidebar-width) + 20px);
    width: 340px; /* Reduced from 320px */
    max-height: calc(100vh - var(--header-height) - 40px);
    background-color: var(--bg-primary);
    border-radius: 10px;
    box-shadow: var(--shadow-xl);
    z-index: 2500;
    overflow: hidden;
    transition: all var(--transition-speed);
    border: 2px solid var(--primary-color);
}

.info-card-fixed.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-30px);
}

/* v2.7.0: Dragging state */
.info-card-fixed.dragging {
    transition: none; /* Disable transitions while dragging */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.info-card-fixed.dragging .info-card-header {
    cursor: grabbing !important;
}

/* v2.7.0: Minimized state - only show header */
.info-card-fixed.minimized {
    max-height: 60px;
}

.info-card-fixed.minimized .info-card-body,
.info-card-fixed.minimized .info-card-actions-fixed {
    display: none;
}

.info-card-fixed.minimized #minimizeCard i {
    transform: rotate(180deg); /* Flip icon when minimized */
}

/* Adjust when sidebar is collapsed */

.info-card-header {
    padding: 0.75rem 1rem; /* v2.7.0.2: Further reduced */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.info-card-header h2 {
    font-size: 1rem; /* v2.7.0.2: Reduced from 1.25rem */
    font-weight: 700;
    flex: 1;
    margin-right: 8px;
}

/* v2.7.0: Card controls container */
.card-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-close,
.btn-minimize {
    width: 28px; /* v2.7.0.2: Reduced from 32px */
    height: 28px;
    border: none;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
    font-size: 0.875rem; /* v2.7.0.2: Reduced from 1rem */
}

.btn-close:hover,
.btn-minimize:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.info-card-body {
    padding: 0.75rem; /* v2.7.0.2: Reduced from 1rem */
    max-height: calc(85vh - 100px);
    overflow-y: auto;
}

.info-section {
    margin-bottom: 1rem; /* v2.7.0.2: Reduced from 1.5rem */
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h3 {
    font-size: 0.8rem; /* v2.7.0.2: Reduced from 1rem */
    font-weight: 600;
    margin-bottom: 0.65rem; /* v2.7.0.2: Reduced from 1rem */
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.info-section h3 i {
    color: var(--primary-color);
    font-size: 0.75rem; /* v2.7.0.2: Added smaller icon */
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem; /* v2.7.0.2: Reduced from 1rem */
}

.info-label {
    font-size: 0.7rem; /* v2.7.0.2: Reduced from 0.8rem */
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    font-size: 0.8rem; /* v2.7.0.2: Reduced from 0.95rem */
    color: var(--text-primary);
    font-weight: 600;
}

/* Tag List */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem; /* v2.7.0.2: Reduced from 0.5rem */
}

.tag {
    padding: 0.3rem 0.6rem; /* v2.7.0.2: Reduced from 0.4rem 0.8rem */
    background-color: var(--bg-secondary);
    border-radius: 15px;
    font-size: 0.7rem; /* v2.7.0.2: Reduced from 0.85rem */
    font-weight: 500;
    color: var(--text-primary);
}

/* Connections List */
.connections-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* v2.7.0.2: Reduced from 0.75rem */
}

.connection-item {
    display: flex;
    align-items: center;
    gap: 0.65rem; /* v2.7.0.2: Reduced from 1rem */
    padding: 0.6rem; /* v2.7.0.2: Reduced from 0.875rem */
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
    cursor: pointer;
}

.connection-item:hover {
    background-color: var(--bg-tertiary);
    transform: translateX(4px);
}

.connection-icon {
    width: 32px; /* v2.7.0.2: Reduced from 40px */
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.95rem; /* v2.7.0.2: Reduced from 1.2rem */
}

.connection-icon.airport {
    background-color: rgba(139, 92, 246, 0.15);
    color: var(--color-airport);
}

.connection-icon.seaport {
    background-color: rgba(6, 182, 212, 0.15);
    color: var(--color-seaport);
}

.connection-icon.admin {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--color-admin);
}

.connection-icon.hotel {
    background-color: rgba(236, 72, 153, 0.15);
    color: var(--color-hotel);
}

.connection-info {
    flex: 1;
}

.connection-name {
    font-size: 0.75rem; /* v2.7.0.2: Reduced from 0.95rem */
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.connection-distance {
    font-size: 0.7rem; /* v2.7.0.2: Reduced from 0.8rem */
    color: var(--text-secondary);
}

.connection-distance i {
    margin-right: 0.25rem;
}

/* Info Actions */
.info-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--transition-speed);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-tertiary);
    transform: translateY(-2px);
}

/* ========================================
   CUSTOM LEAFLET STYLES
   ======================================== */
/* Modern Marker Styles */
.custom-icon-wrapper {
    background: transparent;
    border: none;
}

.modern-marker {
    width: 36px;
    height: 36px;
    border-radius: 50% 50% 50% 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transform: rotate(-45deg);
    border: 3px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modern-marker:hover {
    transform: rotate(-45deg) scale(1.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.modern-marker i {
    transform: rotate(45deg);
}

.industrial-marker {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.airport-marker {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.seaport-marker {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.admin-marker {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.hotel-marker {
    background: linear-gradient(135deg, #ec4899, #db2777);
}
.construction-marker {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}
.closed-marker {
    background: linear-gradient(135deg, #40403f, #363636);
}
.planning-marker {
    background: linear-gradient(135deg, #0e7618, #048906);
}
/* Distance Label Styles */
.distance-label-wrapper {
    background: transparent;
    border: none;
}

.distance-label {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    border: 2px solid white;
}

.leaflet-popup-content-wrapper {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.leaflet-popup-tip {
    background-color: var(--bg-primary);
}

.popup-content {
    padding: 0.5rem;
}

.popup-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.popup-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.popup-btn {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.popup-btn:hover {
    background-color: #1d4ed8;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
    .logo h1 {
        font-size: 1.2rem;
    }
    
    }

@media (max-width: 768px) {
    .logo h1 {
        display: none;
    }
    
    .info-card-fixed {
        left: 10px !important;
        right: 10px;
        width: calc(100% - 20px);
        top: calc(var(--header-height) + 10px);
        max-height: calc(100vh - var(--header-height) - 75px);
    }
    
    .footer-compact .footer-content {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }
    
    .footer-item {
        font-size: 0.7rem;
    }
    
    .footer-logo {
        height: 22px;
    }
    
    .footer-copyright {
        width: 100%;
        text-align: center;
        margin-left: 0;
        margin-top: 0.25rem;
    }
    
    .map-type-label i {
        font-size: 1rem;
    }
    
    .info-card {
        width: 95%;
        max-height: 90vh;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .info-actions {
        flex-direction: column;
    }
    
    .map-controls {
        bottom: 1rem;
        right: 1rem;
    }
}

@media (max-width: 480px) {
    
    
    .footer-item:not(.footer-copyright) {
        flex: 0 0 calc(50% - 0.5rem);
    }
    
    .info-card-body {
        padding: 1rem;
    }
}

/* ========================================
   FOOTER - COMPACT VERSION
   ======================================== */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    z-index: 900;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-compact .footer-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.6rem 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.footer-logo {
    height: 28px;
    width: auto;
}

.footer-item i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

.footer-copyright {
    font-size: 0.7rem;
    margin-left: auto;
}

/* Adjust main container to account for compact footer */
.main-container {
    display: flex;
    margin-top: var(--header-height);
    height: calc(100vh - var(--header-height) - 45px);
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}
/* ========================================
   ADDITIONAL STYLES FOR V2.6
   ======================================== */

/* Language Selector */
.language-selector:hover {
    border-color: var(--primary-color);
}

.language-selector:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 74, 143, 0.1);
}

/* Sidebar Header with Toggle */
.sidebar-header .sidebar-header .btn-icon:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.sidebar-header .btn-icon:hover i {
    color: white;
}

.sidebar-header .btn-icon i {
    font-size: 16px; /* Larger icon */
    color: var(--primary-color);
    transition: all 0.3s;
}

/* sidebar collapsed icon – handled by toggleSidebar() in app.js */
.sidebar.collapsed .btn-icon i {
    color: #004a8f;
}

/* Sidebar Collapsed State – toggle handled by #toggleBtn (header) and #sidebarFloatBtn (floating) */

/* Map should occupy full width when sidebar collapsed */

/* Mobile: when sidebar is open, prevent map from capturing taps */
@media (max-width: 768px) {
    .sidebar:not(.collapsed) {
        box-shadow: var(--shadow-xl);
    }
}

.sidebar.collapsed /* Map Container Full Width when Sidebar Collapsed */
.main-container {
    display: flex;
    transition: all 0.3s ease;
}

/* Region Info Card */
.region-info-header h4 {
    margin: 0;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
}

.btn-close-small {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-close-small:hover {
    background: var(--bg-secondary);
    color: var(--danger-color);
}

/* Each row: icon | label | value (right aligned) */
.region-info-body 

/* allow long labels to wrap, keep value right aligned */
.region-info-body .info-item span {
    white-space: normal;
    line-height: 1.2;
}

.region-info-body .info-item strong {
    justify-self: end;
    text-align: right;
    max-width: 52%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.region-info-body .info-item i {
    color: var(--primary-color);
    width: 22px;
    text-align: center;
}

.region-info-body .info-item span {
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.region-info-body .info-item strong {
    justify-self: end;
    color: var(--text-primary);
    font-weight: 700;
    white-space: nowrap;
}

/* Contact Dropdown */
.contact-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.contact-button .fa-chevron-down {
    font-size: 12px;
    transition: transform 0.3s;
}

.contact-button.active .fa-chevron-down {
    transform: rotate(180deg);
}

.contact-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 5px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 10;
}

.contact-dropdown.hidden {
    display: none;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border-color);
}

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

.contact-item:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.contact-item i {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

/* Info Actions with Dropdown */
.info-actions {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .region-info-body 

    .contact-dropdown {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 320px;
    }
}
/* Info Card với Fixed Actions Bar */
.info-card-fixed {
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.info-card-body {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px; /* Space for fixed actions */
}

.info-card-scroll {
    padding: 1.5rem;
}

/* Fixed Actions Bar at Bottom */
.info-card-actions-fixed {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem;
    background: var(--bg-primary);
    border-top: 2px solid var(--border-color);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    z-index: 10;
    display: flex;
    gap: 10px;
}

.info-card-actions-fixed .btn {
    flex: 1;
    white-space: nowrap;
}

.info-card-actions-fixed .contact-button {
    position: relative;
}

/* Contact Dropdown positioning for fixed actions */
.info-card-actions-fixed .contact-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 8px;
}

/* Ensure buttons are side by side */
.info-card-actions-fixed {
    flex-wrap: nowrap !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .info-card-actions-fixed {
        padding: 0.75rem 1rem;
        gap: 8px;
    }
    
    .info-card-actions-fixed .btn {
        font-size: 14px;
        padding: 8px 12px;
    }
}

/* === Tailwind Hybrid helpers (v2.6.6) === */

/* Sidebar collapsed helper (kept for map fullscreen) */
body.sidebar-collapsed .map-container { left: 0 !important; width: 100% !important; margin-left: 0 !important; }
body.sidebar-collapsed #map { width: 100% !important; }

/* Sidebar section collapse helpers */
.section-body { transition: all 0.2s ease; }


/* Footer mobile optimization */
@media (max-width: 768px) {
    .footer-compact .footer-content {
        flex-direction: row;
        flex-wrap: wrap; /* v2.7.0.3: Allow wrapping if needed */
        gap: 0.75rem; /* v2.7.0.3: Increased from 0.5rem */
        padding: 0.75rem 1rem;
        justify-content: center; /* v2.7.0.3: Center items */
    }
    
    .footer-item {
        font-size: 13px; /* v2.7.0.3: Increased from 11px */
        padding: 0;
    }
    
    .footer-copyright {
        font-size: 13px; /* v2.7.0.3: Increased from 11px */
        flex-basis: 100%; /* v2.7.0.3: Force copyright to new line if too long */
        text-align: center; /* v2.7.0.3: Center copyright text */
    }
    
    .footer-logo {
        height: 28px; /* v2.7.0.3: Increased from 24px */
        width: auto;
    }
    
    .footer-item i {
        font-size: 12px; /* v2.7.0.3: Increased from 11px */
    }
}

/* Sidebar collapse animation */
.sidebar {
    transition: transform 0.3s ease-in-out;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}


/* NOTE: #sidebarToggle removed; float button is #sidebarFloatBtn (see index.html inline CSS) */

/* ========================================
   v2.7.0: KCN Map Labels (Tooltips)
   ======================================== */
.kcn-label {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) !important;
    padding: 4px 6px !important; /* Reduced from 8px 12px */
    font-size: 9px !important; /* Reduced from 12px */
    line-height: 1.2 !important; /* Reduced from 1.4 */
    white-space: nowrap !important;
    pointer-events: none !important;
    z-index: 600 !important;
}

.kcn-label::before {
    border-right-color: rgba(255, 255, 255, 0.95) !important;
}

.kcn-label-content {
    text-align: left;
}

.kcn-label-content strong {
    font-size: 9px; /* Reduced from 13px */
    color: #1e293b;
    display: block;
    margin-bottom: 2px; /* Reduced from 4px */
    font-weight: 600;
}

.kcn-label .label-price,
.kcn-label .label-occupancy {
    font-size: 8px; /* Reduced from 11px */
    color: #64748b;
    display: block;
    line-height: 1.3;
}

.kcn-label .label-price {
    color: #059669; /* Green for price */
    font-weight: 500;
}

.kcn-label .label-occupancy {
    color: #2563eb; /* Blue for occupancy */
    font-weight: 500;
}

/* Hide labels at low zoom to reduce clutter */
@media (max-width: 768px) {
    .kcn-label {
        font-size: 10px !important;
        padding: 6px 8px !important;
    }
    
    .kcn-label-content strong {
        font-size: 11px;
    }
}


/* ========================================
   v2.7.0.2: FIX Map Full Screen
   ======================================== */
/* Map container adjusts based on sidebar state */
.map-container {
    transition: left 0.3s ease-in-out;
}

/* When sidebar is collapsed, map goes full screen */
body.sidebar-collapsed .map-container {
    left: 0 !important;
}

/* When sidebar is visible, map starts after sidebar */
body:not(.sidebar-collapsed) .map-container {
    left: 360px !important;
}


/* v2.7.0.2: Description text styling */
.info-section p {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-secondary);
}


/* ── ISLAND MARKERS (Hoàng Sa / Trường Sa) ────────────────────────────────── */
.island-marker {
    background: linear-gradient(135deg, #0d9488, #0f766e);
}

.island-label {
    background: rgba(13, 148, 136, 0.92) !important;
    border: 1.5px solid #0f766e !important;
    border-radius: 6px !important;
    padding: 3px 7px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    pointer-events: none !important;
    box-shadow: 0 2px 6px rgba(13,148,136,0.35) !important;
    letter-spacing: 0.3px;
}
.island-label::before {
    border-right-color: rgba(13, 148, 136, 0.92) !important;
}

/* Island marker pulse ring (sovereignty indicator) */
.island-marker-wrap {
    position: relative;
    width: 32px;
    height: 32px;
}
.island-marker-wrap::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50% 50% 50% 0;
    border: 2px solid rgba(13,148,136,0.4);
    animation: island-pulse 2s ease-in-out infinite;
}
@keyframes island-pulse {
    0%, 100% { opacity: 0.6; transform: scale(1) rotate(-45deg); }
    50%       { opacity: 0.1; transform: scale(1.3) rotate(-45deg); }
}
