/**
 * Styles pour le widget filtres des logements
 */

.logement-filters-container {
    width: 100%;
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logement-filters-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0px, 1fr));
    gap: 20px;
}

.filter-field {
    display: flex;
    flex-direction: column;
    position: relative;
    justify-content: center;
    margin-top: auto;
    margin-bottom: auto;
    padding-right: 20px;
    height: 100%;
}

.filter-field::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    border-right: 1px dashed #04060833;
}

.filter-field:nth-last-child(-n+2)::after {
    display: none;
}

.filter-field:last-child {
    padding-right: 0;
}

/* Dropdown Toggle Button */
.filter-dropdown-toggle {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    gap: 8px;
}

.filter-dropdown-toggle .filter-label-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}




.filter-label {
    font-weight: 500;
    margin-top: auto;
    margin-bottom: auto;
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background-color: #013C44;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 10px;
    line-height: 1;
}

.filter-arrow {
    transition: transform 0.3s ease;
    color: #666;
}

.filter-dropdown.active .filter-arrow {
    transform: rotate(180deg);
}

/* Input Number Field */
.filter-input-label {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.filter-input-number {
    width: 100%;
    /* padding: 10px; */
    font-size: 14px;
    color: #333;
    background-color: #fff;
    border: 2px solid #D9E2E3;
    border-radius: 4px;
    transition: all 0.3s ease;
    outline: none;
}

.filter-input-number:hover {
    border-color: #013C44;
}

.filter-input-number:focus {
    border-color: #013C44;
    box-shadow: 0 0 0 3px rgba(1, 60, 68, 0.1);
}

.filter-input-number::placeholder {
    color: #999;
}

/* Dropdown Content */
.filter-dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.filter-dropdown.active .filter-dropdown-content {
    display: block;
}

/* Checkbox Labels */
.filter-checkbox-label {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin: 0;
    font-weight: normal;
}

.filter-checkbox-label:hover {
    background-color: #f8f9fa;
}

.filter-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* Custom Checkbox */
.checkbox-custom {
    position: relative;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 3px;
    margin-right: 10px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.filter-checkbox-label:hover .checkbox-custom {
    border-color: #013C44;
}

.filter-checkbox-label input[type="checkbox"]:checked~.checkbox-custom {
    background-color: #013C44;
    border-color: #013C44;
}

.filter-checkbox-label input[type="checkbox"]:checked~.checkbox-custom::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    font-size: 14px;
    color: #333;
}

.filter-submit-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.filter-submit-wrapper .filter-submit {
    margin-top: auto;
}

.filter-submit {
    height: 100%;
    font-size: 14px;
    font-weight: 600;
    border: none;
    outline: none;
    color: #fff;
    white-space: nowrap;

}

.filter-submit:hover {
    background-color: #025561;
    cursor: pointer;

}

.filter-nombre-personnes {
    flex-direction: row;
}

.filter-quand {
    /* background-color: rgba(255, 0, 0, 0.451); */
}

/* Responsive */
@media (max-width: 768px) {
    .logement-filters-container {
        padding: 20px;
    }

    .filters-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .filters-actions {
        width: 100%;
    }

    .filter-submit {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logement-filters-container {
        padding: 16px;
    }

    .filter-dropdown-toggle {
        padding: 10px 14px;
        font-size: 13px;
    }

    .checkbox-text {
        font-size: 13px;
    }

    .filter-submit {
        padding: 10px 24px;
        font-size: 13px;
    }
}