/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mejorar experiencia táctil en dispositivos móviles */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Evitar zoom accidental en inputs en iOS */
input, select, textarea {
    font-size: 16px !important;
}

#app {
    position: relative;
    width: 100%;
    height: 100vh;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
}

.header-content {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header h1 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.header h1 i {
    color: #e74c3c;
    margin-right: 10px;
}

.header p {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 300;
}

/* Panel de Control */
.control-panel {
    position: fixed;
    top: 100px;
    left: 20px;
    width: 350px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.control-panel.hidden {
    transform: translateX(-100%);
}

/* Búsqueda */
.search-container {
    margin-bottom: 20px;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #ecf0f1;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Filtros */
.filters-container {
    margin-bottom: 20px;
}

.filters-container h3 {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.filters-container h3 i {
    margin-right: 8px;
    color: #3498db;
}

.filter-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.filter-btn {
    padding: 8px 12px;
    border: 2px solid #ecf0f1;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-weight: 500;
    color: #7f8c8d;
    text-align: left;
}

.filter-btn i {
    margin-right: 5px;
}

.filter-btn:hover {
    border-color: #3498db;
    background: #ecf0f1;
}

.filter-btn.active {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

/* Indicadores de color para zonas */
.color-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    display: inline-block;
    flex-shrink: 0;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.filter-btn.active .color-indicator {
    border-color: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    transform: scale(1.1);
}

.filter-btn:hover .color-indicator {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Colores de texto que coinciden con los indicadores */
.filter-btn[data-zone="ciudad-amurallada"] {
    color: #e67e22 !important;
}

.filter-btn[data-zone="getsemani"] {
    color: #9b59b6 !important;
}

.filter-btn[data-zone="bocagrande"] {
    color: #3498db !important;
}

.filter-btn[data-zone="el-laguito"] {
    color: #1abc9c !important;
}

.filter-btn[data-zone="castillogrande"] {
    color: #34495e !important;
}

.filter-btn[data-zone="manga"] {
    color: #27ae60 !important;
}

.filter-btn[data-zone="pie-de-la-popa"] {
    color: #f39c12 !important;
}

.filter-btn[data-zone="centro"] {
    color: #e74c3c !important;
}

.filter-btn[data-zone="islas"] {
    color: #16a085 !important;
}

.filter-btn[data-zone="san-diego"] {
    color: #8e44ad !important;
}

.filter-btn[data-zone="all"] {
    color: #2c3e50 !important;
}

/* Cuando está activo, el texto debe ser blanco para buena legibilidad */
.filter-btn.active {
    color: white !important;
}

/* Rutas */
.route-container h3 {
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.route-container h3 i {
    margin-right: 8px;
    color: #e74c3c;
}

.route-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Buscadores de ruta */
.route-search-container {
    position: relative;
    margin-bottom: 10px;
}

.route-search-wrapper {
    position: relative;
}

.route-search-input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.route-search-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.route-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #bdc3c7;
    pointer-events: none;
}

.route-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #ecf0f1;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.route-search-dropdown.show {
    display: block;
}

.route-search-option {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.route-search-option:last-child {
    border-bottom: none;
}

.route-search-option:hover {
    background-color: #f8f9fa;
}

.route-search-option.selected {
    background-color: #3498db;
    color: white;
}

.route-search-option.current-location {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
}

.route-search-option.current-location:hover {
    background-color: #bbdefb;
}

.route-search-option i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.route-search-option .option-name {
    flex: 1;
    font-weight: 500;
}

.route-search-option .option-zone {
    font-size: 0.8rem;
    opacity: 0.7;
}

.route-search-no-results {
    padding: 15px;
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    font-size: 0.9rem;
}

/* Texto resaltado en búsqueda */
.route-search-option strong {
    background-color: #fff3cd;
    color: #856404;
    padding: 1px 2px;
    border-radius: 2px;
}

.route-search-option.selected strong {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.route-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
    overflow-x: auto;
    padding: 5px 0 10px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.route-buttons::-webkit-scrollbar {
    height: 6px;
}

.route-buttons::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.route-buttons::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.route-buttons::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.route-btn, .clear-btn, .location-route-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    white-space: nowrap;
}

.location-route-btn {
    padding: 10px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    min-width: 40px;
}

.route-btn {
    background: #27ae60;
    color: white;
}

.route-btn:hover {
    background: #2ecc71;
}

.location-route-btn:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.location-route-btn:active {
    transform: scale(0.95);
}

.clear-btn {
    background: #e74c3c;
    color: white;
}

.clear-btn:hover {
    background: #c0392b;
}

.route-btn i, .clear-btn i {
    margin-right: 8px;
}

/* Mapa */
#map {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 320px;
    height: calc(100vh - 140px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar.hidden {
    transform: translateX(100%);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    color: #2c3e50;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.sidebar-header h3 i {
    margin-right: 8px;
    color: #9b59b6;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #7f8c8d;
    transition: color 0.3s ease;
}

.toggle-btn:hover {
    color: #2c3e50;
}

/* Asegurar que el botón toggle sidebar esté visible en desktop */
#toggleSidebar {
    display: block;
}

/* Botón para mostrar sidebar cuando está oculta */
.show-sidebar-btn {
    position: fixed;
    top: 120px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1200;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #7f8c8d;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.show-sidebar-btn:hover {
    background: white;
    color: #2c3e50;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.show-sidebar-btn.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.places-list {
    padding: 10px;
    height: calc(100% - 80px);
    overflow-y: auto;
}

.place-item {
    margin-bottom: 10px;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    overflow: hidden;
}

.place-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.place-item:hover .action-btn {
    opacity: 1;
    transform: scale(1.02);
}

.place-zone-indicator {
    width: 6px;
    min-width: 6px;
    background-color: #7f8c8d;
    transition: all 0.3s ease;
    position: relative;
}

.place-item:hover .place-zone-indicator {
    width: 8px;
    min-width: 8px;
}

.place-item:hover .place-zone-indicator::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    opacity: 0.3;
    filter: blur(4px);
    z-index: -1;
}

.place-content {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.place-item h4 {
    color: #2c3e50;
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.place-item p {
    color: #7f8c8d;
    font-size: 0.8rem;
    line-height: 1.4;
}

.place-item .category {
    display: inline-block;
    padding: 2px 8px;
    background: #ecf0f1;
    border-radius: 10px;
    font-size: 0.7rem;
    color: #7f8c8d;
    margin-top: 8px;
}

/* Acciones de lugar */
.place-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

.action-btn {
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #3498db;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    opacity: 0.9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.action-btn:hover {
    opacity: 1;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn i {
    font-size: 1.3rem;
}

/* Tooltip personalizado para botones */
.custom-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.custom-tooltip.show {
    opacity: 1;
    visibility: visible;
    animation: tooltipFadeIn 0.3s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Posición relativa para los contenedores de botones */
.place-actions,
.popup-actions {
    position: relative;
}

/* Estilos para la zona tag */
.place-content .zone {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 4px;
}

/* Botón toggle panel */
.toggle-panel-btn {
    position: fixed;
    top: 120px;
    left: 390px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #7f8c8d;
}

.toggle-panel-btn:hover {
    background: white;
    color: #2c3e50;
    transform: scale(1.1);
}

/* Popups personalizados */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.popup-content {
    padding: 15px;
    max-width: 250px;
}

.popup-content h3 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.popup-content p {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.popup-content .rating {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.popup-content .rating .stars {
    color: #f39c12;
    margin-right: 5px;
}

.popup-content .category-tag {
    display: inline-block;
    padding: 4px 8px;
    background: #3498db;
    color: white;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Tooltips instantáneos para botones */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.instant-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.1s ease, visibility 0.1s ease;
    z-index: 10000;
    pointer-events: none;
}

.instant-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

.tooltip-wrapper:hover .instant-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Acciones en popup */
.popup-actions {
    margin: 12px 0 8px 0;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

.popup-action-btn {
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #e74c3c;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.popup-action-btn:hover {
    background: #c0392b;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.popup-action-btn:active {
    transform: translateY(0);
}

.popup-action-btn i {
    font-size: 1.3rem;
}

/* Botón específico de Waze */
.popup-action-btn.waze-btn {
    background: #00d4ff;
}

.popup-action-btn.waze-btn:hover {
    background: #00b8e6;
}

.action-btn.waze-action {
    background-color: #00d4ff !important;
}

.action-btn.waze-action:hover {
    background-color: #00b8e6 !important;
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.4) !important;
}

.popup-action-btn.waze-btn:hover {
    background: #00b8e6;
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.4);
}

/* Notificaciones de Waze */
.waze-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideInFromRight 0.3s ease-out;
    max-width: 300px;
}

.waze-notification.success {
    background: rgba(0, 212, 255, 0.95);
    color: white;
    border-left: 4px solid #00b8e6;
}

.waze-notification.error {
    background: rgba(231, 76, 60, 0.95);
    color: white;
    border-left: 4px solid #c0392b;
}

.waze-notification .notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.waze-notification .notification-content i {
    font-size: 24px;
    opacity: 0.9;
}

.waze-notification .notification-text h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
}

.waze-notification .notification-text p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

/* Ajustes móvil para notificaciones Waze */
@media (max-width: 768px) {
    .waze-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        padding: 12px 15px;
    }
    
    .waze-notification .notification-content i {
        font-size: 20px;
    }
    
    .waze-notification .notification-text h4 {
        font-size: 13px;
    }
    
    .waze-notification .notification-text p {
        font-size: 11px;
    }
}

/* Diseño tipo aplicación móvil */
@media (max-width: 768px) {
    body {
        background: #f8f9fa;
    }
    
    /* Header tipo app móvil */
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
        z-index: 1000;
        padding: 8px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .header h1 {
        font-size: 1.1rem;
        margin-bottom: 2px;
        font-weight: 600;
    }
    
    .header p {
        font-size: 0.75rem;
        opacity: 0.7;
    }
    
    /* Panel de control tipo modal en móvil */
    .control-panel {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 0;
        padding: 80px 20px 100px 20px;
        box-shadow: none;
        z-index: 2000;
        max-height: none;
        transform: translateY(-100%);
        transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    .toggle-panel-btn{
        top: 20px;
    }
    .control-panel:not(.hidden) {
        transform: translateY(0);
    }
    
    /* Botón de cerrar panel en móvil */
    .control-panel::before {
        content: "✕";
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 1.5rem;
        color: #7f8c8d;
        cursor: pointer;
        z-index: 2001;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.05);
    }
    
    /* Búsqueda tipo app */
    .search-box input {
        padding: 16px 20px 16px 50px;
        border-radius: 30px;
        font-size: 16px;
        border: 2px solid #e9ecef;
        background: #f8f9fa;
    }
    
    .search-box i {
        left: 20px;
        font-size: 16px;
    }
    
    /* Filtros tipo app móvil */
    .filters-container h3 {
        font-size: 1.1rem;
        margin-bottom: 20px;
        color: #2c3e50;
        font-weight: 600;
    }
    
    .filter-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .filter-btn {
        padding: 16px 20px;
        border-radius: 25px;
        font-size: 14px;
        font-weight: 500;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
        border: 2px solid #f1f3f4;
        background: white;
        transition: all 0.2s ease;
    }
    
    .filter-btn:active {
        transform: scale(0.98);
    }
    
    /* Controles de ruta tipo app */
    .route-container h3 {
        font-size: 1.1rem;
        margin-bottom: 20px;
        font-weight: 600;
    }
    
    .route-search-input {
        padding: 16px 50px 16px 20px;
        border-radius: 25px;
        font-size: 16px;
        border: 2px solid #e9ecef;
        background: #f8f9fa;
    }
    
    .route-search-icon {
        right: 20px;
        font-size: 16px;
    }
    
    .route-search-dropdown {
        border-radius: 0 0 20px 20px;
        max-height: 250px;
    }
    
    .route-search-option {
        padding: 16px 20px;
        font-size: 15px;
    }
    
    .route-search-option .option-zone {
        font-size: 0.85rem;
    }
    
    .route-buttons {
        gap: 15px;
        padding: 8px 0 15px 0;
    }
    
    .route-btn, .clear-btn {
        padding: 16px 24px;
        border-radius: 25px;
        font-size: 16px;
        font-weight: 600;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        min-width: auto;
    }
    
    .location-route-btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        padding: 0;
        font-size: 18px;
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
        flex-shrink: 0;
    }
    
         /* Sidebar tipo drawer en móvil */
     .sidebar {
         position: fixed;
         bottom: 0;
         top: auto;
         left: 0;
         right: 0;
         width: 100%;
         height: 40vh;
         max-height: 50vh;
         background: rgba(255, 255, 255, 0.98);
         backdrop-filter: blur(20px);
         border-radius: 25px 25px 0 0;
         box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.1);
         z-index: 1500;
         transform: translateY(0);
         transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
         border: 1px solid rgba(0, 0, 0, 0.05);
         will-change: transform;
     }
    
    .sidebar.hidden {
        transform: translateY(calc(100% - 60px));
    }
    
    .sidebar-header {
        padding: 20px 25px 15px 25px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        position: relative;
        cursor: pointer;
        transition: background-color 0.2s ease;
    }
    
    .sidebar-header:active {
        background-color: rgba(0, 0, 0, 0.02);
    }
    
    .sidebar-header::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #bbb;
        border-radius: 2px;
        transition: background-color 0.2s ease;
    }
    
    .sidebar-header:active::before {
        background: #999;
    }
    
    .sidebar-header h3 {
        font-size: 1.1rem;
        font-weight: 600;
        margin: 0;
    }
    
    .places-list {
        padding: 15px 25px 25px 25px;
        height: calc(100% - 80px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .place-item {
        margin-bottom: 15px;
        border-radius: 20px;
        background: white;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(0, 0, 0, 0.02);
        display: flex;
        overflow: hidden;
    }
    
    .place-zone-indicator {
        width: 8px;
        min-width: 8px;
    }
    
    .place-item:hover .place-zone-indicator {
        width: 10px;
        min-width: 10px;
    }
    
    .place-content {
        flex: 1;
        padding: 20px;
        display: flex;
        flex-direction: column;
    }
    
    .place-item h4 {
        font-size: 1rem;
        margin-bottom: 8px;
        font-weight: 600;
    }
    
    .place-item p {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 10px;
    }
    
    .place-actions {
        margin-top: 15px;
        display: flex;
        gap: 8px;
        align-items: center;
        justify-content: flex-start;
    }
    
    .action-btn {
        padding: 0;
        font-size: 0.9rem;
        border-radius: 50%;
        width: 42px;
        height: 42px;
    }
    
    .action-btn i {
        font-size: 1.4rem;
    }
    
    .popup-action-btn {
        width: 42px;
        height: 42px;
    }
    
    .popup-action-btn i {
        font-size: 1.4rem;
    }
    
    /* Ajustes de tooltips para móvil */
    .instant-tooltip {
        font-size: 11px;
        padding: 5px 8px;
        bottom: 110%;
    }
    
    .instant-tooltip::after {
        border-width: 4px;
        border-top-color: rgba(0, 0, 0, 0.9);
    }
    
    .place-content .zone {
        padding: 6px 12px;
        font-size: 0.75rem;
        border-radius: 15px;
        margin-top: 10px;
        margin-bottom: 5px;
    }
    
         /* Botón toggle tipo FAB */
     .toggle-panel-btn {
         position: fixed !important;
         bottom: 100px;
         right: 20px !important;
         left: auto;
         width: 56px;
         height: 56px;
         background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
         border: none;
         border-radius: 50%;
         cursor: pointer;
         box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
         z-index: 1600;
         transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
         display: flex;
         align-items: center;
         justify-content: center;
         font-size: 1.4rem;
         color: white;
         will-change: transform;
         position: relative;
     }
     
     /* Badge de zona activa en el FAB */
     .toggle-panel-btn .zone-badge {
         position: absolute;
         top: -2px;
         right: -2px;
         background: #e74c3c;
         color: white;
         border-radius: 50%;
         width: 20px;
         height: 20px;
         display: flex;
         align-items: center;
         justify-content: center;
         font-size: 10px;
         font-weight: 600;
         border: 2px solid white;
         box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
     }
     
     /* Animación de pulso para indicar interacción en móvil */
     @keyframes fabPulse {
         0% {
             box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
         }
         50% {
             box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5), 0 0 0 8px rgba(102, 126, 234, 0.1);
         }
         100% {
             box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
         }
     }
     
     /* Aplicar pulso cuando se necesita indicar interacción */
     .toggle-panel-btn.pulse {
         animation: fabPulse 3s infinite;
     }
     
     /* Tooltip para el botón FAB en móvil */
     .toggle-panel-btn::after {
         content: "Filtros";
         position: absolute;
         right: 70px;
         top: 50%;
         transform: translateY(-50%);
         background: rgba(0, 0, 0, 0.8);
         color: white;
         padding: 8px 12px;
         border-radius: 20px;
         font-size: 12px;
         font-weight: 500;
         white-space: nowrap;
         opacity: 0;
         visibility: hidden;
         transition: all 0.3s ease;
         pointer-events: none;
     }
     
     .toggle-panel-btn.pulse::after {
         opacity: 1;
         visibility: visible;
         animation: tooltipPulse 3s infinite;
     }
     
     @keyframes tooltipPulse {
         0%, 70% {
             opacity: 1;
         }
         80%, 100% {
             opacity: 0.7;
         }
     }
     
    .toggle-panel-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
    }
    
    .toggle-panel-btn:active {
        transform: scale(0.95);
    }
    
    /* Mapa que ocupa toda la pantalla */
    #map {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
    }
    
    /* Ocultar toggle sidebar en móvil */
    #toggleSidebar {
        display: none;
    }
    
    /* Ocultar botón show sidebar en móvil */
    .show-sidebar-btn {
        display: none;
    }
    
    /* Animaciones tipo app */
    .filter-btn, .place-item, .route-btn, .clear-btn {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Mejores scrollbars en móvil */
    .control-panel::-webkit-scrollbar,
    .places-list::-webkit-scrollbar {
        width: 2px;
    }
    
    .control-panel::-webkit-scrollbar-thumb,
    .places-list::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 1px;
    }
}

/* Scrollbar personalizado */
.control-panel::-webkit-scrollbar,
.places-list::-webkit-scrollbar {
    width: 6px;
}

.control-panel::-webkit-scrollbar-track,
.places-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.control-panel::-webkit-scrollbar-thumb,
.places-list::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 3px;
}

.control-panel::-webkit-scrollbar-thumb:hover,
.places-list::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* Botón de ubicación actual */
.location-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    z-index: 1600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.location-btn:hover {
    background: #0056b3;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.location-btn:active {
    transform: scale(0.95);
}

.location-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* Marcador de ubicación del usuario */
.user-location-icon {
    background: transparent !important;
    border: none !important;
}

.user-location-marker {
    position: relative;
    width: 20px;
    height: 20px;
}

.user-location-dot {
    width: 12px;
    height: 12px;
    background: #007bff;
    border: 3px solid white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.user-location-pulse {
    width: 20px;
    height: 20px;
    background: rgba(0, 123, 255, 0.2);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: userLocationPulse 2s infinite;
}

@keyframes userLocationPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    70% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
    }
}

