/* DT24 Filtros - Estilos independientes basados en Motta */

/* Contenedor principal */
.dt24-filtros-widget {
    margin-bottom: 30px;
}

.dt24-filtros-widget .widget-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Formulario */
.dt24-filtro-form {
    position: relative;
}

/* Acordeón +/- en título del widget */
.dt24-filtros-widget .widget-title.products-filter--collapsible {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.dt24-filtros-widget .widget-title.products-filter--collapsible .filter-name {
    flex: 1;
}

.dt24-filtros-widget .widget-title.products-filter--collapsible .filter-name::after {
    content: '';
    background-image: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEyIiB2aWV3Qm94PSIwIDAgMzIgMzIiPgo8cGF0aCBkPSJNMjYuNjY3IDEzLjMzM3Y1LjMzM2gtMjEuMzMzdi01LjMzM2gyMS4zMzN6Ij48L3BhdGg+Cjwvc3ZnPgo=);
    background-repeat: no-repeat;
    width: 12px;
    height: 12px;
    display: block;
    transition: .3s;
    margin-left: auto;
}

.dt24-filtros-widget .widget-title.products-filter--collapsible.motta-active .filter-name::after {
    background-image: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEyIiB2aWV3Qm94PSIwIDAgMzIgMzIiPgo8cGF0aCBkPSJNMjYuNjY3IDEzLjMzM2gtOHYtOGgtNS4zMzN2OGgtOHY1LjMzM2g4djhoNS4zMzN2LThoOHoiPjwvcGF0aD4KPC9zdmc+Cg==);
}

.dt24-filtros-widget .widget-title.products-filter--collapsible.motta-active + .widget-content-wrapper {
    display: none;
}

/* Acordeón +/- en filtros internos */
.dt24-filtros-widget .products-filter--collapsible .filter-name {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    padding-bottom: 19px;
}

.dt24-filtros-widget .products-filter--collapsible .filter-name::after {
    content: '';
    background-image: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEyIiB2aWV3Qm94PSIwIDAgMzIgMzIiPgo8cGF0aCBkPSJNMjYuNjY3IDEzLjMzM3Y1LjMzM2gtMjEuMzMzdi01LjMzM2gyMS4zMzN6Ij48L3BhdGg+Cjwvc3ZnPgo=);
    background-repeat: no-repeat;
    width: 12px;
    height: 12px;
    display: block;
    transition: .3s;
}

.dt24-filtros-widget .products-filter--collapsible.motta-active .filter-name::after {
    background-image: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEyIiB2aWV3Qm94PSIwIDAgMzIgMzIiPgo8cGF0aCBkPSJNMjYuNjY3IDEzLjMzM2gtOHYtOGgtNS4zMzN2OGgtOHY1LjMzM2g4djhoNS4zMzN2LThoOHoiPjwvcGF0aD4KPC9zdmc+Cg==);
}

.dt24-filtros-widget .products-filter--collapsible.motta-active .filter-control {
    display: none;
}

/* Filtros */
.dt24-filtros__filter {
    margin-bottom: 25px;
    border-bottom: 1px solid #ecf0f4;
    padding-bottom: 20px;
}

.dt24-filtros__filter:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.dt24-filtros__filter-name {
    font-size: 16px;
    font-weight: 500;
    color: #1d2128;
    margin-bottom: 0;
}

.dt24-filtros__filter-control {
    position: relative;
    padding-top: 15px;
}

/* Lista de opciones */
.dt24-filtros__options {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dt24-filtros__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
    color: rgb(124, 129, 139);
}

.dt24-filtros__option:hover {
    color: #1d2128;
}

.dt24-filtros__option-name {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.dt24-filtros__count {
    font-size: 12px;
    color: #666;
    margin-left: 8px;
}

/* Estado seleccionado - checkbox visual */
.dt24-filtros__option::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 3px;
    margin-right: 10px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: #fff;
}

.dt24-filtros__option.selected::before {
    background: #1d2128;
    border-color: #1d2128;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m13.854 3.646-7.5 7.5a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6 10.293l7.146-7.147a.5.5 0 0 1 .708.708z'/%3e%3c/svg%3e");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.dt24-filtros__option.selected {
    color: #1d2128;
    font-weight: 500;
}

/* Lista scrolleable */
.dt24-scrollable-list {
    max-height: 200px;
    overflow-y: auto;
}

.dt24-scrollable-list::-webkit-scrollbar {
    width: 6px;
}

.dt24-scrollable-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.dt24-scrollable-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.dt24-scrollable-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Botones de acción */
.dt24-filtros__button {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ecf0f4;
}

.dt24-filtro-boton,
.dt24-filtro-limpiar {
    border: none !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px !important;
    line-height: 1 !important;
    padding: 0 1em !important;
    min-width: 0 !important;
    width: auto !important;
    flex: 1;
    box-shadow: 0px 2px 6px 0px rgba(242, 100, 25, 0.4);
    text-decoration: none;
}

.dt24-filtro-boton {
    background-color: #f26419;
    color: #fff;
    margin-right: 11px;
}

.dt24-filtro-boton:hover {
    background-color: #d55517;
    color: #fff;
}

.dt24-filtro-limpiar {
    background-color: transparent;
    color: #333 !important;
    border: 2px solid #333 !important;
    box-shadow: none;
}

.dt24-filtro-limpiar:hover {
    background-color: #333 !important;
    color: #fff !important;
    border-color: #333 !important;
}

/* Estados de carga */
.dt24-cargando {
    text-align: center;
    padding: 15px;
    color: #666;
}

.dt24-cargando .spinner {
    margin: 0 auto;
}

/* Ocultar ciudades inicialmente */
.dt24-ciudades-wrapper[style*="display:none"] {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .dt24-filtros__button {
        flex-direction: column;
    }
    
    .dt24-filtros-widget .dt24-filtro-boton,
    .dt24-filtros-widget .dt24-filtro-limpiar {
        height: 44px !important;
        min-height: 44px !important;
        max-height: 44px !important;
    }
    
    .dt24-scrollable-list {
        max-height: 150px;
    }
}