/*
Theme Name: Tourze Lite Child
Template: tourze-lite
*/

.wp-block-cover {
    max-width: 100% !important;
}

/* Decreases horizontal spacing to make the overall bar shorter */
.wpml-ls-statics-shortcode_html2 li a,
.wpml-ls-item a {
    padding-left: 6px !important;
    padding-right: 6px !important;
}

/* ==========================================================================
   Structural Layout Override for Tourze Lite Footer
   ========================================================================== */

/* 1. Force the inner constrained parent containers to expand to full width */
footer .wp-block-group.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* 2. Break down the specific inner flex stack layouts used for the link lists */
footer .wp-block-column .wp-block-group.is-vertical.is-layout-flex {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* 3. Strip structural alignment offsets on the Poppins paragraph selectors */
footer .wp-block-column p.has-poppins-font-family {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    width: 100% !important;
}

/* ==========================================================================
   WPML MULTILINGUAL MOBILE-ONLY DONATION BUTTON (TOURZE LITE)
   ========================================================================== */

/* 1. HIDE ON DESKTOP (Screens 768px and wider) */
@media screen and (min-width: 1251px) {
    li.mobile-donation-btn,
    li.wp-block-navigation-item.mobile-donation-btn,
    .wp-block-navigation li.mobile-donation-btn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* 2. CONVERT TO BUTTON ON MOBILE (Screens 767px and smaller) */
@media screen and (max-width: 1250px) {
    /* Target the list container item */
    li.mobile-donation-btn,
    li.wp-block-navigation-item.mobile-donation-btn {
        display: block !important; 
        visibility: visible !important;
        opacity: 1 !important;
        margin-top: 20px !important;  /* Adds clean spacing below your menu list */
        margin-bottom: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Target the text link container inside the navigation element */
    li.mobile-donation-btn a.wp-block-navigation-item__content,
    li.wp-block-navigation-item.mobile-donation-btn a,
    .mobile-donation-btn a {
        display: block !important;
        width: 100% !important;               
        text-align: center !important;
        background-color: #ffffff !important; /* Your theme button color */
        color: #3daede !important;            /* Pure white text */
        padding: 20px 17px !important;        /* Thick button sizing for mobile fingers */
        border-radius: 50px !important;        /* Smooth clean rounded corners */
        font-weight: bold !important;
        text-decoration: none !important;
        box-sizing: border-box !important;
        transition: background-color 0.2s ease !important;
    }
    
    /* Target the inner text element wrapper just in case */
    li.mobile-donation-btn span.wp-block-navigation-item__label {
        color: #3daede !important;
        font-weight: bold !important;
    }
    
    /* Active feedback layer when tapped on a touch screen */
    li.mobile-donation-btn a.wp-block-navigation-item__content:active,
    li.mobile-donation-btn a.wp-block-navigation-item__content:focus {
        background-color: #ffffff !important; /* Balanced lighter grey feedback tint */
    }
}

.wp-container-core-group-is-layout-23441af8 {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.wp-container-core-group-is-layout-9fbc9eab > :where(:not(.alignleft):not(.alignright):not(.alignfull)), 
.wp-container-core-group-is-layout-83ca9efd > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 1440px !important;
}

#wcdp_2-button {
    border-radius: 9999px;
}

@media (max-width: 767px) {
    /* 5. BRAND LOGO SCALING */
    .header-logo-container a img {
        max-height: 50px !important;
        height: 50px !important;
    }
}

@media (max-width: 1250px) {
    /* 1. FORCE THE SUBMENU WRAPPER TO COLLAPSE COMPLETELY BY DEFAULT */
    .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* 2. REVEAL NESTED LINKS ONLY WHEN THE USER PRESSES THE ITEM */
    /* This leverages Gutenberg's interactive class hooks (.is-menu-open on individual elements) */
    .wp-block-navigation-item.has-child.is-menu-open > .wp-block-navigation__submenu-container,
    .wp-block-navigation-item.has-child:focus-within > .wp-block-navigation__submenu-container {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        overflow: visible !important;
        position: relative !important; /* Forces row restructuring beneath it */
    }
}

.woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout {
    display: none !important;
}

/* Hide this specific inline text error message */
p.checkout-inline-error-message {
    display: none !important;
}

/* Instantly highlight the corresponding text box with a red border */
.form-row:has(.checkout-inline-error-message) input,
.form-row:has(.checkout-inline-error-message) select,
.form-row:has(.checkout-inline-error-message) textarea {
    border: 2px solid #cc0000 !important;
    background-color: #fff5f5 !important;
}

/* 🎯 1. REVERSE THE ORIGINAL CORE RULE BETWEEN 600PX AND 1250PX */
@media (min-width: 600px) and (max-width: 1250px) {
    .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
        display: none !important; /* Force hide horizontal links, keep mobile behavior active */
        position: fixed !important; /* Reset position properties back to overlay defaults */
    }
}

/* 🎯 2. APPLY THE ORIGINAL DESKTOP PROPERTIES ONLY AT 1251PX AND ABOVE */
@media (min-width: 1251px) {
    .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
        background-color: inherit !important;
        display: block !important;
        position: relative !important;
        width: 100% !important;
        z-index: auto !important;
    }
}

