/* Google Maps Modal Styles */
/* Simple, clean modal styling */

.maps-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.maps-modal.active {
    display: flex;
    opacity: 1;
}

.maps-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.maps-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    width: 800px;
    max-height: 90vh;
    overflow: hidden;
    margin: auto;
}

.maps-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #1a365d 0%, #2d5a87 100%);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.maps-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.maps-modal-title i {
    color: #ff6b35;
}

.maps-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    /* Ensure entire button area is clickable */
    box-sizing: border-box;
    /* Improve touch/click target */
    min-width: 48px;
    min-height: 48px;
    /* Ensure proper positioning */
    position: relative;
    z-index: 10;
    /* Prevent text selection */
    user-select: none;
    /* Remove any default margins */
    margin: 0;
}

.maps-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg) scale(1.1);
}

.maps-modal-body {
    padding: 2rem;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.maps-container {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 60vh;
}

.maps-container iframe {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border: none;
    border-radius: 8px;
}

.maps-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    background: #ffffff;
}

.maps-directions-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #ff6b35 0%, #e55a2b 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.maps-directions-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    color: white;
    text-decoration: none;
}

.maps-address-info {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
}

.maps-address-info strong {
    color: #333;
}

/* Address Link Styling */
.map-link {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

.map-link:hover {
    color: #ff6b35 !important;
    text-decoration: none !important;
    transform: translateX(3px);
}

.map-link::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ff6b35;
    transition: width 0.3s ease;
}

.map-link:hover::after {
    width: 100%;
}

/* Body scroll prevention when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .maps-modal-content {
        width: 95vw;
        max-height: 95vh;
        margin: 2.5vh auto;
    }
    
    .maps-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .maps-modal-title {
        font-size: 1.1rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .maps-modal-close {
        width: 52px;
        height: 52px;
        padding: 1rem;
        font-size: 1.75rem;
    }
    
    .maps-modal-body {
        padding: 1.5rem;
        max-height: calc(95vh - 100px);
    }
    
    .maps-container {
        max-height: 50vh;
    }
    
    .maps-container iframe {
        height: 300px;
        width: 100%;
    }
    
    .maps-directions-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .maps-modal-content {
        width: 98vw;
        margin: 1vh auto;
        max-height: 98vh;
    }
    
    .maps-modal-header {
        padding: 1rem;
    }
    
    .maps-modal-title {
        font-size: 1rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: calc(100% - 60px);
    }
    
    .maps-modal-close {
        width: 48px;
        height: 48px;
        padding: 0.75rem;
        font-size: 1.5rem;
    }
    
    .maps-modal-body {
        padding: 1rem;
        max-height: calc(98vh - 80px);
    }
    
    .maps-container iframe {
        height: 250px;
        width: 100%;
    }
    
    .maps-directions-btn {
        width: 100%;
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
}

/* Simple animation */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.maps-modal.active .maps-modal-content {
    animation: modalSlideIn 0.3s ease;
}