/*==================================================
PRORIDE SMART AJAX SEARCH
==================================================*/

.proride-search{
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    direction:rtl;
    z-index:999999;
    isolation:isolate;
}

.proride-search *{
    box-sizing:border-box;
}

.proride-search-toggle{
    width:54px;
    height:54px;
    border:0;
    border-radius:999px;
    background:#ed1d24;
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    cursor:pointer;
    padding:0;
    box-shadow:0 16px 35px rgba(237,29,36,.32);
    transition:
        transform .3s ease,
        background .3s ease,
        box-shadow .3s ease,
        width .35s ease;
}

.proride-search-toggle:hover{
    transform:translateY(-2px);
    background:#111;
    box-shadow:0 20px 45px rgba(0,0,0,.25);
}

.proride-search-toggle svg,
.proride-search-submit svg{
    width:25px;
    height:25px;
    fill:currentColor;
    display:block;
    overflow:visible;
}

.proride-search-spark{
    fill:#fff;
    transform-origin:center;
    animation:prorideSearchSpark 1.8s ease-in-out infinite;
}

.proride-search-toggle:hover .proride-search-spark,
.proride-search-submit:hover .proride-search-spark{
    fill:#ed1d24;
}

@keyframes prorideSearchSpark{
    0%,100%{
        opacity:.75;
        transform:scale(.9);
    }
    50%{
        opacity:1;
        transform:scale(1.18);
    }
}

.proride-search-toggle-text{
    display:none;
    font-size:15px;
    font-weight:700;
    white-space:nowrap;
}

.proride-search-panel{
    position:absolute;
    top:50%;
    right:0;
    width:min(520px, calc(100vw - 28px));
    opacity:0;
    pointer-events:none;
    transform:translateY(-50%) scale(.86);
    transform-origin:right center;
    transition:
        opacity .25s ease,
        transform .35s cubic-bezier(.18,.89,.32,1.22);
    z-index:10;
}

.proride-search.is-open .proride-search-panel{
    opacity:1;
    pointer-events:auto;
    transform:translateY(-50%) scale(1);
}

.proride-search.is-open .proride-search-toggle{
    opacity:0;
    transform:scale(.72);
    pointer-events:none;
}

.proride-search-form{
    height:62px;
    width:100%;
    display:flex;
    align-items:center;
    gap:8px;
    padding:0 10px;
    border-radius:999px;
    background:rgba(255,255,255,.96);
    border:1px solid rgba(237,29,36,.22);
    box-shadow:
        0 24px 70px rgba(0,0,0,.20),
        0 0 0 8px rgba(237,29,36,.06);
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
}

.proride-search-submit,
.proride-search-close{
    border:0;
    background:transparent;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    cursor:pointer;
    color:#ed1d24;
}

.proride-search-submit{
    width:48px;
    height:48px;
    border-radius:50%;
}

.proride-search-submit:hover{
    background:rgba(237,29,36,.08);
}

.proride-search-close{
    width:40px;
    height:40px;
    border-radius:50%;
    color:#777;
    font-size:28px;
    font-weight:400;
    line-height:1;
    transition:.25s;
}

.proride-search-close:hover{
    background:#111;
    color:#fff;
}

.proride-search-input{
    width:100%;
    height:62px !important;
    min-height:62px !important;
    border:0 !important;
    outline:0 !important;
    background:transparent !important;
    color:#111 !important;
    font-size:18px !important;
    font-weight:700 !important;
    line-height:62px !important;
    text-align:right;
    padding:0 2px !important;
    margin:0 !important;
    box-shadow:none !important;
    appearance:none;
    -webkit-appearance:none;
    transform:translateY(1px);
}

.proride-search-input::placeholder{
    color:#777;
    opacity:1;
    font-weight:700;
}

.proride-search-results{
    display:none;
    position:absolute;
    top:calc(100% + 14px);
    right:0;
    width:100%;
    max-height:560px;
    overflow-y:auto;
    background:#fff;
    border:1px solid rgba(0,0,0,.08);
    border-radius:22px;
    box-shadow:0 30px 80px rgba(0,0,0,.22);
    padding:10px;
    direction:rtl;
    scrollbar-width:none;
}

.proride-search-results::-webkit-scrollbar{
    display:none;
}

.proride-search-results.is-visible{
    display:block;
}

.proride-search-status{
    padding:22px 18px;
    font-size:15px;
    font-weight:700;
    color:#777;
    text-align:center;
}

.proride-search-status.is-error{
    color:#ed1d24;
}

