/* Locations Page - Warm & Friendly Light Theme */

/* Use the main CSS variables from styles.css */

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Map Container */
.map-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 1.5rem;
    height: calc(100vh - 220px);
    min-height: 600px;
    position: relative;
    z-index: 1;
}

/* Sidebar - Light Card */
.sidebar {
    background: var(--surface-card, #ffffff);
    border-radius: var(--radius-xl, 24px);
    border: 1px solid var(--gray-200, #eeebe7);
    padding: 1.25rem;
    overflow-y: auto;
    box-shadow: var(--shadow-lg, 0 12px 32px rgba(45, 42, 38, 0.1));
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--gray-100, #f7f5f3);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-300, #ffb4a6);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-400, #ff8c76);
}

.sidebar-header {
    margin-bottom: 0.5rem;
}

.sidebar-header h2 {
    font-family: var(--font-display, 'DM Serif Display', Georgia, serif);
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    color: var(--text-primary, #2d2a26);
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 0.5rem;
}

.search-box input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-secondary, #f7f5f3);
    border: 1px solid var(--gray-300, #e0dbd4);
    border-radius: var(--radius-md, 16px);
    color: var(--text-primary, #2d2a26);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-400, #ff8c76);
    background: var(--surface-card, #ffffff);
    box-shadow: 0 0 0 4px var(--primary-100, #ffe8e3);
}

.search-box input::placeholder {
    color: var(--text-muted, #877d6f);
}

/* Location Button */
.location-btn {
    width: 100%;
    padding: 0.7rem;
    background: var(--primary-500, #f06543);
    border: none;
    border-radius: var(--radius-full, 9999px);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(240, 101, 67, 0.3);
}

.location-btn:hover:not(:disabled) {
    background: var(--primary-600, #d94a2b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 101, 67, 0.4);
}

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

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

/* Locations List */
.locations-list {
    margin-top: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Location Card */
.location-card {
    background: var(--bg-secondary, #f7f5f3);
    border-radius: var(--radius-lg, 20px);
    padding: 1rem;
    border: 1px solid var(--gray-200, #eeebe7);
    transition: all 0.25s ease;
    cursor: pointer;
}

.location-card:hover {
    background: var(--surface-card, #ffffff);
    border-color: var(--primary-300, #ffb4a6);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg, 0 12px 32px rgba(45, 42, 38, 0.1));
}

/* Location Header */
.location-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200, #eeebe7);
}

.location-main {
    flex: 1;
}

.location-code {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-600, #d94a2b);
    margin-bottom: 0.125rem;
}

.location-name {
    color: var(--text-primary, #2d2a26);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
}

.location-distance-badge {
    background: var(--primary-100, #ffe8e3);
    color: var(--primary-700, #b73a1f);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full, 9999px);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Location Stats */
.location-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-icon {
    font-size: 1rem;
    color: var(--primary-400, #ff8c76);
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 0.8rem;
    color: var(--text-primary, #2d2a26);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Availability Colors */
.availability-high {
    color: var(--success, #22a869);
}

.availability-medium {
    color: var(--warning, #f5a623);
}

.availability-low {
    color: var(--error, #e53935);
}

/* Location Actions */
.location-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.btn-view-map,
.btn-book-location {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md, 16px);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-view-map {
    background: var(--surface-card, #ffffff);
    color: var(--text-primary, #2d2a26);
    border: 1px solid var(--gray-300, #e0dbd4);
}

.btn-view-map:hover {
    background: var(--gray-100, #f7f5f3);
    border-color: var(--primary-300, #ffb4a6);
    color: var(--primary-600, #d94a2b);
}

.btn-book-location {
    background: var(--primary-500, #f06543);
    color: white;
    box-shadow: 0 2px 8px rgba(240, 101, 67, 0.25);
}

.btn-book-location:hover {
    background: var(--primary-600, #d94a2b);
    box-shadow: 0 4px 12px rgba(240, 101, 67, 0.35);
}

/* Map Container */
#map {
    border-radius: var(--radius-xl, 24px);
    box-shadow: var(--shadow-lg, 0 12px 32px rgba(45, 42, 38, 0.1));
    border: 1px solid var(--gray-200, #eeebe7);
    overflow: hidden;
    background: var(--bg-secondary, #f7f5f3);
    position: relative;
    z-index: 1;
}

.leaflet-container {
    background: var(--bg-secondary, #f7f5f3);
    font-family: var(--font-sans, 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif);
    z-index: 1 !important;
}

/* Custom Map Controls */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: var(--shadow-md, 0 4px 12px rgba(45, 42, 38, 0.08)) !important;
}

.leaflet-control-zoom a {
    background: var(--surface-card, #ffffff) !important;
    color: var(--text-primary, #2d2a26) !important;
    border: 1px solid var(--gray-200, #eeebe7) !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 18px !important;
    transition: all 0.2s ease !important;
}

.leaflet-control-zoom a:hover {
    background: var(--primary-50, #fff5f3) !important;
    border-color: var(--primary-300, #ffb4a6) !important;
    color: var(--primary-600, #d94a2b) !important;
}

.leaflet-control-zoom a:first-child {
    border-radius: 12px 12px 0 0 !important;
}

.leaflet-control-zoom a:last-child {
    border-radius: 0 0 12px 12px !important;
}

/* Airport Markers */
.airport-marker {
    background: transparent !important;
    border: none !important;
}

.airport-marker-inner {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.airport-marker-dot {
    width: 14px;
    height: 14px;
    background: var(--primary-500, #f06543);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(240, 101, 67, 0.5),
                0 0 20px rgba(240, 101, 67, 0.2);
    transition: all 0.3s ease;
}

.airport-marker:hover .airport-marker-dot {
    transform: scale(1.3);
    box-shadow: 0 4px 16px rgba(240, 101, 67, 0.7),
                0 0 30px rgba(240, 101, 67, 0.4);
}

/* User Location Marker */
.user-marker {
    background: transparent !important;
    border: none !important;
}

.user-marker-inner {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-marker-dot {
    width: 16px;
    height: 16px;
    background: var(--secondary-500, #14b89a);
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(20, 184, 154, 0.5),
                0 0 20px rgba(20, 184, 154, 0.3);
    z-index: 2;
    position: relative;
}

.user-marker-ring {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(20, 184, 154, 0.15);
    border: 2px solid rgba(20, 184, 154, 0.4);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
}

/* Popup Styling */
.leaflet-popup-content-wrapper {
    background: var(--surface-card, #ffffff) !important;
    color: var(--text-primary, #2d2a26) !important;
    border-radius: var(--radius-lg, 20px) !important;
    border: 1px solid var(--gray-200, #eeebe7) !important;
    box-shadow: var(--shadow-xl, 0 20px 48px rgba(45, 42, 38, 0.12)) !important;
    padding: 0.75rem !important;
}

.leaflet-popup-tip {
    background: var(--surface-card, #ffffff) !important;
}

.airport-popup {
    padding: 0.75rem 1rem;
    min-width: 200px;
}

.airport-popup-code {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-600, #d94a2b);
    margin-bottom: 0.25rem;
}

.airport-popup-name {
    font-size: 0.95rem;
    color: var(--text-primary, #2d2a26);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.airport-popup-terminal {
    font-size: 0.8rem;
    color: var(--text-secondary, #5a534a);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200, #eeebe7);
}

.airport-popup-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.popup-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.popup-stat-icon {
    font-size: 1rem;
    color: var(--primary-400, #ff8c76);
}

.popup-stat-value {
    color: var(--text-primary, #2d2a26);
    font-weight: 500;
}

.user-popup {
    padding: 0.5rem 0.75rem;
}

.user-popup-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary, #2d2a26);
}

.leaflet-popup-close-button {
    color: var(--text-muted, #877d6f) !important;
    font-size: 22px !important;
    transition: color 0.2s !important;
}

.leaflet-popup-close-button:hover {
    color: var(--primary-500, #f06543) !important;
}

/* Attribution */
.leaflet-control-attribution {
    background: var(--surface-card, #ffffff) !important;
    color: var(--text-muted, #877d6f) !important;
    font-size: 10px !important;
    padding: 2px 8px !important;
    border-radius: 8px !important;
    border: 1px solid var(--gray-200, #eeebe7) !important;
}

.leaflet-control-attribution a {
    color: var(--primary-500, #f06543) !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .map-container {
        grid-template-columns: 360px 1fr;
    }
}

@media (max-width: 1024px) {
    .map-container {
        grid-template-columns: 320px 1fr;
    }
}

@media (max-width: 768px) {
    .map-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .sidebar {
        height: auto;
        max-height: 450px;
    }

    #map {
        height: 450px;
    }

    .location-actions {
        grid-template-columns: 1fr;
    }
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary, #5a534a);
    font-size: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--text-secondary, #5a534a);
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    color: var(--primary-300, #ffb4a6);
}

.empty-state-text {
    font-size: 0.95rem;
}

/* Coming Soon State */
.coming-soon-container {
    text-align: center;
    padding: 0.75rem 0.75rem;
}

.coming-soon-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.75rem;
    background: linear-gradient(135deg, var(--primary-100, #ffe8e3) 0%, var(--primary-200, #ffd4cc) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-500, #f06543);
}

.coming-soon-title {
    font-family: var(--font-display, 'DM Serif Display', Georgia, serif);
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-primary, #2d2a26);
    margin-bottom: 0.5rem;
}

.coming-soon-text {
    font-size: 0.85rem;
    color: var(--text-secondary, #5a534a);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.coming-soon-notify {
    background: var(--bg-secondary, #f7f5f3);
    border-radius: var(--radius-lg, 20px);
    padding: 0.875rem;
    margin-top: 0.5rem;
}

.notify-label {
    font-size: 0.8rem;
    color: var(--text-secondary, #5a534a);
    margin-bottom: 0.5rem;
}

.btn-notify {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: var(--primary-500, #f06543);
    color: white;
    border: none;
    border-radius: var(--radius-full, 9999px);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(240, 101, 67, 0.3);
}

.btn-notify:hover {
    background: var(--primary-600, #d94a2b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 101, 67, 0.4);
}

/* Disabled States */
.search-box input:disabled {
    background: var(--gray-100, #f7f5f3);
    color: var(--text-muted, #877d6f);
    cursor: not-allowed;
}

.location-btn:disabled {
    background: var(--gray-300, #e0dbd4);
    color: var(--text-muted, #877d6f);
    box-shadow: none;
    cursor: not-allowed;
}

.location-btn:disabled:hover {
    transform: none;
}
