/*
Theme Name: Astra Child
Template: astra
*/

/* Match Header Background to Trust Bar (#f8fafc) */
.main-header-bar, 
.ast-primary-header-bar,
.main-header-bar-wrap {
    background-color: #f8fafc !important;
}

/* Match Header Buttons to Hero Buttons Shape and Style */
.ast-custom-button-link,
.uagb-modal-button-link.wp-block-button__link,
#block-103 .wp-block-button__link,
.ast-header-button-1 .ast-custom-button,
.header-button-inline .ast-custom-button {
    border-radius: 0.75rem !important;
    font-weight: 700 !important;
    padding: 1rem 2rem !important;
    transition: all 0.3s ease !important;
}

.ast-custom-button-link:hover,
.uagb-modal-button-link.wp-block-button__link:hover,
#block-103 .wp-block-button__link:hover {
    transform: translateY(-2px) !important;
}

/* Adjust Menu Link Text Color for Visibility */
.main-header-menu .menu-link,
.ast-header-menu-1 .menu-item > .menu-link,
.main-navigation a {
    color: #1e293b !important;
    font-weight: 500 !important;
}

.main-header-menu .menu-link:hover,
.ast-header-menu-1 .menu-item:hover > .menu-link,
.main-navigation a:hover {
    color: #8a63d2 !important;
}

/* Custom Native Dialog Modal Styles */
#gv-booking-dialog::backdrop {
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

#gv-booking-dialog {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hide Astra header and footer in iframe context */
.is-iframe-context body,
.is-iframe-context #page {
    background-color: #ffffff !important;
}

.is-iframe-context .site-header,
.is-iframe-context .site-footer,
.is-iframe-context #colophon,
.is-iframe-context #mysticky-nav,
.is-iframe-context .secondary-header-bar,
.is-iframe-context .ast-menu-toggle {
    display: none !important;
}

/* 
 * Fix for Astra Transparent Header positioning leak on non-homepage pages.
 * Restores the header to the standard document flow, preventing it from 
 * overlapping or covering the main content, especially when it wraps.
 */
.ast-theme-transparent-header:not(.home) #masthead {
    position: relative !important;
}

/* 
 * Option 1: Header & Nav Compactness Fixes (Revised for strict nowrap & separation)
 */

/* 1. Force the hours text to display on a single line, adjust flex columns, and add generous spacing */
.uagb-block-0ad197dc .uagb-ifb-title {
    white-space: nowrap !important;
}

.wp-block-uagb-container.uagb-block-d15d0506 {
    flex: 1.3 1 auto !important;
    min-width: max-content !important;
    margin-right: 28px !important; /* Adds clear separation so hours are not too close to the phone number */
}

.wp-block-uagb-container.uagb-block-55d7831a {
    flex: 0.7 1 auto !important;
    min-width: max-content !important;
}

