/* =========================================================
   RICERCA MOBILE - OVERLAY
   ========================================================= */

/* BASE: invisibile di default */
.search-mobile-overlay {
    display: none;
}

/* ================= MOBILE ================= */
@media (max-width: 767.98px) {

    .search-mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 6000;
        background: rgba(0,0,0,.35);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        padding: 14px;
        display: none;
        opacity: 0;
        transition: opacity .18s ease;
    }

        .search-mobile-overlay.show {
            display: flex;
            align-items: flex-start;
            justify-content: center;
            opacity: 1;
        }

    .search-mobile-box {
        width: 100%;
        max-width: 560px;
        margin-top: calc(env(safe-area-inset-top, 0px) + 10px);
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 14px 40px rgba(0,0,0,.20);
        padding: 14px;
        position: relative;
        transform: translateY(-6px);
        transition: transform .18s ease;
    }

    .search-mobile-overlay.show .search-mobile-box {
        transform: translateY(0);
    }

    .search-mobile-form {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    #searchMobileInput {
        flex: 1 1 auto;
        height: 46px;
        border-radius: 14px;
        border: 1px solid #dee2e6;
        padding: 0 14px;
        outline: none;
        font-size: 16px;
        background: #fff;
    }

        #searchMobileInput:focus {
            border-color: rgba(13,110,253,.55);
            box-shadow: 0 0 0 .18rem rgba(13,110,253,.18);
        }

    .search-mobile-btn {
        width: 46px;
        height: 46px;
        border: 0;
        border-radius: 14px;
        background: #0d6efd;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

        .search-mobile-btn i {
            font-size: 18px;
        }
}

/* ================= DESKTOP ================= */
@media (min-width: 768px) {
    #searchMobileOverlay,
    #searchMobileOverlay.show {
        display: none !important;
    }
}