/* Mobile search icon + popup
 * Added 2026-05-31 — Monday item 12148751454
 * Brand palette: red #de0025 / black / white.
 * Shows search trigger next to mobile hamburger; opens centered modal popup.
 */

/* Wrap mob_menu_add_class so icon + hamburger sit side by side */
.mob_menu_add_class {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.but_mob_search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: transparent;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: opacity .15s ease;
}

.but_mob_search:hover,
.but_mob_search:focus {
    opacity: .75;
    color: #fff;
    text-decoration: none;
}

.but_mob_search svg {
    display: block;
    width: 24px;
    height: 24px;
}

/* If the existing hamburger has a specific dark background context,
   keep the icon visible. Underscores Bootstrap header has light bg in
   some templates — try to inherit color from the surrounding nav link. */
.header__main .but_mob_search {
    color: inherit;
}

/* ---------- Popup ---------- */
.mob-search-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 16px 16px;
    direction: rtl;
}

.mob-search-popup[hidden] { display: none; }

.mob-search-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .62);
    cursor: pointer;
    -webkit-backdrop-filter: blur(2px);
            backdrop-filter: blur(2px);
}

.mob-search-popup__modal {
    position: relative;
    width: 100%;
    max-width: 520px;
    background: #fff;
    border: 1px solid #000;
    border-top: 4px solid #de0025;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    padding: 28px 22px 22px;
    animation: mobSearchIn .18s ease-out;
}

@keyframes mobSearchIn {
    from { transform: translateY(-12px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

.mob-search-popup__close {
    position: absolute;
    top: 6px;
    left: 10px;
    background: transparent;
    border: 0;
    font-size: 30px;
    line-height: 1;
    color: #000;
    cursor: pointer;
    padding: 4px 10px;
    transition: color .15s ease;
}

.mob-search-popup__close:hover { color: #de0025; }

.mob-search-popup__title {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 700;
    color: #000;
    text-align: right;
}

.mob-search-popup__form {
    display: flex;
    align-items: stretch;
    gap: 8px;
    direction: rtl;
}

.mob-search-popup__input {
    flex: 1 1 auto;
    height: 46px;
    padding: 0 14px;
    font-size: 16px;
    border: 1px solid #000;
    border-radius: 8px;
    background: #fff;
    color: #000;
    direction: rtl;
    text-align: right;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.mob-search-popup__input:focus {
    border-color: #de0025;
    box-shadow: 0 0 0 2px rgba(222, 0, 37, .15);
}

.mob-search-popup__submit {
    flex: 0 0 auto;
    width: 50px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: #de0025;
    color: #fff;
    cursor: pointer;
    transition: background .15s ease;
}

.mob-search-popup__submit:hover,
.mob-search-popup__submit:focus { background: #b00521; }

/* Prevent body scroll while popup is open */
body.mob-search-open {
    overflow: hidden;
}

/* Hide on tablets/desktops as a safety net even if PHP container changes */
@media (min-width: 768px) {
    .but_mob_search { display: none; }
}