/* 2. Force the primary header grid row to layout in a single line on desktop (No Wrap) */
@media (min-width: 922px) {
    .ast-builder-grid-row-has-sides.ast-builder-grid-row-no-center,
    .ast-builder-grid-row {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        width: 100% !important;
    }

    .site-header-primary-section-left {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .site-header-primary-section-right {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        flex: 0 0 auto !important;
    }

    /* 3. Force main navigation menu and its list to never wrap on desktop */
    .main-navigation, 
    .main-header-bar-navigation,
    .main-header-menu,
    .ast-builder-menu-1 .main-header-menu {
        flex-wrap: nowrap !important;
        display: flex !important;
    }

    .main-header-menu .menu-link,
    .ast-header-menu-1 .menu-item > .menu-link {
        padding-left: 9px !important;
        padding-right: 9px !important;
        font-size: 14.5px !important; /* Slightly smaller for a perfect premium fit */
        white-space: nowrap !important; /* Force each menu item to display on a single line (no multi-line words!) */
    }
}

/* Allow text wrapping in all sub-menus/dropdowns to prevent text from overflowing the dropdown background */
.main-header-menu .sub-menu .menu-link,
.ast-header-menu-1 .sub-menu .menu-item > .menu-link {
    white-space: normal !important;
    text-wrap: wrap !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}



/* 4. Make utility icons (Search, Account, Cart) more compact and highly visible */
.ast-header-search,
.ast-header-account,
.ast-header-woo-cart {
    padding-left: 5px !important;
    padding-right: 5px !important;
    margin: 0 !important;
}

/* --- High-Contrast Header Icons & Hover Effects --- */

/* A. Search Icon Style */
.ast-header-search .ast-search-menu-icon .ast-icon svg,
.ast-header-search .ast-search-menu-icon .ast-icon svg path,
.ast-header-search .ast-icon-search svg,
.ast-header-search .ast-icon-search svg path,
.ast-header-search svg,
.ast-header-search svg path {
    fill: #1e293b !important;
    color: #1e293b !important;
    transition: all 0.3s ease !important;
}

.ast-header-search .ast-search-menu-icon:hover svg,
.ast-header-search .ast-search-menu-icon:hover svg path,
.ast-header-search:hover svg,
.ast-header-search:hover svg path {
    fill: #8a63d2 !important;
    color: #8a63d2 !important;
}

/* B. Account Icon Style */
.ast-header-account .ast-header-account-link svg,
.ast-header-account .ast-header-account-link svg path,
.ast-header-account .account-icon,
.ast-header-account .account-icon path,
.ast-header-account-link svg,
.ast-header-account-link svg path {
    fill: #1e293b !important;
    color: #1e293b !important;
    transition: all 0.3s ease !important;
}

.ast-header-account-link:hover svg,
.ast-header-account-link:hover svg path,
.ast-header-account:hover svg,
.ast-header-account:hover svg path {
    fill: #8a63d2 !important;
    color: #8a63d2 !important;
}

/* C. WooCommerce Cart Icon & Outline Style */
.ast-header-woo-cart .cart-container svg,
.ast-header-woo-cart .cart-container svg path,
.ast-header-woo-cart .astra-icon,
.ast-header-woo-cart .astra-icon svg,
.ast-header-woo-cart .astra-icon svg path {
    fill: #1e293b !important;
    color: #1e293b !important;
    transition: all 0.3s ease !important;
}

.ast-header-woo-cart .cart-container:hover svg,
.ast-header-woo-cart .cart-container:hover svg path {
    fill: #8a63d2 !important;
    color: #8a63d2 !important;
}

/* Force filled cart block on local to render as a crisp outline style */
.ast-header-woo-cart .ast-addon-cart-wrap i.ast-icon-shopping-cart,
.ast-site-header-cart.ast-menu-cart-fill .ast-addon-cart-wrap i {
    background-color: transparent !important;
    border: 2px solid #1e293b !important;
    border-radius: 50% !important;
    width: 38px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #1e293b !important;
    position: relative !important;
    transition: all 0.3s ease !important;
}

.ast-header-woo-cart .ast-addon-cart-wrap:hover i.ast-icon-shopping-cart,
.ast-site-header-cart.ast-menu-cart-fill .ast-addon-cart-wrap:hover i {
    border-color: #8a63d2 !important;
    color: #8a63d2 !important;
    background-color: transparent !important;
}

/* Highly visible cart count badge */
.ast-header-woo-cart .ast-addon-cart-wrap [data-cart-total]::after,
.ast-header-woo-cart .ast-addon-cart-wrap i::after,
.ast-header-woo-cart .ast-addon-cart-wrap i[data-cart-total]::after,
.ast-site-header-cart-li .ast-addon-cart-wrap [data-cart-total]::after {
    background-color: #8a63d2 !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    width: 17px !important;
    height: 17px !important;
    line-height: 17px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    border: 1.5px solid #f8fafc !important; /* Blends badge cleanly into the local greyish background */
    box-shadow: 0 2px 4px rgba(133, 17, 248, 0.3) !important;
}

/* Force WooCommerce cart background and hover states to match the header's greyish background (#f8fafc) */
.ast-menu-cart-fill .ast-cart-menu-wrap .count, 
.ast-menu-cart-fill .ast-cart-menu-wrap, 
.ast-menu-cart-fill .ast-addon-cart-wrap .ast-woo-header-cart-info-wrap, 
.ast-menu-cart-fill .ast-addon-cart-wrap,
.ast-site-header-cart.ast-menu-cart-fill .ast-addon-cart-wrap,
.ast-site-header-cart .ast-addon-cart-wrap {
    background-color: #f8fafc !important;
    background: #f8fafc !important;
}

.ast-menu-cart-fill .ast-site-header-cart-li:hover .ast-cart-menu-wrap .count, 
.ast-menu-cart-fill .ast-site-header-cart-li:hover .ast-cart-menu-wrap, 
.ast-menu-cart-fill .ast-site-header-cart-li:hover .ast-addon-cart-wrap, 
.ast-menu-cart-fill .ast-site-header-cart-li:hover .ast-addon-cart-wrap .ast-woo-header-cart-info-wrap, 
.ast-menu-cart-fill .ast-site-header-cart-li:hover .ast-addon-cart-wrap i.astra-icon:after,
.ast-site-header-cart.ast-menu-cart-fill .ast-site-header-cart-li:hover .ast-addon-cart-wrap,
.ast-site-header-cart .ast-site-header-cart-li:hover .ast-addon-cart-wrap {
    background-color: #f8fafc !important;
    background: #f8fafc !important;
}

/* 5. Make translation menu item compact by showing flag icon only */
.menu-item-gtranslate > a {
    padding-left: 5px !important;
    padding-right: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
}

.menu-item-gtranslate > a span {
    display: none !important;
}

.menu-item-gtranslate > a::after,
.menu-item-gtranslate .dropdown-menu-toggle {
    display: none !important;
}

.menu-item-gtranslate img {
    margin: 0 !important;
    vertical-align: middle !important;
}

/* --- Prescreening Modal & Iframe Responsive Sizing --- */

/* Sizing and positioning for native dialog modal */
#gv-booking-dialog {
    width: 92% !important;
    max-width: 850px !important;
    height: 85vh !important;
    max-height: 85vh !important;
    margin: auto !important;
    border: none !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

@media (max-width: 767px) {
    #gv-booking-dialog {
        width: 96% !important;
        height: 90vh !important;
        max-height: 90vh !important;
        border-radius: 16px !important;
    }
}

