/* ========================================
   OVERLAY DEL MODAL
   ======================================== */
.overlay-mapa-bordadoras {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.overlay-mapa-bordadoras.activo {
    display: block;
    opacity: 1;
}

/* ========================================
   MODAL FULLSCREEN
   ======================================== */
.modal-mapa-bordadoras {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: white;
    flex-direction: column;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
}
.modal-mapa-bordadoras.activo {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   HEADER
   ======================================== */
.modal-mapa__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #d4526e, #ff6b7a);
    color: white;
    flex-shrink: 0;
}
.modal-mapa__header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}
.modal-mapa__close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s ease;
    line-height: 0;
}
.modal-mapa__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ========================================
   CONTENIDO
   ======================================== */
.modal-mapa__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}
.modal-mapa__map {
    flex: 1;
    position: relative;
    background: #f0f0f0;
    min-height: 0;
}

/* ========================================
   SIDEBAR / LISTA DE PARADAS
   ======================================== */
.modal-mapa__sidebar {
    width: 100%;
    padding: 16px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    overflow-y: auto;
    max-height: 38vh;
    flex-shrink: 0;
}
.modal-mapa__sidebar h3 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 16px;
    border-bottom: 2px solid #d4526e;
    padding-bottom: 8px;
}
.paradas-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
}
.parada-item-modal {
    padding: 10px;
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}
.parada-item-modal:hover {
    border-color: #d4526e;
    background: #fff;
    box-shadow: 0 2px 6px rgba(212, 82, 110, 0.2);
    transform: translateY(-2px);
}
.parada-item-modal.active {
    background: #ffe8ec;
    border-color: #d4526e;
}
.parada-item-modal strong {
    display: block;
    font-size: 18px;
    color: #d4526e;
    margin-bottom: 4px;
}
.parada-item-modal small {
    display: block;
    font-size: 11px;
    color: #888;
    line-height: 1.3;
}

/* ========================================
   FOOTER
   ======================================== */
.modal-mapa__footer {
    padding: 10px 20px;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    flex-shrink: 0;
}
.modal-mapa__hint {
    margin: 0;
    font-size: 13px;
    color: #666;
}

/* ========================================
   POPUP LEAFLET
   ======================================== */
.modal-mapa__map .leaflet-popup-content {
    margin: 8px;
    font-size: 13px;
}

/* ========================================
   RESPONSIVE - TABLET / DESKTOP
   ======================================== */
@media (min-width: 768px) {
    .modal-mapa-bordadoras {
        border-radius: 12px;
        inset: 40px;
        transform: scale(0.95);
    }
    .modal-mapa-bordadoras.activo {
        transform: scale(1);
    }
    .modal-mapa__header {
        border-radius: 12px 12px 0 0;
    }
    .modal-mapa__content {
        flex-direction: row;
    }
    .modal-mapa__sidebar {
        width: 300px;
        max-width: 300px;
        max-height: 100%;
        border-top: none;
        border-left: 1px solid #e0e0e0;
        padding: 20px;
    }
    .paradas-list {
        grid-template-columns: 1fr;
    }
    .parada-item-modal {
        text-align: left;
        display: flex;
        align-items: baseline;
        gap: 10px;
    }
    .parada-item-modal strong {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .parada-item-modal small {
        font-size: 13px;
        text-align: left;
    }
}

@media (min-width: 1024px) {
    .modal-mapa-bordadoras {
        inset: 60px;
    }
    .modal-mapa__sidebar {
        width: 340px;
        max-width: 340px;
    }
}

/* ========================================
   MÓVIL
   ======================================== */
@media (max-width: 767px) {
    .modal-mapa-bordadoras {
        border-radius: 0;
    }
}

@media print {
    .modal-mapa-bordadoras,
    .overlay-mapa-bordadoras {
        display: none !important;
    }
}