.proride-search-result{
    display:flex;
    align-items:center;
    gap:14px;
    padding:12px;
    min-height:84px;
    border-radius:16px;
    color:#111;
    text-decoration:none;
    transition:.22s ease;
}

.proride-search-result + .proride-search-result{
    border-top:1px solid #f0f0f0;
}

.proride-search-result:hover{
    background:#fafafa;
    transform:translateX(-3px);
}

.proride-search-result-info{
    flex:1;
    min-width:0;
    text-align:right;
}

.proride-search-result-title{
    display:block;
    font-size:16px;
    font-weight:700;
    line-height:1.25;
    color:#111;
}

.proride-search-result-sku{
    display:block;
    margin-top:6px;
    font-size:13px;
    color:#777;
    line-height:1.2;
}

.proride-search-result-price{
    display:block;
    margin-top:7px;
    line-height:1;
}

.proride-search-price{
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:#ed1d24;
    font-size:16px;
    font-weight:700;
}

.proride-search-price ins{
    color:#ed1d24;
    text-decoration:none;
    font-weight:700;
}

.proride-search-price del{
    color:#999;
    opacity:.75;
    font-size:14px;
    font-weight:700;
}

.proride-search-result-thumb{
    width:62px;
    height:62px;
    border-radius:10px;
    background:#f7f7f7;
    border:1px solid #e7e7e7;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    flex-shrink:0;
}

.proride-search-result-thumb img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
    padding:4px;
}

.proride-search-show-all{
    position:sticky;
    bottom:0;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-top:8px;
    min-height:54px;
    border-radius:16px;
    background:#111;
    color:#fff;
    text-decoration:none;
    font-weight:700;
    transition:.25s;
}

.proride-search-show-all:hover{
    background:#ed1d24;
    color:#fff;
}

/* Loading shimmer */
.proride-search.is-loading .proride-search-form{
    box-shadow:
        0 24px 70px rgba(0,0,0,.20),
        0 0 0 8px rgba(237,29,36,.08);
}

/* Header/menu friendly */
.header-widget .proride-search,
.mkdf-page-header .proride-search,
.elementor-location-header .proride-search{
    vertical-align:middle;
}

/* Mobile */
@media (max-width:768px){

    .proride-search{
        position:relative;
    }

    .proride-search-toggle{
        width:50px;
        height:50px;
    }

    .proride-search-panel{
        position:fixed;
        top:18px;
        right:14px;
        width:calc(100vw - 28px);
        transform:translateY(-20px) scale(.94);
        transform-origin:top right;
    }

    .proride-search.is-open .proride-search-panel{
        transform:translateY(0) scale(1);
    }

    .proride-search-form{
        height:58px;
        border-radius:18px;
    }

    .proride-search-input{
        height:58px !important;
        min-height:58px !important;
        line-height:58px !important;
        font-size:16px !important;
    }

    .proride-search-results{
        max-height:calc(100vh - 100px);
        border-radius:18px;
    }

    .proride-search-result{
        padding:10px;
        min-height:78px;
    }

    .proride-search-result-title{
        font-size:15px;
    }

    .proride-search-result-thumb{
        width:56px;
        height:56px;
    }
}

/*==================================================
SEARCH LOADING STATE
==================================================*/

.proride-search.is-loading .proride-search-submit svg{
    animation:prorideSearchPulse .85s ease-in-out infinite;
}

.proride-search-loading{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:22px 18px;
    font-size:15px;
    font-weight:700;
    color:#111;
    text-align:center;
}

.proride-search-spinner{
    width:18px;
    height:18px;
    border-radius:50%;
    border:2px solid rgba(237,29,36,.18);
    border-top-color:#ed1d24;
    animation:prorideSearchSpin .7s linear infinite;
    flex-shrink:0;
}

@keyframes prorideSearchSpin{
    to{
        transform:rotate(360deg);
    }
}

@keyframes prorideSearchPulse{
    0%,100%{
        transform:scale(1);
        opacity:1;
    }
    50%{
        transform:scale(.86);
        opacity:.55;
    }
}

/*==================================================
MOBILE SEARCH — ALWAYS OPEN BAR
Used by: [proride_mobile_search]
==================================================*/

.proride-search.proride-search-mobile{
    width:100%;
    display:block;
    position:relative;
    padding:5px 0;
    z-index:999999;
}

.proride-search.proride-search-mobile .proride-search-toggle{
    display:none !important;
}