@media (max-width: 1250px) {
    body .hide-in-mobile {
        display: none !important;
    }
}

/* 🎯 OVERRIDE HAMBURGER: Keep mobile toggle button visible under 1251px */
@media (max-width: 1250px) {
    .wp-block-navigation__responsive-container-open:not(.always-shown) {
        display: block !important;
        display: flex !important; /* Forces layout centering/alignment safety */
    }
}

/* 🎯 APPLY ORIGINAL CORE HIDE CONDITIONAL ONLY AT 1251PX AND ABOVE */
@media (min-width: 1251px) {
    .wp-block-navigation__responsive-container-open:not(.always-shown) {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .wp-elements-a1d53a4e40fc4939f47b18d106d7818b, 
    .page-id-21 .wp-elements-8b7813b20e197e42c6bac140bee644c2 {
        line-height: 0.2 !important;
    }
}

/* 🎯 FOOTER ACCORDION MOBILE STYLING */
@media screen and (max-width: 767px) {
    
    /* 1. Stack the layout columns cleanly on top of each other */
    .wp-block-columns.is-layout-flex {
        flex-direction: column !important;
        gap: 15px !important;
    }

    /* 2. Format headings as clickable buttons with indicator spacing */
    h3.wp-block-heading.accordion-header-toggle {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        cursor: pointer !important;
        padding: 12px 0 !important;
        margin: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.1); /* Subtle divider line */
        user-select: none;
    }

    /* 3. Inject the default collapsed status indicator (+) */
    h3.wp-block-heading.accordion-header-toggle::after {
        content: "+";
        font-size: 16px;
        font-weight: 400;
        color: inherit;
        transition: transform 0.2s ease;
    }

    /* 4. Switch the indicator to open status (−) when active */
    h3.wp-block-heading.accordion-header-toggle.is-active::after {
        content: "\2212"; /* Clean Unicode minus sign */
    }

    /* 5. Add internal indent tracking space around open link items */
    .wp-block-column .wp-block-group.is-vertical.is-nowrap:last-child {
        padding: 10px 5px 15px 5px !important;
    }

    .homepage-text,
    main.wp-block-group {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .page-id-21 .wp-block-cover .wp-container-core-cover-is-layout-8a15ffc1 h1.wp-elements-b2d1896539b542758ffe46a2716e186f {
        font-size: 80px !important;
    }

    .page-id-21 .homepage-support-us,
    .page-id-21 .homepage-legacy{
        line-height: 1.0 !important;
    }

    .page-id-21 h1.homepage-hkm,
    .page-id-21 p.homepage-hkm {
        font-size: 32px !important;
    }
}

@media screen and (max-width: 569px) {
    
}