﻿
/* Mobile Search V3 */

.public-mobile-search {
    direction: rtl;
    overflow: hidden;
    background: rgba(250, 248, 244, .97);
    border-top: 1px solid #E9E1D6;
    box-shadow: 0 12px 25px rgba(41, 39, 36, .07);
    transform-origin: top center;
}

    .public-mobile-search[hidden] {
        display: none !important;
    }

.public-mobile-search__inner {
    padding: 15px 16px 18px;
}

.public-mobile-search__form {
    display: flex;
    align-items: center;
    gap: 9px;
}

.public-mobile-search__field {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    min-height: 48px;
    padding: 0 13px;
    background: #fff;
    border: 1px solid #E9E1D6;
    border-radius: 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

    .public-mobile-search__field:focus-within {
        border-color: #B79B78;
        box-shadow: 0 0 0 3px rgba(183, 155, 120, .12);
    }

.public-mobile-search__icon {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    color: #8A6B46;
}

.public-mobile-search__input {
    width: 100%;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: 0;
    box-shadow: none;
    font-size: 13px;
    color: #292724;
}

    .public-mobile-search__input::placeholder {
        color: #998D7E;
    }

.public-mobile-search__submit {
    min-height: 48px;
    padding: 0 17px;
    border-radius: 13px;
    background: #8A6B46;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

    .public-mobile-search__submit:active {
        transform: scale(.97);
    }

    .public-mobile-search__submit:hover {
        background: #705436;
    }

.public-mobile-search.is-opening {
    animation: mobileSearchOpen .28s cubic-bezier(.2, .8, .2, 1) both;
}

.public-mobile-search.is-closing {
    animation: mobileSearchClose .2s ease-in both;
}

@keyframes mobileSearchOpen {
    from {
        opacity: 0;
        transform: translateY(-12px) scaleY(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
}

@keyframes mobileSearchClose {
    from {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }

    to {
        opacity: 0;
        transform: translateY(-8px) scaleY(.97);
    }
}

/* Dark Mode */
.dark .public-mobile-search {
    background: #211F1D;
    border-color: #423B33;
}

.dark .public-mobile-search__field {
    background: #292724;
    border-color: #423B33;
}

.dark .public-mobile-search__input {
    color: #F5EFE7;
}

@media (prefers-reduced-motion: reduce) {
    .public-mobile-search.is-opening,
    .public-mobile-search.is-closing {
        animation: none;
    }
}
