/* ==========================================================
   AGRO - CATEGORY SIDEBAR FILTER
========================================================== */

.myVmFilterBanner {
    margin: 0 0 28px;
    padding: 24px 22px 26px;

    background: #fff;

    border: 1px solid #e5e5e5;
    border-radius: 14px;

    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.04),
        0 10px 25px rgba(0, 0, 0, 0.035);

    overflow: visible;
    text-align: left;

    transition:
        box-shadow .25s ease,
        transform .25s ease;
}


/* původní velký nadpis "Filtr produktů" */
.myVmFilterBanner .myVmFilterBannerTitle {
    display: none;
}


/* ==========================================================
   PRICE
========================================================== */

.myVmFilterBanner .myFilterPrice {
    margin: 0;
}


/* Cena */
.myVmFilterBanner .myVmFilterBannerContentTitle {
    width: 100%;

    margin: 0 0 25px;

    color: #222;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;

    text-transform: uppercase;
}


/* (s DPH) */
.myVmFilterBanner .myVmFilterBannerContentTitle small {
    display: block;

    margin-top: 3px;

    color: #555;

    font-size: 10px;
    font-weight: 400;

    text-transform: none;
}


/* ==========================================================
   SLIDER
========================================================== */

.myVmFilterBanner #slider {
    position: relative;

    width: calc(100% - 18px);
    height: 3px;

    margin: 35px 9px 42px;

    background: #d9d9d9;

    border-radius: 5px;
}


/* aktivní část */
.myVmFilterBanner .range-bar {
    position: absolute;

    top: 0;

    height: 3px;

    background: #63c132;

    border-radius: 5px;
}


/* kolečka */
.myVmFilterBanner .handle {
    position: absolute;

    top: 50%;

    width: 13px;
    height: 13px;

    margin-left: -6.5px;

    background: #63c132;

    border: 2px solid #fff;
    border-radius: 50%;

    box-shadow: 0 0 0 1px #63c132;

    cursor: pointer;

    transform: translateY(-50%);
}


/* ==========================================================
   PRICE VALUES
========================================================== */

.myVmFilterBanner .handle > span {
    display: block;

    position: absolute;

    visibility: visible;

    white-space: nowrap;

    color: #555;

    font-size: 11px;
    line-height: 1;
}


/* MIN vlevo pod sliderem */
.myVmFilterBanner #handle-min > span {
    top: 18px;
    left: 0;
}


/* MAX vpravo nad sliderem */
.myVmFilterBanner #handle-max > span {
    top: -20px !important;
    right: 0;
    bottom: 18px;
    left: auto;
}


/* odstraníme původní posouvání hodnot */
.myVmFilterBanner .myVal {
    display: block;

    margin: 0;

    visibility: visible;

    line-height: 1;
}


/* MIN zarovnat od levého bodu */
.myVmFilterBanner #handle-min .myVal {
    transform: translateX(-2px);
}


/* MAX zarovnat doprava */
.myVmFilterBanner #handle-max .myVal {
    transform: translateX(2px);
}


/* ==========================================================
   RESET
========================================================== */

.myVmFilterBanner .myVmFilterReset {
    margin-top: 22px;
    padding-top: 14px;

    border-top: 1px solid #eeeeee;

    text-align: right;
}

.myVmFilterBanner .myVmFilterReset a {
    color: #777;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
}

.myVmFilterBanner .myVmFilterReset a:hover {
    color: #63c132;
}


/* ==========================================================
   MODULE WRAPPER
========================================================== */

.mod-position-left:has(.myVmFilterBanner) {
    margin-bottom: 30px !important;
}

/* ==========================================================
   CHECKBOX FILTERS - SIDEBAR OVERRIDE
========================================================== */

.myVmFilterBanner form#myVmFilterForm .myCover {
    display: block;
}


/* jednotlivá skupina */
.myVmFilterBanner form#myVmFilterForm .myVmFilterBannerContent {
    display: block;

    min-width: 0;
    width: 100%;

    margin: 0 0 20px;
    padding: 0 0 18px;

    border-bottom: 1px solid #d9d9d9;
}


/* nadpis skupiny */
.myVmFilterBanner form#myVmFilterForm .myVmFilterBannerContentTitle {
    width: 100%;

    margin: 0 0 12px;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;

    text-transform: uppercase;
}


/* seznam checkboxů */
.myVmFilterBanner form#myVmFilterForm ul.myVmFilterBannerContentValues {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;

    width: 100%;

    margin: 0;
    padding: 0;

    gap: 9px;

    list-style: none;
}


/* jedna položka */
.myVmFilterBanner form#myVmFilterForm ul.myVmFilterBannerContentValues li {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;

    width: 100%;

    margin: 0;
    padding: 0;

    gap: 8px;

    line-height: 1.2;
}


