@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Custom marker styles */
.marker-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
}

.marker-past {
    background-color: #9ca3af;
}

.marker-next {
    background-color: #10b981;
}

.marker-upcoming {
    background-color: #ef4444;
}

/* Sidebar dropdown animation */
.sidebar-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding-top: 0;
    padding-bottom: 0;
}

.sidebar-dropdown-content.active {
    max-height: 300px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.toggle-dropdown {
    transition: transform 0.3s ease;
}

.toggle-dropdown.rotated {
    transform: rotate(180deg);
}

/* Custom Leaflet popup styles */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.leaflet-popup-content {
    margin: 16px;
    line-height: 1.5;
}

.popup-title {
    color: #d90429;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
}

.popup-info {
    color: #374151;
    font-size: 14px;
    margin-bottom: 4px;
}

.popup-link {
    color: #d90429;
    text-decoration: none;
    font-weight: 500;
}

.popup-link:hover {
    text-decoration: underline;
}

.timezone-indicator {
    background: #f3f4f6;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 16px;
}

/* Race status indicators */
.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 12px;
}

.status-past {
    background-color: #9ca3af;
}

.status-next {
    background-color: #10b981;
}

.status-upcoming {
    background-color: #ef4444;
}

/* Sidebar collapse functionality */
.sidebar-container {
    transition: all 0.3s ease-in-out;
    position: relative;
    height: 100%;
}

.sidebar-container::before,
.sidebar-container::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 20px;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.sidebar-container::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15), transparent);
}

.sidebar-container::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.15), transparent);
}

.sidebar-container.show-top-shadow::before {
    opacity: 1;
}

.sidebar-container.show-bottom-shadow::after {
    opacity: 1;
}

.sidebar-container.sidebar-collapsed {
    display: none;
}

.sidebar-toggle {
    position: absolute;
    left: 16px;
    background: white;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 5px rgba(0,0,0,0.2);
    line-height: 1;
}

.sidebar-toggle:hover {
    background: #f9fafb;
}

.sidebar-toggle svg {
    width: 18px;
    height: 18px;
    color: #333;
    display: block;
}

/* Map expand button */
.map-expand-button {
    position: absolute;
    top: 10px; /* Adjusted positioning */
    left: 10px;
    z-index: 1000;
    background: white;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 1px 5px rgba(0,0,0,0.2);
    display: none;
    line-height: 1;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
}

.map-expand-button:hover {
    background: #f9fafb;
}

.map-expand-button svg {
    width: 18px;
    height: 18px;
    color: #333;
}

.sidebar-collapsed ~ #mapContainer .map-expand-button {
    display: flex;
}



@media (max-width: 768px) {
    .sidebar-collapsed ~ #mapContainer {
        margin: 0 !important;
        height: 100vh !important;
    }
    
    .sidebar-collapsed ~ #mapContainer #map {
        height: 100vh !important;
        border-radius: 0 !important;
    }
}

#shareButton {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
