/* Estilos para Filtros Mejorados */

/* Botones de toggle Comprar/Alquilar */
.toggle-buttons {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.toggle-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.toggle-btn:first-child {
    border-right: 1px solid #dee2e6;
}

.toggle-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.toggle-btn.active {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-btn.active:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
}

.toggle-btn i {
    font-size: 16px;
}

/* Animación de cambio de estado */
.toggle-btn {
    transform: scale(1);
}

.toggle-btn.active {
    transform: scale(1.02);
}

/* Efecto de pulso al cambiar */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1.02); }
}

.toggle-btn.active.pulse {
    animation: pulse 0.3s ease-in-out;
}

/* Select de rango de precio mejorado */
#rango-precio {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #495057;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

#rango-precio:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

#rango-precio:hover {
    border-color: #007bff;
}

/* Indicador de tipo de operación */
.operation-indicator {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #28a745;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.toggle-btn.active .operation-indicator {
    opacity: 1;
    transform: scale(1);
}

/* Tooltip para rangos de precio */
.price-tooltip {
    position: relative;
}

.price-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.price-tooltip:hover::after {
    opacity: 1;
}

/* Estados de carga */
.loading-state {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading-state::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .toggle-buttons {
        flex-direction: column;
    }
    
    .toggle-btn:first-child {
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    .toggle-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    #rango-precio {
        padding: 14px 16px;
        font-size: 16px;
    }
}