/* Notificaciones de ubicación */
.location-notification {
    position: fixed;
    top: 120px;
    right: 20px;
    background: white;
    padding: 12px 16px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    animation: slideInFromRight 0.3s ease;
    max-width: 280px;
}

.location-notification.success {
    color: #27ae60;
    border-left: 4px solid #27ae60;
}

.location-notification.error {
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
}

.notification-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.notification-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive para botón de ubicación en móvil */
@media (max-width: 768px) {
    .location-btn {
        position: fixed !important;
        bottom: 220px;
        right: 85px !important;
        left: auto;
        width: 55px;
        height: 55px;
        background: #007bff;
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
        z-index: 1550;
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .location-notification {
        top: 80px;
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 13px;
    }
}

/* Sugerencia de ubicación */
.location-suggestion {
    position: fixed;
    bottom: 30px;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    animation: slideInFromBottom 0.4s ease;
    max-width: 400px;
    margin: 0 auto;
}

.suggestion-content {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 15px;
}

.suggestion-content > i {
    font-size: 1.8rem;
    color: #007bff;
    min-width: 30px;
}

.suggestion-text {
    flex: 1;
}

.suggestion-text h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
}

.suggestion-text p {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.85rem;
    line-height: 1.4;
}

.suggestion-buttons {
    display: flex;
    gap: 8px;
}

