:root {
    --color-primary-landing-operations: #B70E80;
    --color-secondary-landing-operations: #FEE9F7;
    --color-tertiary-landing-operations: #FEE9F7;
    --color-inactif: dimgray;
}

#btn-reset-filters {
    position: absolute;
    height: 100%;
    background-color: var(--color-primary-landing-operations);
    color: white;
    width: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 0;
    right: 15px;
    cursor: pointer;
    transition: right 0.35s ease-in-out;
    z-index: 999;
}

#btn-reset-filters.toRight {
    right: -15px;
}


.filters-container {
    background-color: var(--color-secondary-landing-operations);
    padding: 25px 10px;
    z-index: 999;
    position: relative;
}

.select-date-container {
    border: 1px solid var(--color-secondary-landing-operations);
    border-radius: 5px;
    background-color: white;
    box-shadow: 0 0 3px #00000033;
    display: flex;
    justify-content: space-around;
}

.select-date-container .form-control {
    background-color: transparent;
    border: 0;
}

.select-date-container.multi-select-month-container .form-control {
    color: transparent;
    cursor: pointer;
}

.select-date-container.multi-select-month-container .form-control:focus {
    box-shadow: unset;
}

.select-date-container .input-group-addon {
    border: 0;
    background-color: transparent;
    align-self: center;
    width: 40px;
}

.datepicker .datepicker-years table tr td span.active,
.datepicker .datepicker-months table tr td span.active,
.datepicker .datepicker-days table tr td.active {
    background-color: var(--color-primary-landing-operations) !important;
    background-image: unset;
}

.select-date-container .input-group-addon > i.fas {
    color: var(--color-primary-landing-operations);
    font-size: 18px;
    cursor: pointer;
}


.new-input-filters {
    position: relative;
    cursor: pointer;
}

.new-input-filters label,
.new-input-filters.select-date-container input::placeholder {
    color: #212121;
    position: absolute;
    z-index: 1;
    height: 20px;
    left: 19px;
    top: 10px;
    font-weight: unset;
    width: auto;
    cursor: text;
}

.new-input-filters i.chevron {
    position: absolute;
    z-index: 1;
    background-color: transparent;
    color: #000000;
    top: 11px;
    right: 11px;
    font-size: 11px;
    cursor: pointer;
    transition: transform 0.2s ease;
    pointer-events: none;
}

.new-input-filters.is-open i.chevron {
    transform: rotate(180deg);
}

/* ---- Multi-select ---- */
.new-input-filters.select-multiple {
    position: relative;
}

.new-input-filters.select-multiple .select2.select2-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2;
    opacity: 0;
    cursor: pointer;
    width: 100% !important;
}

.new-input-filters.select-multiple .select2.select2-container .select2-selection {
    height: 100%;
    min-height: 36px;
}

