@layer components {
    /* =============================================================
     * Checkout — Dirección: calle en 4 líneas como la PWA y buscador
     * de Google (Hyva_Checkout::form/field/street.phtml del tema +
     * Yeboyebo_CheckoutShopify::checkout/address-autocomplete.phtml).
     * Mismo prefijo / !important que 35-checkout-design.css.
     * ============================================================= */

    /* Tipo de vía + calle / número + resto */
    body.hyva_checkout-index-index #hyva-checkout-main .elg-street {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        gap: 0.875rem 0.75rem;
    }
    body.hyva_checkout-index-index #hyva-checkout-main .elg-street > * {
        margin: 0 !important;
        min-width: 0;
    }
    body.hyva_checkout-index-index #hyva-checkout-main .elg-street > :nth-child(odd) {
        grid-column: span 4 / span 4;
    }
    body.hyva_checkout-index-index #hyva-checkout-main .elg-street > :nth-child(even) {
        grid-column: span 8 / span 8;
    }
    @media (max-width: 479px) {
        body.hyva_checkout-index-index #hyva-checkout-main .elg-street > :nth-child(odd) {
            grid-column: span 5 / span 5;
        }
        body.hyva_checkout-index-index #hyva-checkout-main .elg-street > :nth-child(even) {
            grid-column: span 7 / span 7;
        }
    }

    /* Buscador de dirección */
    body.hyva_checkout-index-index #hyva-checkout-main .elg-addr-search {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgb(4 29 64 / 0.1);
    }
    body.hyva_checkout-index-index #hyva-checkout-main .elg-addr-search-input {
        position: relative;
    }
    body.hyva_checkout-index-index #hyva-checkout-main .elg-addr-search-input > svg {
        position: absolute;
        left: 0.875rem;
        top: 50%;
        transform: translateY(-50%);
        color: rgb(4 29 64 / 0.55);
        pointer-events: none;
    }
    body.hyva_checkout-index-index #hyva-checkout-main .elg-addr-search-input > input.form-input {
        padding-left: 2.5rem !important;
    }

    /* Sugerencias de Google, colgadas del buscador (ver adoptSuggestions) */
    body.hyva_checkout-index-index #hyva-checkout-main .elg-addr-search-input .pac-container {
        position: absolute !important;
        top: calc(100% - 1px) !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 30 !important;
        margin: 0;
        border: 1px solid rgb(4 29 64) !important;
        border-radius: 0 !important;
        box-shadow: 0 10px 24px rgb(4 29 64 / 0.12) !important;
        font-family: inherit !important;
        background: var(--color-bg);
    }
    body.hyva_checkout-index-index #hyva-checkout-main .elg-addr-search-input .pac-container::after {
        /* "powered by Google" más discreto */
        opacity: 0.6;
    }
    body.hyva_checkout-index-index #hyva-checkout-main .elg-addr-search-input .pac-item {
        padding: 0.625rem 0.875rem;
        border-top: 1px solid rgb(4 29 64 / 0.08);
        font-size: 0.8125rem;
        line-height: 1.4;
        color: rgb(4 29 64 / 0.7);
        cursor: pointer;
    }
    body.hyva_checkout-index-index #hyva-checkout-main .elg-addr-search-input .pac-item:first-child {
        border-top: 0;
    }
    body.hyva_checkout-index-index #hyva-checkout-main .elg-addr-search-input .pac-item:hover,
    body.hyva_checkout-index-index #hyva-checkout-main .elg-addr-search-input .pac-item-selected {
        background: rgb(4 29 64 / 0.05);
    }
    body.hyva_checkout-index-index #hyva-checkout-main .elg-addr-search-input .pac-item-query {
        font-size: 0.8125rem;
        color: rgb(4 29 64);
    }
    body.hyva_checkout-index-index #hyva-checkout-main .elg-addr-search-input .pac-matched {
        font-weight: 600;
    }
    body.hyva_checkout-index-index #hyva-checkout-main .elg-addr-search-input .pac-icon {
        display: none;
    }
}
