/* =========================================================
   בסיס - פילטרים נפתחים
========================================================= */

.date-filter-box {
    position: relative;
    overflow: visible !important;
}

.date-filter-box .elementor-widget-container {
    overflow: visible !important;
}

.date-filter-trigger {
    cursor: pointer;
}


/* =========================================================
   חלונית תאריך / מרחק
========================================================= */

.date-filter-panel {
    display: none;
    position: absolute;
    z-index: 9999;

    top: 115px;
    right: 50%;
    transform: translateX(50%);

    width: 300px !important;
    min-width: 300px;
    max-width: 90vw;

    margin: 0;
    padding: 0 !important;

    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;

    box-sizing: border-box;
}

.date-filter-panel > .elementor-widget-container {
    width: 100% !important;
    min-width: 100%;

    padding: 15px !important;

    overflow: visible !important;

    background: #fff !important;
    border: 1px solid #e4e4e4;
    border-radius: 14px;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.14);

    box-sizing: border-box;
}


/* פתיחה */
.date-filter-box.is-open .date-filter-panel {
    display: block;
}


/* =========================================================
   פילטר תאריכים
========================================================= */

.date-filter-panel form,
.date-filter-panel .jet-date-range,
.date-filter-panel .jet-date-range__inputs {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.date-filter-panel .jet-date-range__inputs {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    direction: rtl;
}

.date-filter-panel input[type="text"] {
    flex: 1 1 calc(50% - 4px);

    width: calc(50% - 4px) !important;
    min-width: 0 !important;
    max-width: none !important;

    height: 44px;

    margin: 0 !important;
    padding: 8px 10px !important;

    color: #333;
    background: #fff;

    border: 1px solid #aaa;
    border-radius: 5px;

    font-size: 14px;
    line-height: 1.4;

    direction: rtl;
    text-align: center;

    box-sizing: border-box;
}

.date-filter-panel input[type="text"]:focus {
    border-color: #003f8f;
    outline: none;
}

.date-filter-panel input::placeholder {
    color: #555 !important;
    opacity: 1 !important;
}


/* =========================================================
   כפתור אישור
========================================================= */

.date-filter-panel button:not(.filter-reset-button),
.date-filter-panel input[type="submit"],
.date-filter-panel .apply-filters__button {
    width: 100% !important;
    min-height: 44px;

    margin-top: 10px !important;
    padding: 9px 16px !important;

    color: #fff !important;
    background: #003f8f !important;

    border: 1px solid #003f8f !important;
    border-radius: 5px !important;

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

    text-align: center;

    cursor: pointer;

    box-sizing: border-box;
}

.date-filter-panel button:not(.filter-reset-button):hover,
.date-filter-panel input[type="submit"]:hover,
.date-filter-panel .apply-filters__button:hover {
    background: #002f6c !important;
}


/* =========================================================
   כפתור איפוס - עיצוב אחיד לכל הפילטרים
========================================================= */

.filter-reset-button {
    display: block !important;

    width: 100% !important;
    min-height: 44px !important;

    margin: 10px 0 0 !important;
    padding: 9px 14px !important;

    color: #003f8f !important;
    background: #fff !important;

    border: 1px solid #003f8f !important;
    border-radius: 5px !important;

    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;

    text-align: center !important;

    cursor: pointer !important;

    box-sizing: border-box !important;

    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.filter-reset-button:hover {
    color: #fff !important;
    background: #003f8f !important;
}


/* =========================================================
   לוח השנה
========================================================= */

body .date-picker-wrapper,
body .ui-datepicker,
body .air-datepicker,
body .flatpickr-calendar {
    z-index: 100000 !important;

    min-width: 330px !important;
    max-width: 94vw !important;

    overflow: visible !important;

    direction: rtl;
}


/* =========================================================
   פילטר מרחק
========================================================= */

/* מסתיר רק את אזור המיקום */
.distance-filter .jsf-location-distance__location {
    display: none !important;
}


/* Select המרחק */
.distance-filter .jsf-location-distance__distance {
    display: block;

    width: 100% !important;
    min-width: 0 !important;
    height: 46px;

    margin: 0 !important;
    padding: 7px 14px !important;

    color: #222;
    background: #fff;

    border: 1px solid #777;
    border-radius: 5px;

    font-size: 16px;

    direction: rtl;
    text-align: right;

    cursor: pointer;

    box-sizing: border-box;
}


/* =========================================================
   פילטר עיר - Dropdown של JetSmartFilters
========================================================= */

.jet-filter-items-dropdown {
    position: relative !important;
}


/* גוף הדרופדאון */
.jet-filter-items-dropdown__body {
    position: absolute !important;
    z-index: 9999 !important;

    top: 110px !important;
    right: 50% !important;
    left: auto !important;

    transform: translateX(50%) !important;

    width: 300px !important;
    min-width: 300px !important;
    max-width: 90vw !important;
    max-height: 360px !important;

    padding: 15px !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    background: #fff !important;

    border: 1px solid #e4e4e4 !important;
    border-radius: 14px !important;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.14) !important;

    box-sizing: border-box !important;
}


/* הסתרת הכיתוב של ערים שנבחרו */
.jet-filter-items-dropdown__active {
    display: none !important;
}


/* רשימת הערים */
.jet-filter-items-dropdown__body .jet-checkboxes-list,
.jet-filter-items-dropdown__body .jet-radio-list {
    width: 100%;
    direction: rtl;
}


/* כל שורת עיר */
.jet-filter-items-dropdown__body .jet-checkboxes-list__row,
.jet-filter-items-dropdown__body .jet-radio-list__row {
    display: flex !important;
    align-items: center !important;

    width: 100% !important;

    margin: 0 0 9px !important;
    padding: 2px 0 !important;

    direction: rtl;
}


/* Label */
.jet-filter-items-dropdown__body .jet-checkboxes-list__item,
.jet-filter-items-dropdown__body .jet-radio-list__item {
    width: 100%;
}


/* הטקסט */
.jet-filter-items-dropdown__body .jet-checkboxes-list__label,
.jet-filter-items-dropdown__body .jet-radio-list__label {
    color: #444 !important;

    font-size: 16px !important;
    line-height: 1.4 !important;

    cursor: pointer;
}


/* checkbox */
.jet-filter-items-dropdown__body input[type="checkbox"],
.jet-filter-items-dropdown__body input[type="radio"] {
    width: 20px !important;
    height: 20px !important;

    margin-left: 8px !important;
    margin-right: 0 !important;

    accent-color: #003f8f;

    cursor: pointer;
}


/* איפוס עיר */
.jet-filter-items-dropdown__body .city-reset-button {
    margin-top: 14px !important;
}


/* =========================================================
   חיפוש חופשי
========================================================= */

.volunteer-search .jet-search-filter {
    position: relative;
}

.volunteer-search .jet-search-filter__input {
    padding-left: 42px !important;
    padding-right: 15px !important;

    direction: rtl;
}

.volunteer-search .jet-search-filter::after {
    content: "";

    position: absolute;

    left: 14px;
    top: 50%;

    transform: translateY(-50%);

    width: 18px;
    height: 18px;

    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");

    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

    pointer-events: none;
}


/* =========================================================
   Elementor Editor
========================================================= */

body.elementor-editor-active .date-filter-box .date-filter-panel {
    display: block !important;
    position: relative !important;

    top: auto !important;
    right: auto !important;

    transform: none !important;

    width: 300px !important;
    max-width: 100% !important;

    margin: 15px auto 0 !important;
}


/* =========================================================
   Mobile
========================================================= */

@media (max-width: 767px) {

    .date-filter-panel,
    .jet-filter-items-dropdown__body {
        position: fixed !important;

        z-index: 99999 !important;

        top: 50% !important;
        left: 50% !important;
        right: auto !important;

        transform: translate(-50%, -50%) !important;

        width: calc(100vw - 30px) !important;
        min-width: 0 !important;
        max-width: 330px !important;
        max-height: 70vh !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow-y: auto !important;
    }


    .date-filter-panel > .elementor-widget-container {
        width: 100% !important;

        padding: 15px !important;

        border-radius: 14px;
    }


    .jet-filter-items-dropdown__body {
        padding: 16px !important;
    }


    .date-filter-panel .jet-date-range__inputs {
        gap: 8px;
    }


    .date-filter-panel input[type="text"] {
        font-size: 13px;
    }


    body .date-picker-wrapper,
    body .ui-datepicker,
    body .air-datepicker,
    body .flatpickr-calendar {
        position: fixed !important;

        z-index: 100000 !important;

        top: 50% !important;
        left: 50% !important;
        right: auto !important;

        transform: translate(-50%, -50%) !important;

        width: calc(100vw - 30px) !important;
        min-width: 0 !important;
        max-width: 330px !important;
    }
}
