/* ============================================================================
   WHEN IT WAS - DESKTOP SPECIFIC STYLES
   Desktop-only components: Modal, Desktop Sidebar
   ============================================================================ */

/* ==================== DESKTOP MODAL ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 3000; /* Above desktop sidebar (2100) and timeline (1999) */
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(42, 42, 42, 0.98);
    border-radius: 12px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(212, 165, 116, 0.3);
}

.modal-header {
    position: relative;
    padding: 0;
}

.modal-photo {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.modal-body {
    padding: 25px;
}

.modal-title {
    font-size: 24px;
    color: var(--color-primary);
    margin-bottom: 5px;
}

.modal-address {
    font-size: 16px;
    color: var(--color-text-secondary);
    margin-bottom: 25px;
}

.modal-section {
    margin-bottom: 25px;
}

.modal-section h3 {
    font-size: 18px;
    color: var(--color-primary);
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(212, 165, 116, 0.2);
    padding-bottom: 8px;
}

/* ==================== DESKTOP LOCATION SIDEBAR ==================== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.location-sidebar {
    position: fixed;
    top: 0;
    right: -550px;
    width: 500px;
    height: 100vh;
    background: rgba(42, 42, 42, 0.98);
    border-left: 1px solid rgba(212, 165, 116, 0.3);
    z-index: 2000;
    overflow-y: auto;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.5);
    padding-bottom: 120px; /* Space for timeline */
}

.location-sidebar.active {
    right: 0;
}

.sidebar-header {
    position: relative;
    padding: 0;
}

.sidebar-photo {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.sidebar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.sidebar-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.sidebar-content {
    padding: 25px;
    transition: opacity 0.15s ease;
}

.sidebar-title {
    font-size: 24px;
    color: var(--color-primary);
    margin-bottom: 5px;
}

.sidebar-address {
    font-size: 16px;
    color: var(--color-text-secondary);
    margin-bottom: 25px;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section h3 {
    font-size: 18px;
    color: var(--color-primary);
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(212, 165, 116, 0.2);
    padding-bottom: 8px;
}

/* Ensure timeline stays below desktop sidebar (override mobile !important) */
@media (min-width: 769px) {
    .timeline-container {
        position: relative; /* CRITICAL: Enable z-index to work */
        z-index: 1999 !important;
    }
}

/* ==================== DESKTOP MEDIA QUERY ==================== */
@media (min-width: 769px) {
    /* Hide mobile-only components on desktop */
    .bottom-sheet,
    .bottom-sheet-overlay,
    .floating-info-card {
        display: none !important;
    }
}