.btn-accept, .btn-dismiss {
    padding: 8px 12px;
    border: none;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-accept {
    background: #007bff;
    color: white;
}

.btn-accept:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.btn-dismiss {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

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

@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive para sugerencia en móvil */
@media (max-width: 768px) {
    .location-suggestion {
        bottom: 20px;
        left: 15px;
        right: 15px;
        max-width: none;
    }
    
    .suggestion-content {
        padding: 15px;
        gap: 12px;
    }
    
    .suggestion-content > i {
        font-size: 1.5rem;
        min-width: 25px;
    }
    
    .suggestion-text h4 {
        font-size: 0.9rem;
    }
    
    .suggestion-text p {
        font-size: 0.8rem;
    }
    
    .btn-accept, .btn-dismiss {
                 padding: 7px 10px;
         font-size: 0.75rem;
     }
}

/* Panel de información de ruta */
.route-info-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2400;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.route-info-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.route-info-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    z-index: 2500;
    width: 350px;
    max-width: 90vw;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: default;
}

.route-info-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.route-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px 25px;
    border-bottom: 1px solid #f0f0f0;
}

.route-info-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-info-header h4 i {
    color: #e74c3c;
}

.close-route-info {
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: all 0.2s ease;
}

.close-route-info:hover {
    background: #e9ecef;
    color: #495057;
}