.proride-search.proride-search-mobile .proride-search-panel{
    position:relative !important;
    top:auto !important;
    right:auto !important;
    left:auto !important;
    width:100% !important;
    opacity:1 !important;
    pointer-events:auto !important;
    transform:none !important;
    transform-origin:center !important;
}

.proride-search.proride-search-mobile .proride-search-form{
    height:54px;
    border-radius:14px;
    background:#fff;
    border:1px solid rgba(237,29,36,.20);
    box-shadow:
        0 12px 30px rgba(0,0,0,.08),
        0 0 0 5px rgba(237,29,36,.045);
}

.proride-search.proride-search-mobile .proride-search-input{
    height:54px !important;
    min-height:54px !important;
    line-height:54px !important;
    font-size:16px !important;
    font-weight:700 !important;
}

.proride-search.proride-search-mobile .proride-search-submit{
    width:44px;
    height:44px;
}

.proride-search.proride-search-mobile .proride-search-submit svg{
    width:23px;
    height:23px;
}

.proride-search.proride-search-mobile .proride-search-close{
    display:none !important;
}


/* Override the general mobile fixed popup rules */
@media (max-width:768px){

    .proride-search.proride-search-mobile{
        width:100%;
        padding:5px 0;
    }

    .proride-search.proride-search-mobile .proride-search-panel{
        position:relative !important;
        top:auto !important;
        right:auto !important;
        left:auto !important;
        width:100% !important;
        transform:none !important;
    }

}

/*==================================================
MOBILE SEARCH RESULTS — FIXED OVERLAY ABOVE MENU
==================================================*/

/*
    In the mobile menu the results must not be trapped inside the menu scroll.
    This makes the results float above the menu and scroll inside their own box.
*/

.proride-search.proride-search-mobile .proride-search-results{
    z-index:2147483647 !important;
    overflow-y:auto !important;
    overscroll-behavior:contain !important;
    scrollbar-width:none;
}

.proride-search.proride-search-mobile .proride-search-results::-webkit-scrollbar{
    display:none;
}

@media (max-width:768px){

    .proride-search.proride-search-mobile{
        position:relative !important;
        z-index:2147483647 !important;
    }

    .proride-search.proride-search-mobile .proride-search-panel{
        position:relative !important;
        z-index:2147483647 !important;
        overflow:visible !important;
    }

    .proride-search.proride-search-mobile .proride-search-results{
        position:fixed !important;
    
        background:#fff !important;
        padding:7px !important;
        border-radius:16px !important;
        box-shadow:0 25px 80px rgba(0,0,0,.35) !important;
    }

    .proride-search.proride-search-mobile .proride-search-results.is-visible{
        display:block !important;
    }

    .proride-search.proride-search-mobile .proride-search-result{
        min-height:64px !important;
        padding:7px 8px !important;
        gap:10px !important;
        border-radius:12px !important;
    }

    .proride-search.proride-search-mobile .proride-search-result-thumb{
        width:48px !important;
        height:48px !important;
        border-radius:8px !important;
    }

    .proride-search.proride-search-mobile .proride-search-result-thumb img{
        padding:3px !important;
    }

    .proride-search.proride-search-mobile .proride-search-result-title{
        font-size:14px !important;
        line-height:1.22 !important;
        font-weight:700 !important;
    }

    .proride-search.proride-search-mobile .proride-search-result-sku{
        font-size:11px !important;
        margin-top:4px !important;
    }

    .proride-search.proride-search-mobile .proride-search-result-price{
        margin-top:4px !important;
    }

    .proride-search.proride-search-mobile .proride-search-price,
    .proride-search.proride-search-mobile .proride-search-price ins{
        font-size:13px !important;
        font-weight:700 !important;
    }

    .proride-search.proride-search-mobile .proride-search-price del{
        font-size:12px !important;
    }

    .proride-search.proride-search-mobile .proride-search-show-all{
        min-height:44px !important;
        border-radius:12px !important;
        font-size:14px !important;
        margin-top:6px !important;
    }

    .proride-search.proride-search-mobile .proride-search-loading,
    .proride-search.proride-search-mobile .proride-search-status{
        padding:16px 12px !important;
        font-size:14px !important;
    }

}

@media (max-width:420px){

    .proride-search.proride-search-mobile .proride-search-result{
        min-height:60px !important;
        padding:6px 7px !important;
    }

    .proride-search.proride-search-mobile .proride-search-result-thumb{
        width:44px !important;
        height:44px !important;
    }

    .proride-search.proride-search-mobile .proride-search-result-title{
        font-size:13.5px !important;
    }

}

