/* ============================================
   MAP CONTAINER - INDEPENDENT STYLES
   Modern, isolated CSS that doesn't affect parent styles
   ============================================ */

/* Map Container Base */
.map-container {
    position: relative;
    width: 100%;
    margin-top: 1rem;
    isolation: isolate; /* Creates new stacking context */
}

/* Map iframe styling */
.map-container iframe {
    display: block;
    width: 100%;
    height: 180px;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.map-container iframe:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Button Wrapper */
.map-btn-wrapper {
    position: relative;
    margin-top: 0.5rem;
}

/* Main Button */
.map-btn-wrapper > button {
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #fefeff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.map-btn-wrapper > button:hover {
    background-color: #007bff;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.map-btn-wrapper > button:active {
    transform: translateY(0);
}

.map-btn-wrapper > button i {
    font-size: 1rem;
}

/* Map Options Dropdown */
.map-options {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    overflow: hidden;
}

.map-btn-wrapper:hover .map-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Map Option Items */
.map-option-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: #333333;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

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

.map-option-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
    transform: translateX(5px);
}

.map-option-item i {
    font-size: 1.5rem;
    width: 2rem;
    text-align: center;
    flex-shrink: 0;
}

.map-option-item i.fa-google {
    color: #4285F4;
}

.map-option-item i.fa-waze {
    color: #33CCFF;
}

.map-option-item:hover i {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Map Option Text */
.map-option-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.map-option-text strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: inherit;
}

.map-option-text span {
    font-size: 0.8rem;
    color: #666666;
}

.map-option-item:hover .map-option-text span {
    color: #007bff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .map-container iframe {
        height: 200px;
    }
    
    .map-btn-wrapper > button {
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
    }
    
    .map-option-item {
        padding: 0.9rem;
    }
}

/* Dark Theme Support (optional) */
@media (prefers-color-scheme: dark) {
    .map-options {
        background-color: #2d2d2d;
    }
    
    .map-option-item {
        color: #e0e0e0;
        border-bottom-color: #404040;
    }
    
    .map-option-item:hover {
        background-color: #3a3a3a;
    }
    
    .map-option-text span {
        color: #a0a0a0;
    }
}

/* Accessibility */
.map-btn-wrapper > button:focus,
.map-option-item:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Animation for smoother interactions */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.map-btn-wrapper:hover .map-options {
    animation: fadeInDown 0.3s ease forwards;
}