/**
 * Estilos para el mapa interactivo de comercios (aicatalogvendor)
 */

.aicatalog-stores-container {
    margin-bottom: 40px;
}

.aicatalog-stores-list-wrapper {
    max-height: 680px;
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-width: thin;
}

.aicatalog-stores-list-wrapper::-webkit-scrollbar {
    width: 6px;
}

.aicatalog-stores-list-wrapper::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.aicatalog-map-sticky {
    position: sticky;
    top: 20px;
}

#aicatalog-stores-map {
    height: 680px;
    width: 100%;
    min-height: 400px;
    z-index: 1;
}

.aicatalog-store-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid transparent;
}

.aicatalog-store-card:hover {
    border-left-color: #0d6efd;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08) !important;
}

.aicatalog-store-card.is-selected {
    border-left-color: #0d6efd;
    background-color: #f8faff;
    box-shadow: 0 0.25rem 0.75rem rgba(13, 110, 253, 0.15) !important;
}

/* Popups de Leaflet */
.aicatalog-popup-content {
    min-width: 220px;
    max-width: 280px;
    font-family: inherit;
}

.aicatalog-popup-thumb {
    width: 100%;
    height: 100px;
    object-fit: contain;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 8px;
    border: 1px solid #e9ecef;
}

.aicatalog-popup-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.aicatalog-popup-title a {
    color: #0d6efd;
    text-decoration: none;
}

.aicatalog-popup-title a:hover {
    text-decoration: underline;
}

.aicatalog-popup-address {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
}

.aicatalog-popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.aicatalog-popup-actions .btn {
    font-size: 11px;
    padding: 3px 8px;
}

/* Responsividad en tabletas y moviles */
@media (max-width: 991px) {
    #aicatalog-stores-map {
        height: 380px;
        margin-bottom: 20px;
    }
    .aicatalog-stores-list-wrapper {
        max-height: none;
        overflow-y: visible;
    }
}

/*
 * Botones del globo del mapa.
 *
 * Leaflet pinta con su azul TODO enlace que haya dentro del mapa
 * (.leaflet-container a { color: #0078A8 }) y gana a .btn-primary por
 * especificidad -0,1,1 contra 0,1,0-, asi que los botones del globo salian con
 * el texto azul sobre fondo azul y verde: ilegibles. Se devuelve el color que
 * les corresponde, con la especificidad suficiente para que mande esta regla.
 */
.leaflet-container .aicatalog-popup-actions .btn-primary,
.leaflet-container .aicatalog-popup-actions .btn-primary:hover,
.leaflet-container .aicatalog-popup-actions .btn-primary:focus,
.leaflet-container .aicatalog-popup-actions .btn-success,
.leaflet-container .aicatalog-popup-actions .btn-success:hover,
.leaflet-container .aicatalog-popup-actions .btn-success:focus {
    color: #fff;
}

.leaflet-container .aicatalog-popup-actions .btn-outline-secondary,
.leaflet-container .aicatalog-popup-actions .btn-outline-secondary:focus {
    color: #212529;
}

.leaflet-container .aicatalog-popup-actions .btn-outline-secondary:hover {
    color: #fff;
}