/* checkbox */
.myVmFilterBanner form#myVmFilterForm ul.myVmFilterBannerContentValues li input[type="checkbox"] {
    flex: 0 0 15px;

    width: 15px;
    height: 15px;

    margin: 0;
    padding: 0;

    accent-color: #63c132;

    cursor: pointer;
}


/* text */
.myVmFilterBanner form#myVmFilterForm ul.myVmFilterBannerContentValues li label {
    display: block;

    margin: 0;
    padding: 0;

    color: #222;

    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;

    cursor: pointer;
}


/* hover */
.myVmFilterBanner form#myVmFilterForm ul.myVmFilterBannerContentValues li label:hover {
    color: #63c132;
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 991px) {

    .myVmFilterBanner {
        padding: 20px 10px;
    }

    .myVmFilterBanner #slider {
        width: calc(100% - 18px);
        margin-left: 9px;
        margin-right: 9px;
    }

    .myVmFilterBanner .myVal {
        margin: 0;
    }
}

/* ==========================================================
   MOBILE FILTER
========================================================== */

/* na desktopu neviditelné */
.myVmFilterMobileTrigger,
.myVmFilterMobileHeader,
.myVmFilterMobileSubmit,
.myVmFilterMobileOverlay {
    display: none;
}


@media (max-width: 991px) {

    /* ------------------------------------------------------
       TRIGGER
    ------------------------------------------------------ */

    .myVmFilterMobileTrigger {
        display: block;
        margin-bottom: 20px;
    }

    .myVmFilterMobileButton {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;

        width: 100%;
        min-height: 48px;

        padding: 10px 18px;

        border: 0;
        border-radius: 5px;

        background: #63c132;
        color: #fff;

        font-size: 15px;
        font-weight: 700;

        cursor: pointer;
    }


    /* počet aktivních filtrů */

    .myVmFilterMobileCount {
        display: inline-flex;
        align-items: center;
        justify-content: center;

        min-width: 24px;
        height: 24px;

        padding: 0 7px;

        border-radius: 20px;

        background: #fff;
        color: #222;

        font-size: 12px;
        font-weight: 700;
    }


    /* ------------------------------------------------------
       OVERLAY
    ------------------------------------------------------ */

    .myVmFilterMobileOverlay {
        display: block;

        position: fixed;
        z-index: 9998;

        inset: 0;

        background: rgba(0, 0, 0, .45);

        opacity: 0;
        visibility: hidden;

        transition:
            opacity .25s ease,
            visibility .25s ease;
    }

    .myVmFilterMobileOverlay.is-open {
        opacity: 1;
        visibility: visible;
    }


    /* ------------------------------------------------------
       PANEL
    ------------------------------------------------------ */

    .myVmFilterBanner {
        position: fixed;

        z-index: 9999;

        top: 0;
        right: 0;
        bottom: 0;

        width: min(90%, 400px);

        margin: 0;

        padding: 20px;

        border: 0;
        border-radius: 0;

        overflow-y: auto;

        background: #fff;

        transform: translateX(105%);

        transition: transform .25s ease;
    }

    .myVmFilterBanner.is-open {
        transform: translateX(0);
    }


    /* ------------------------------------------------------
       HEADER
    ------------------------------------------------------ */

    .myVmFilterMobileHeader {
        display: flex;

        align-items: center;
        justify-content: space-between;

        margin-bottom: 25px;
        padding-bottom: 15px;

        border-bottom: 1px solid #ddd;
    }

    .myVmFilterMobileTitle {
        font-size: 20px;
        font-weight: 700;
    }

    .myVmFilterMobileClose {
        display: flex;

        align-items: center;
        justify-content: center;

        width: 44px;
        height: 44px;

        padding: 0;

        border: 0;
        background: transparent;

        color: #222;

        font-size: 32px;
        line-height: 1;

        cursor: pointer;
    }


    /* původní desktopový titulek schováme */
    .myVmFilterBanner > .myVmFilterBannerTitle {
        display: none;
    }


    /* ------------------------------------------------------
       SUBMIT
    ------------------------------------------------------ */

    .myVmFilterMobileSubmit {
        display: block;

        margin-top: 25px;
    }

    .myVmFilterApplyButton {
        display: block;

        width: 100%;
        min-height: 48px;

        padding: 12px 20px;

        border: 0;
        border-radius: 5px;

        background: #63c132;
        color: #fff;

        font-size: 15px;
        font-weight: 700;

        cursor: pointer;
    }


    /* ------------------------------------------------------
       BODY
    ------------------------------------------------------ */

    body.my-filter-open {
        overflow: hidden;
    }

}