/* filtered-map.css */

/* Map container styling with elliptical border */
#filtered-connection-map {
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(113, 57, 1, 0.3);
    border: 4px solid #713901;
    background: radial-gradient(ellipse at center, #f5f5dc 0%, #e6d7c3 100%);
    position: relative;
}

/* Add vintage map effect */
#filtered-connection-map::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at center, 
            transparent 0%, 
            rgba(113, 57, 1, 0.05) 50%,
            rgba(113, 57, 1, 0.1) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Style for the map's watermark effect */
#filtered-connection-map::after {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 2px solid rgba(113, 57, 1, 0.2);
    pointer-events: none;
    z-index: 2;
}

/* Add subtle hover effect for the map container */
#filtered-connection-map:hover {
    box-shadow: 0 12px 24px rgba(113, 57, 1, 0.4);
    transform: scale(1.01);
    transition: all 0.3s ease;
}

/* Make the map resemble an antique globe */
#filtered-connection-map .maplibregl-canvas-container {
    border-radius: 50%;
}

#filtered-connection-map .maplibregl-canvas {
    border-radius: 50%;
}

/* Style for select dropdown */
#category-filter {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #713901;
    border-radius: 8px;
    font-size: 14px;
    background-color: rgba(246, 240, 228, 0.9);
    color: #713901;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23713901' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 45px;
}

#category-filter:hover {
    background-color: rgba(210, 180, 140, 0.2);
    border-color: #713901;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#category-filter:focus,
#category-filter:focus-visible {
    border-color: #713901;
    outline: none;
    background-color: rgba(210, 180, 140, 0.2);
    box-shadow: 0 0 0 3px rgba(196, 154, 108, 0.4);
}

/* Style for dropdown options */
#category-filter option {
    background-color: #F6F0E4;
    color: #713901;
    padding: 8px;
}

#category-filter option:hover,
#category-filter option:focus,
#category-filter option:checked {
    background-color: rgba(113, 57, 1, 0.2) !important;
    color: #713901;
}

/* Override browser's default select option hover styles */
select#category-filter option:hover {
    background-color: rgba(113, 57, 1, 0.2) !important;
    color: #713901 !important;
}

/* For webkit browsers (Chrome, Safari) */
#category-filter::-webkit-scrollbar {
    width: 10px;
}

#category-filter::-webkit-scrollbar-track {
    background: #F6F0E4;
}

#category-filter::-webkit-scrollbar-thumb {
    background: rgba(113, 57, 1, 0.3);
    border-radius: 5px;
}

#category-filter::-webkit-scrollbar-thumb:hover {
    background: rgba(113, 57, 1, 0.5);
}

.map-control-panel h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.map-control-panel h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #555;
    font-size: 16px;
}

.map-control-panel select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Node marker animations */
.node-marker {
    transition: all 0.3s ease;
    cursor: pointer;
}

.node-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(113, 57, 1, 0.4);
}

/* MapLibre popup styling */
.maplibregl-popup-content {
    padding: 10px;
    border-radius: 4px;
}

.maplibregl-popup-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.maplibregl-popup-content p {
    margin: 0;
    font-size: 14px;
}

/* Top routes list styling */
#routes-list {
    max-height: 300px;
    overflow-y: auto;
    transition: opacity 0.3s ease;
}

#routes-list > div {
    margin: 8px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    transition: all 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#routes-list > div:hover {
    background: #e9ecef;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(113, 57, 1, 0.1);
}

/* Category-specific colors */
.category-verduras {
    color: #228B22;
}

.category-condimentos {
    color: #DAA520;
}

.category-carnes {
    color: #DC143C;
}

.category-lacteos {
    color: #87CEEB;
}

/* Tutorial animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(30px);
    }
}