/**
 * Estilos del Buscador de Sucursales
 */

.sucursales-buscador-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Header */
.sb-header {
    text-align: center;
    margin-bottom: 20px;
}

.sb-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 5px 0;
}

.sb-subtitle {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

/* Búsqueda */
.sb-search-wrapper {
    margin-bottom: 15px;
}

.sb-search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.sb-search-input {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.95rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
}

.sb-search-input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.sb-search-button {
    padding: 10px 18px;
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sb-search-button:hover {
    background: linear-gradient(135deg, #005177 0%, #003d5a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.sb-search-button:active {
    transform: translateY(0);
}

/* Filtros */
.sb-filters {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.sb-filter-select {
    padding: 8px 16px;
    font-size: 0.9rem;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    background: white;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    min-width: 160px;
    flex: 1;
}

.sb-filter-select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Loading */
.sb-loading {
    text-align: center;
    padding: 25px 20px;
}

.sb-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sb-loading p {
    color: #666;
    font-size: 0.9rem;
}

/* Error */
.sb-error {
    background: #fee;
    border: 2px solid #fcc;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    margin: 15px 0;
}

.sb-error p {
    color: #c33;
    margin: 0;
    font-size: 0.9rem;
}

/* Resultados */
.sb-results {
    margin-top: 20px;
}

.sb-results-header {
    margin-bottom: 15px;
    text-align: center;
}

.sb-results-count {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

/* Swiper Container */
.sb-swiper-wrapper {
    margin-top: 15px;
    position: relative;
    padding: 0 45px;
}

.sb-swiper {
    width: 100%;
    padding-bottom: 40px;
}

.sb-swiper .swiper-slide {
    height: auto;
    display: flex;
}

.sb-swiper .swiper-slide > div {
    width: 100%;
}

.sb-sucursal-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 18px;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sb-sucursal-card:hover {
    border-color: #0073aa;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.sb-sucursal-nombre {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.sb-sucursal-info {
    margin: 8px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #555;
    font-size: 0.9rem;
}

.sb-sucursal-info svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    color: #0073aa;
}

.sb-sucursal-info span {
    flex: 1;
    line-height: 1.5;
}

.sb-oficinas-info {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin-top: 8px;
    border-left: 3px solid #0073aa;
}

.sb-oficinas-info span {
    font-size: 0.9rem;
}

.sb-oficinas-info strong {
    color: #0073aa;
    font-weight: 600;
}

.sb-sucursal-acciones {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    gap: 8px;
}

.sb-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.sb-btn-primary {
    background: #0073aa;
    color: white;
}

.sb-btn-primary:hover {
    background: #005177;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.sb-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.sb-btn-secondary:hover {
    background: #e0e0e0;
}

/* Mapa */
.sb-map-container {
    margin-top: 25px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.sb-map {
    width: 100%;
    height: auto;
    background: #f0f0f0;
}

/* Estado inicial */
.sb-initial-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.sb-initial-state svg {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
    opacity: 0.4;
}

.sb-initial-state p {
    font-size: 0.95rem;
    margin: 0;
    color: #666;
}

/* Sin resultados */
.sb-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.sb-no-results svg {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.sb-no-results p {
    font-size: 0.95rem;
    margin: 0;
}

/* Botones de navegación Swiper */
.sb-swiper-button-next,
.sb-swiper-button-prev {
    color: #0073aa;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sb-swiper-button-next:hover,
.sb-swiper-button-prev:hover {
    background: #0073aa;
    color: white;
    transform: scale(1.1);
}

.sb-swiper-button-next::after,
.sb-swiper-button-prev::after {
    font-size: 16px;
    font-weight: bold;
}

/* Paginación Swiper */
.sb-swiper-pagination {
    position: relative;
    margin-top: 20px;
}

.sb-swiper-pagination .swiper-pagination-bullet {
    background: #0073aa;
    opacity: 0.3;
    width: 12px;
    height: 12px;
    transition: all 0.3s ease;
}

.sb-swiper-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
    .sb-title {
        font-size: 1.5rem;
    }
    
    .sb-search-box {
        flex-direction: column;
    }
    
    .sb-filters {
        flex-direction: column;
    }
    
    .sb-filter-select {
        width: 100%;
    }
    
    .sb-swiper-wrapper {
        padding: 0 35px;
    }
    
    .sb-swiper-button-next,
    .sb-swiper-button-prev {
        width: 32px;
        height: 32px;
    }
    
    .sb-swiper-button-next::after,
    .sb-swiper-button-prev::after {
        font-size: 13px;
    }
    
    .sb-sucursal-acciones {
        flex-direction: column;
    }
    
    .sb-map {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .sb-swiper-wrapper {
        padding: 0 30px;
    }
    
    .sb-swiper-button-next,
    .sb-swiper-button-prev {
        width: 28px;
        height: 28px;
    }
    
    .sb-swiper-button-next::after,
    .sb-swiper-button-prev::after {
        font-size: 12px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sb-sucursal-card {
    animation: fadeIn 0.3s ease;
}