/* Fake visible container for the multi-select */
.new-input-filters.select-multiple {
    border: 1px solid #D0D5DD;
    border-radius: 7px;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    min-height: 36px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 5px 36px 5px 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.new-input-filters.select-multiple:focus-within,
.new-input-filters.select-multiple.select2-container--open {
    border-color: #B70E80;
    box-shadow: 0 0 0 3px rgba(183,14,128,0.10);
}

/* Single select */
.new-input-filters:not(.select-multiple) .select2.select2-container .select2-selection {
    border: 1px solid #D0D5DD;
    border-radius: 7px;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    height: 36px;
    display: flex;
    align-items: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.new-input-filters:not(.select-multiple) .select2-container--default.select2-container--open .select2-selection {
    border-color: #B70E80 !important;
    box-shadow: 0 0 0 3px rgba(183,14,128,0.10) !important;
}

.new-input-filters .select2.select2-container {
    margin-top: 0;
}

.new-input-filters.single-select .select2-container--default .select2-selection--single .select2-selection__arrow,
.new-input-filters.single-select .select2-container--default .select2-selection--single .select2-selection__rendered,
.new-input-filters .select2-container--default .select2-selection--multiple .select2-selection__rendered .select2-selection__choice {
    display: none;
}

/* ---- Tags items-container ---- */
.single-select.items-container,
.multi-select.items-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    /* no padding — the tags live inside the .new-input-filters.select-multiple wrapper */
}

.single-select.items-container .selected-item,
.multi-select.items-container .selected-item {
    background-color: #FCE8F6;
    border: 1px solid #E8A4D4;
    border-radius: 20px;
    padding: 2px 8px 2px 10px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #8B0060;
    font-weight: 500;
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.single-select.items-container .selected-item .remove-selected-item,
.multi-select.items-container .selected-item .remove-selected-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(183,14,128,0.15);
    color: #B70E80;
    width: 15px;
    height: 15px;
    min-width: 15px;
    cursor: pointer;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    transition: background-color 0.1s ease;
}

.single-select.items-container .selected-item .remove-selected-item:hover,
.multi-select.items-container .selected-item .remove-selected-item:hover {
    background-color: rgba(183,14,128,0.30);
}

/*helpers*/

.rotate-360 {
    animation: rotate360 500ms ease-in-out forwards;
}

@keyframes rotate360 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ---- BO admin filter container ---- */
.bo-filters-container {
    background-color: #F8F9FA;
    border: 1px solid #E9ECEF;
    border-radius: 10px;
    padding: 14px 10px 6px;
    margin-bottom: 16px;
    position: relative;
}

.bo-filters-container .new-input-filters {
    margin-bottom: 8px;
}

/* BO filter label styling */
.bo-filters-container .new-input-filters > label {
    font-size: 11.5px;
    font-weight: 600;
    color: #4B5563;
    letter-spacing: 0.02em;
    top: 8px;
    left: 10px;
}

/* BO items-container (single-select and multi-select, placed below the filter box) */
.bo-filters-container .items-container.single-select-items,
.bo-filters-container .items-container.multi-select-items {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 3px;
    min-height: 0;
}

/* Override filters-container blue background for BO pages */
.bo-filters-container.filters-container {
    background-color: #F8F9FA;
}

/* Selected item tag in BO filters (single-select and multi-select, below the box) */
.bo-filters-container .single-select-items .selected-item,
.bo-filters-container .multi-select-items .selected-item {
    background-color: #FCE8F6;
    border: 1px solid #E8A4D4;
    border-radius: 20px;
    padding: 2px 8px 2px 10px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #8B0060;
    font-weight: 500;
}

.bo-filters-container .single-select-items .selected-item .remove-selected-item,
.bo-filters-container .multi-select-items .selected-item .remove-selected-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(183,14,128,0.15);
    color: #B70E80;
    width: 14px;
    height: 14px;
    min-width: 14px;
    cursor: pointer;
    font-size: 9px;
    font-weight: bold;
}

.bo-filters-container .single-select-items .selected-item .remove-selected-item:hover,
.bo-filters-container .multi-select-items .selected-item .remove-selected-item:hover {
    background-color: rgba(183,14,128,0.30);
}

/* Reset btn for BO filters */
.bo-filters-container #btn-reset-filters {
    right: 0;
}

/*!* Improve existing datatable-filter style (backward compat) *!*/
/*.datatable-filter .select-filtre-container {*/
/*    margin-bottom: 10px;*/
/*}*/

.datatable-filter .label-filtre {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6B7280;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

/*.datatable-filter .select-filtre-container .select2-container .select2-selection {*/
/*    border: 1px solid #D0D5DD !important;*/
/*    border-radius: 7px !important;*/
/*    height: 36px !important;*/
/*    display: flex !important;*/
/*    align-items: center !important;*/
/*}*/

/*.datatable-filter .select-filtre-container .select2-container .select2-selection__rendered {*/
/*    line-height: 34px !important;*/
/*}*/
