/* ========================================
   LEGACY LINE CONTACT POPUP STYLES
   Brand Colors: Blue (#003DA5) & Orange (#F7931E)
   DROPDOWN STYLE - Appears below Contact Us button
   VERSION 2.0 - Google Maps API
   ======================================== */

/* Overlay - Now transparent, just for clicking outside */
.contact-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.contact-popup-overlay.active {
    opacity: 1;
    visibility: visible;
    margin-top: 5px;
}

@media (max-width: 990px) {
    .contact-popup-overlay {
        display: none !important;
    }
}

/* Popup Container - Dropdown Style */
.contact-popup {
    position: absolute;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 61, 165, 0.25);
    width: 340px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(0, 61, 165, 0.1);
}

.contact-popup-overlay.active .contact-popup {
    transform: translateY(0);
    opacity: 1;
}

/* Arrow pointing to button */
.contact-popup::before {
    content: '';
    position: absolute;
    top: -8px;
    right: var(--arrow-offset, 20px);
    width: 16px;
    height: 16px;
    background: #FFFFFF;
    border-left: 1px solid rgba(0, 61, 165, 0.1);
    border-top: 1px solid rgba(0, 61, 165, 0.1);
    transform: rotate(45deg);
}

/* Close Button */
.contact-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #F5F8FC;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    color: #003DA5;
}

.contact-popup__close svg {
    width: 18px;
    height: 18px;
}

.contact-popup__close:hover {
    background: #E8EFF8;
    transform: rotate(90deg);
}

.contact-popup__close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Content Container */
.contact-popup__content {
    padding: 24px 20px 20px;
}

/* Title */
.contact-popup__title {
    font-size: 20px;
    font-weight: 700;
    color: #003DA5;
    margin: 0 0 18px 0;
    letter-spacing: -0.3px;
    line-height: 1.2;
    padding-right: 24px;
}

/* Section */
.contact-popup__section {
    margin-bottom: 18px;
}

.contact-popup__section:last-of-type {
    margin-bottom: 18px;
}

/* Section Title */
.contact-popup__section-title {
    font-size: 11px;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0 0 10px 0;
}

/* Social Links */
.contact-popup__social {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.contact-popup__social-link {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #003DA5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    text-decoration: none;
}

.contact-popup__social-link:hover {
    background: #0052CC;
    border-color: #F7931E;
    transform: translateY(-2px);
}

.contact-popup__social-link:active {
    transform: translateY(0);
}

.contact-popup__social-link img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.contact-popup__social-link span {
    font-size: 12px;
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
}

/* ========================================
   GOOGLE MAPS API - DESKTOP POPUP
   ======================================== */

/* Map Container */
.contact-popup__map-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #E8EFF8;
    box-shadow: 0 2px 8px rgba(0, 61, 165, 0.08);
    cursor: pointer;
    margin-bottom: 12px; /* Space before address */
}

/* Map Div (Google Maps renders here) */
.contact-popup__map {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    cursor: pointer;
}

/* Style Google Maps controls */
.contact-popup__map .gm-style .gmnoprint,
.contact-popup__map .gm-style .gm-style-cc {
    display: none !important;
}

/* Location - Text Fallback (when no map) */
.contact-popup__location {
    display: flex;
    gap: 10px;
    padding: 14px;
    background: #F5F8FC;
    border-radius: 12px;
    border: 1px solid #E8EFF8;
}

.contact-popup__location-icon {
    flex-shrink: 0;
    color: #F7931E;
    margin-top: 2px;
    width: 18px;
    height: 18px;
}

.contact-popup__address {
    font-style: normal;
    font-size: 13px;
    line-height: 1.5;
    color: #4A5568;
    margin: 0;
}

/* CTA Button */
.contact-popup__cta {
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, #003DA5 0%, #0052CC 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(0, 61, 165, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-popup__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 61, 165, 0.3);
    background: linear-gradient(135deg, #0052CC 0%, #003DA5 100%);
}

.contact-popup__cta:active {
    transform: translateY(0);
}

.contact-popup__cta-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Custom Scrollbar */
.contact-popup::-webkit-scrollbar {
    width: 4px;
}

.contact-popup::-webkit-scrollbar-track {
    background: #F5F8FC;
}

.contact-popup::-webkit-scrollbar-thumb {
    background: #003DA5;
    border-radius: 2px;
}

.contact-popup::-webkit-scrollbar-thumb:hover {
    background: #0052CC;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .contact-popup {
        width: 320px;
    }
}

