/* Estilos para chips/tags de sedes - Diseño compacto y responsive */

/* Contenedor de chips de sedes */
.sedes-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
    align-items: center;
}

/* Chip individual de sede - Optimizado para ser más compacto */
.sede-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px; /* Reducido de 4px 10px */
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 1px solid #dee2e6;
    border-radius: 4px; /* Cambiado de 16px (ovalado) a 4px (rectángulo redondeado suave) para mejor uso de espacio */
    font-size: 0.7rem; /* Reducido de 0.75rem */
    font-weight: 500;
    color: #495057;
    transition: all 0.2s ease;
    white-space: nowrap;
    max-width: fit-content; /* Permitir que se ajuste al contenido */
    min-width: 60px;
    justify-content: center;
}

/* Chip hover effect */
.sede-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(21, 101, 192, 0.2);
    background: linear-gradient(135deg, #bbdefb, #90caf9);
    border-color: #42a5f5;
}

/* Chip para sedes inactivas */
.sede-chip.inactive {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    border-color: #bdbdbd;
    color: #616161;
    opacity: 0.8;
}

/* Chip para sedes activas - Colores más suaves y profesionales */
.sede-chip.active {
    background: #e7f3ff;
    border-color: #b3d7ff;
    color: #0061c2;
}

/* Contador de sedes adicionales - Más discreto */
.sedes-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    background: #f1f3f5;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #6c757d;
    margin-left: 2px;
    cursor: help;
}

.sedes-counter:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

/* Tooltip para mostrar todas las sedes */
.sedes-tooltip {
    position: absolute;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-width: 300px;
    font-size: 0.8rem;
    color: #424242;
    display: none;
}

.sedes-tooltip.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.sedes-tooltip-content {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Versión compacta para tarjetas pequeñas */
.sedes-chips-container.compact {
    gap: 4px;
}

.sedes-chips-container.compact .sede-chip {
    padding: 2px 8px;
    font-size: 0.7rem;
    border-radius: 12px;
    max-width: 100px;
}

/* Responsive design para chips */
@media (max-width: 768px) {
    .sedes-chips-container {
        gap: 4px;
    }
    
    .sede-chip {
        padding: 3px 8px;
        font-size: 0.7rem;
        max-width: 100px;
    }
    
    .sedes-chips-container.compact .sede-chip {
        padding: 2px 6px;
        font-size: 0.65rem;
        max-width: 80px;
    }
}

@media (max-width: 480px) {
    .sedes-chips-container {
        justify-content: flex-start; /* Alineado a la izquierda para mejor lectura en móvil */
        gap: 3px;
    }
    
    .sede-chip {
        padding: 2px 5px;
        font-size: 0.65rem;
        min-width: 50px;
    }
    
    .sedes-chips-container.compact .sede-chip {
        padding: 1px 4px;
        font-size: 0.6rem;
        min-width: 45px;
    }
}

/* Animación para chips */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para tarjetas de tarifa con chips mejorados */
.rate-card .sedes-chips-container {
    margin: 8px 0 12px 0;
}

.rate-card .sede-chip {
    animation: fadeIn 0.3s ease;
    animation-fill-mode: both;
}

/* Delay para animación escalonada de chips */
.rate-card .sede-chip:nth-child(1) { animation-delay: 0.1s; }
.rate-card .sede-chip:nth-child(2) { animation-delay: 0.2s; }
.rate-card .sede-chip:nth-child(3) { animation-delay: 0.3s; }
.rate-card .sede-chip:nth-child(4) { animation-delay: 0.4s; }
.rate-card .sede-chip:nth-child(5) { animation-delay: 0.5s; }
.rate-card .sede-chip:nth-child(6) { animation-delay: 0.6s; }
.rate-card .sede-chip:nth-child(7) { animation-delay: 0.7s; }
.rate-card .sede-chip:nth-child(8) { animation-delay: 0.8s; }
.rate-card .sede-chip:nth-child(9) { animation-delay: 0.9s; }
.rate-card .sede-chip:nth-child(10) { animation-delay: 1.0s; }

/* Clase para mostrar sedes en línea horizontal con scroll si es necesario */
.sedes-chips-container.scrollable {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: #90caf9 #f5f5f5;
}

.sedes-chips-container.scrollable::-webkit-scrollbar {
    height: 4px;
}

.sedes-chips-container.scrollable::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 2px;
}

.sedes-chips-container.scrollable::-webkit-scrollbar-thumb {
    background: #90caf9;
    border-radius: 2px;
}

.sedes-chips-container.scrollable::-webkit-scrollbar-thumb:hover {
    background: #42a5f5;
}
