/* LieferKalle homepage hero only. Keep search/results styling out of this file. */
.portal-theme--lieferkalle .kalle-home .kalle-hero {
    position: relative;
    min-height: 570px;
    overflow: hidden;
    isolation: isolate;
}

.portal-theme--lieferkalle .kalle-home .kalle-hero.kalle-hero--search-open {
    overflow: visible;
    z-index: 20;
}

.portal-theme--lieferkalle .kalle-home .kalle-hero__image {
    position: absolute;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
}

.portal-theme--lieferkalle .kalle-home .kalle-hero::before {
    z-index: 1;
    background: linear-gradient(90deg, rgba(255,247,237,.98) 0%, rgba(255,247,237,.94) 35%, rgba(255,247,237,.54) 57%, rgba(255,247,237,.08) 76%, rgba(255,247,237,0) 100%);
    opacity: 1;
    pointer-events: none;
}

.portal-theme--lieferkalle .kalle-home .kalle-hero__grid {
    position: relative;
    z-index: 2;
}

.portal-theme--lieferkalle .kalle-home .kalle-hero__copy {
    position: relative;
    z-index: 3;
}

.portal-theme--lieferkalle .kalle-home .kalle-search {
    z-index: 30;
}

.portal-theme--lieferkalle .kalle-home .kalle-search__panel {
    z-index: 40;
}

.portal-theme--lieferkalle .kalle-home .kalle-hero__visual {
    pointer-events: none;
}

@media (max-width: 850px) {
    .portal-theme--lieferkalle .kalle-home .kalle-hero {
        min-height: 0;
    }

    .portal-theme--lieferkalle .kalle-home .kalle-hero::before {
        background: linear-gradient(90deg, rgba(255,247,237,.98) 0%, rgba(255,247,237,.91) 58%, rgba(255,247,237,.48) 100%);
    }

    .portal-theme--lieferkalle .kalle-home .kalle-hero__image {
        object-position: 62% center;
    }

    /*
     * Keyboard-safe mobile location search, matching the established
     * LieferWiki interaction: focusing the field promotes the search to a
     * fixed sheet below the persistent header and keeps suggestions scrollable.
     */
    .portal-theme--lieferkalle .kalle-home .kalle-search:focus-within {
        position: fixed;
        z-index: 1200;
        top: 4.5rem;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: none;
        height: auto;
        max-height: calc(100dvh - 4.5rem);
        margin: 0;
        padding: 0.75rem 0.75rem max(0.75rem, env(safe-area-inset-bottom));
        overflow: hidden;
        background: #fff;
        overscroll-behavior: contain;
    }

    .portal-theme--lieferkalle .kalle-home .kalle-search:focus-within .lw2-location__form {
        position: relative;
        z-index: 2;
        flex: 0 0 auto;
        width: 100%;
        margin: 0;
        padding: 0;
        background: #fff;
    }

    .portal-theme--lieferkalle .kalle-home .kalle-search:focus-within .kalle-search__panel {
        position: relative;
        inset: auto;
        z-index: 1;
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
        max-height: none;
        margin-top: 0.75rem;
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        border-radius: 14px;
        box-shadow: none;
    }

    .portal-theme--lieferkalle .kalle-home .kalle-search:focus-within .portal-location-gate__results,
    .portal-theme--lieferkalle .kalle-home .kalle-search:focus-within .portal-location-gate__recent {
        padding-bottom: 1rem;
    }

    .portal-theme--lieferkalle .kalle-home .kalle-search:focus-within .portal-location-gate__results button,
    .portal-theme--lieferkalle .kalle-home .kalle-search:focus-within .portal-location-gate__recent button,
    .portal-theme--lieferkalle .kalle-home .kalle-search:focus-within .portal-location-gate__geo {
        min-height: 56px;
    }
}

@media (max-width: 560px) {
    .portal-theme--lieferkalle .kalle-home .kalle-hero::before {
        background: rgba(255,247,237,.90);
    }

    .portal-theme--lieferkalle .kalle-home .kalle-hero__image {
        object-position: 68% center;
    }

    .portal-theme--lieferkalle .kalle-home .kalle-search:focus-within {
        padding-right: 0.625rem;
        padding-left: 0.625rem;
    }
}