/* Mobile - Full width bottom sheet */
@media (max-width: 480px) {
    .contact-popup-overlay {
        background-color: rgba(0, 61, 165, 0.1);
    }

    .contact-popup {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 85vh;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
    }

    .contact-popup::before {
        display: none;
    }

    .contact-popup-overlay.active .contact-popup {
        transform: translateY(0);
    }

    .contact-popup__content {
        padding: 28px 24px 24px;
    }

    .contact-popup__title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .contact-popup__close {
        top: 14px;
        right: 14px;
        width: 34px;
        height: 34px;
    }

    .menu-email-container-mobile .open-contact-popup {
        display: none !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .contact-popup-overlay,
    .contact-popup,
    .contact-popup__close,
    .contact-popup__social-link,
    .contact-popup__cta {
        transition: none;
    }

    .contact-popup__close:hover {
        transform: none;
    }

    .contact-popup__social-link:hover,
    .contact-popup__cta:hover {
        transform: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .contact-popup,
    .contact-popup__social-link,
    .contact-popup__location,
    .contact-popup__map-wrapper {
        border: 2px solid #003DA5;
    }
}

/* ========================================
   MOBILE MENU CONTACT SECTION
   ======================================== */

.mobile-contact-section {
    display: none;
    padding: 32px 0 28px;
    background: #FFFFFF;
    border-top: 2px solid #E8EFF8;
    margin-top: 20px;
}

.menu-is-open .mobile-contact-section {
    display: block;
}

.mobile-contact__section {
    margin-bottom: 28px;
}

.mobile-contact__section:last-of-type {
    margin-bottom: 24px;
}

.mobile-contact__title {
    font-size: 11px;
    font-weight: 700;
    color: #003DA5;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 14px 0;
}

/* Social Links */
.mobile-contact__social {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.mobile-contact__social-link {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #003DA5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 61, 165, 0.15);
}

.mobile-contact__social-link:hover,
.mobile-contact__social-link:active {
    background: #0052CC;
    border-color: #F7931E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 61, 165, 0.25);
}

.mobile-contact__social-link img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.mobile-contact__social-link span {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
}

/* ========================================
   GOOGLE MAPS API - MOBILE MENU
   ======================================== */

.mobile-contact__map-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #E8EFF8;
    box-shadow: 0 2px 8px rgba(0, 61, 165, 0.08);
    cursor: pointer;
    margin-bottom: 14px;
}

.mobile-contact__map {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    cursor: pointer;
}

.mobile-contact__map .gm-style .gmnoprint,
.mobile-contact__map .gm-style .gm-style-cc {
    display: none !important;
}

/* Location Text (Mobile) */
.mobile-contact__location {
    display: flex;
    gap: 14px;
    padding: 18px;
    background: #F5F8FC;
    border-radius: 14px;
    border: 1px solid #E8EFF8;
    box-shadow: 0 2px 6px rgba(0, 61, 165, 0.05);
}

.mobile-contact__location-icon {
    flex-shrink: 0;
    color: #F7931E;
    margin-top: 3px;
    width: 20px;
    height: 20px;
}

.mobile-contact__address {
    font-style: normal;
    font-size: 14px;
    line-height: 1.7;
    color: #4A5568;
    margin: 0;
    font-weight: 400;
}

/* CTA Button */
.mobile-contact__cta {
    width: 100%;
    max-width: 280px;
    padding: 18px 24px;
    background: linear-gradient(135deg, #003DA5 0%, #0052CC 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(0, 61, 165, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.mobile-contact__cta:hover,
.mobile-contact__cta:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 61, 165, 0.35);
    background: linear-gradient(135deg, #0052CC 0%, #003DA5 100%);
}

.mobile-contact__cta-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}