/* Inside the iframe context, make the container take full width, remove double shadows/borders, and optimize padding */
.is-iframe-context #primary,
.is-iframe-context .site-main {
    padding: 0 !important;
    margin: 0 !important;
}

.is-iframe-context div[class*="max-w-"] {
    max-width: 100% !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 24px 16px !important; /* Extremely neat and compact padding on mobile */
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
}

@media (min-width: 768px) {
    .is-iframe-context div[class*="max-w-"] {
        padding: 32px !important;
    }
}

/* Fix WooCommerce grid class conflicts with Tailwind column utilities */
.woocommerce .columns-1, .woocommerce.columns-1,
.woocommerce .columns-2, .woocommerce.columns-2,
.woocommerce .columns-3, .woocommerce.columns-3,
.woocommerce .columns-4, .woocommerce.columns-4,
.woocommerce .columns-5, .woocommerce.columns-5,
.woocommerce .columns-6, .woocommerce.columns-6 {
    columns: auto !important;
    column-count: auto !important;
}

/* Fix mobile menu toggle / dropdown chevrons color so they are visible on mobile */
@media (max-width: 921px) {
    .main-header-menu .menu-item-has-children > .ast-menu-toggle,
    .ast-builder-menu-mobile .main-navigation .menu-item.menu-item-has-children > .ast-menu-toggle,
    .ast-builder-menu-1 .menu-item > .ast-menu-toggle {
        color: #1e293b !important;
    }
}