.route-info-content {
    padding: 20px 25px 25px 25px;
}

.route-points {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.route-point {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 500;
}

.route-point.start {
    background: #e8f5e8;
    color: #2d5a2d;
}

.route-point.start i {
    color: #27ae60;
}

.route-point.end {
    background: #e3f2fd;
    color: #1565c0;
}

.route-point.end i {
    color: #2196f3;
}

.route-arrow {
    display: flex;
    justify-content: center;
    margin: 5px 0;
    color: #bdc3c7;
}

.route-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #3498db;
}

.stat-icon {
    background: #3498db;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.stat-info {
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 2px;
}

.stat-value {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

.route-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: center;
}

.route-waze-btn {
    background: linear-gradient(135deg, #00d4ff 0%, #00a8e6 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    min-width: 200px;
    justify-content: center;
}

.route-waze-btn:hover {
    background: linear-gradient(135deg, #00b8e6 0%, #0096cc 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.4);
}

.route-waze-btn:active {
    transform: translateY(0);
}

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

.route-waze-btn span {
    font-size: 14px;
}

/* Responsive para móvil */
@media (max-width: 768px) {
    .route-info-panel {
        width: 320px;
        top: 45%;
    }
    
    .route-info-header {
        padding: 18px 20px 12px 20px;
    }
    
    .route-info-header h4 {
        font-size: 1rem;
    }
    
    .route-info-content {
        padding: 18px 20px 20px 20px;
    }
    
    .route-points {
        margin-bottom: 18px;
    }
    
    .route-point {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .route-stats {
        gap: 12px;
    }
    
    .stat-item {
        padding: 12px;
        gap: 10px;
    }
    
    .stat-icon {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .stat-value {
        font-size: 0.9rem;
    }
    
    .route-actions {
        margin-top: 15px;
        padding-top: 15px;
    }
    
    .route-waze-btn {
        padding: 10px 20px;
        font-size: 13px;
        min-width: 180px;
    }
    
    .route-waze-btn i {
        font-size: 14px;
    }
    
    .route-waze-btn span {
        font-size: 13px;
    }
}

/* Responsive para navegación en móvil */
@media (max-width: 768px) {
    .navigation-panel {
        top: 15px;
        width: calc(100vw - 30px);
        left: 15px;
        transform: translateX(0);
        border-radius: 15px;
    }
    
    .navigation-panel.active {
        transform: translateX(0) translateY(0);
    }
    
    .navigation-header {
        padding: 15px 18px 12px 18px;
    }
    
    .navigation-destination span {
        font-size: 0.9rem;
    }
    
    .navigation-content {
        padding: 15px 18px 18px 18px;
    }
    
    .navigation-stats {
        gap: 12px;
        margin-bottom: 18px;
    }
    
    .nav-stat {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .nav-stat-icon {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .nav-stat-label {
        font-size: 0.7rem;
    }
    
    .nav-stat-value {
        font-size: 0.9rem;
    }
    
    .navigation-status {
        padding: 10px;
        font-size: 0.8rem;
    }
    
    .navigation-compass {
        margin-top: 8px;
        gap: 8px;
    }
    
    .compass-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .compass-ring {
        width: 50px;
        height: 50px;
    }
    
    .compass-info {
        gap: 5px;
    }
    
    .compass-info span {
        font-size: 0.7rem;
    }
    
    .navigation-instruction {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

.calibration-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    text-align: center;
}

@keyframes calibrationPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.calibration-content h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.calibration-content p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.compass-ring.calibrated {
    border-color: #27ae60 !important;
}

.compass-ring.calibrating {
    animation: compassCalibrating 2s infinite;
}

@keyframes compassCalibrating {
    0%, 100% {
        border-color: #e74c3c;
        transform: rotate(0deg);
    }
    50% {
        border-color: #f39c12;
        transform: rotate(180deg);
    }
}

#map.navigation-mode {
    filter: brightness(0.9);
}

#map.navigation-mode .leaflet-control-zoom {
    display: none;
}

/* =================== ESTILOS PARA COMPARTIR UBICACIONES =================== */

/* Modal de compartir */
.share-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.share-modal {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    animation: modalSlideIn 0.3s ease 0.1s forwards;
}

.share-modal-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-modal-header h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin: 0;
    display: flex;
    align-items: center;
}

.share-modal-header h3 i {
    color: #3498db;
    margin-right: 10px;
}

.close-share-modal {
    background: none;
    border: none;
    color: #95a5a6;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-share-modal:hover {
    background: #ecf0f1;
    color: #e74c3c;
}

.share-modal-content {
    padding: 20px 25px 25px;
}

.share-modal-content p {
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 500;
}

.share-url-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.share-url-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #f8f9fa;
    color: #2c3e50;
}

.copy-url-btn {
    padding: 12px 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.copy-url-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.share-text-area {
    width: 100%;
    height: 120px;
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
    font-size: 0.9rem;
    background: #f8f9fa;
    color: #2c3e50;
}

/* Botones de compartir en popups y sidebar */
.popup-action-btn.share-btn {
    background: #3498db;
    color: white;
}

.popup-action-btn.share-btn:hover {
    background: #2980b9;
}

.action-btn.share-action {
    background: #3498db !important;

}

.action-btn.share-action:hover {
    background: #2980b9 !important;
    transform: translateY(-2px);
}

/* Ajustar layout de acciones en popup */
.popup-actions {
    display: flex;
    gap: 8px;
    margin: 15px 0 10px 0;
}

.popup-action-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.popup-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Notificación de fallback de ubicación */
.location-notification.fallback {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.location-notification.fallback i {
    color: white;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Responsive para modal de compartir */
@media (max-width: 768px) {
    .share-modal {
        width: 95%;
        margin: 20px;
    }
    
    .share-modal-header {
        padding: 15px 20px 10px;
    }
    
    .share-modal-header h3 {
        font-size: 1.1rem;
    }
    
    .share-modal-content {
        padding: 15px 20px 20px;
    }
    
    .share-url-container {
        flex-direction: column;
    }
    
    .copy-url-btn {
        align-self: stretch;
    }
    
    /* Ajustar popup actions en móvil */
    .popup-actions {
        flex-direction: column;
        gap: 6px;
        align-items: center;
    }
    
    .popup-action-btn {
        font-size: 0.8rem;
        padding: 10px 12px;
    }
}

/* Mejoras adicionales para accesibilidad */
.share-modal:focus-within {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.copy-url-btn:focus,
.close-share-modal:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Estados de loading para botones de compartir */
.share-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.share-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Marcadores personalizados */
.custom-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.custom-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Etiquetas graduales estilo Google Maps con anti-colisión */
.leaflet-tooltip.place-label {
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 500;
    color: #2c3e50;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(3px);
    white-space: nowrap;
    max-width: 120px;
    text-overflow: ellipsis;
    overflow: hidden;
    line-height: 1.2;
    text-align: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
}

/* Estilos por prioridad */
.leaflet-tooltip.priority-1 {
    /* Prioridad alta (hoteles, fortalezas) - aparecen en zoom 13+ */
    font-size: 11px;
    font-weight: 600;
    padding: 3px 7px;
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.leaflet-tooltip.priority-2 {
    /* Prioridad media (restaurantes, museos) - aparecen en zoom 15+ */
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
}

.leaflet-tooltip.priority-3 {
    /* Prioridad baja (farmacias, supermercados) - aparecen en zoom 16+ */
    font-size: 9px;
    font-weight: 400;
    padding: 2px 5px;
    opacity: 0.9;
    color: #555;
}

/* Efecto hover para mejor interacción */
.leaflet-tooltip.place-label:hover {
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    transform: scale(1.02);
}

/* Etiquetas mostradas temporalmente por hover - Aspecto natural */
.leaflet-tooltip.place-label[data-showing-on-hover="true"] {
    background-color: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(52, 152, 219, 0.6);
    box-shadow: 0 3px 8px rgba(52, 152, 219, 0.2);
    font-weight: 500;
    animation: hoverTooltipAppear 0.15s ease-out;
    z-index: 2000 !important;
}

@keyframes hoverTooltipAppear {
    from {
        opacity: 0;
        transform: translateY(3px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Ajustes para móvil */
@media (max-width: 768px) {
    .leaflet-tooltip.place-label {
        font-size: 9px;
        padding: 2px 4px;
        max-width: 100px;
    }
    
    .leaflet-tooltip.priority-1 {
        font-size: 10px;
        padding: 2px 5px;
    }
    
    .leaflet-tooltip.priority-2 {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    .leaflet-tooltip.priority-3 {
        font-size: 8px;
        padding: 1px 3px;
    }
}

/* Mejorar la interacción hover en los marcadores */
.custom-marker {
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-marker:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    z-index: 1001;
}

/* Efecto especial para marcadores con etiquetas ocultas */
.leaflet-marker-icon:hover {
    filter: brightness(1.1);
}
