/* Estilos para añadir paradas manualmente */
#addStopButton {
    background-color: #9b59b6;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#addStopButton:hover {
    background-color: #8e44ad;
}

/* Estilo para el modal de añadir parada */
.modal-content h2 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}body {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-size: 16px;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 14px;
    }
}
.container {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
h1 {
    color: #2c3e50;
    text-align: center;
}
.input-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

@media (max-width: 768px) {
    .input-section {
        padding: 10px;
    }
    
    .input-section input[type="text"] {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 15px;
    }
    
    .input-section input[type="file"] {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .input-section button {
        width: 100%;
        padding: 12px 15px;
        font-size: 16px;
    }
}
label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
input, button {
    padding: 8px;
    margin-bottom: 10px;
}
button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
button:hover {
    background-color: #2980b9;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Ajustes para columnas móviles */
    .mobile-hidden {
        display: none;
    }
    
    th, td {
        padding: 6px 4px;
        font-size: 13px;
    }
    
    /* Hacer que la columna de acciones sea fija */
    .row-actions {
        min-width: 100px;
    }
}
th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
th {
    background-color: #3498db;
    color: white;
}
tr:nth-child(even) {
    background-color: #f2f2f2;
}
.status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}
.success {
    background-color: #d4edda;
    color: #155724;
}
.error {
    background-color: #f8d7da;
    color: #721c24;
}
.loading {
    text-align: center;
    margin: 20px 0;
    display: none;
}
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 2s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#map {
    height: 500px;
    width: 100%;
    margin-top: 20px;
    border-radius: 5px;
}

@media (max-width: 768px) {
    #map {
        height: 350px; /* Mapa más pequeño en móviles */
    }
}
.map-container {
    margin-top: 30px;
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0,0,0,0.05);
}

/* Contenedor para el filtro */
.filter-container {
    margin: 10px 0;
    width: 100%;
}

.filter-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.filter-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

@media (max-width: 768px) {
    .filter-input {
        font-size: 14px;
        padding: 8px;
    }
}

.button-container {
    margin: 10px 0 15px;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .button-container {
        text-align: center;
        justify-content: center;
    }
    
    #downloadButton, #addStopButton, #recalculateButton {
        width: 100%;
        padding: 12px 15px;
        margin-bottom: 5px;
        font-size: 16px;
    }
}

#downloadButton {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#downloadButton:hover {
    background-color: #219653;
}

#downloadButton:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* Estilos para la modal de configuración */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.config-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.config-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.form-group label {
    width: 150px;
    margin-right: 10px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.form-group input[type="range"] {
    flex: 1;
    margin-right: 10px;
}

.help-text {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
    margin-left: 16px;
}

.algorithm-settings {
    margin-top: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

.config-button {
    background-color: #007bff;
}

.config-button:hover {
    background-color: #0069d9;
}

.primary-button {
    background-color: #27ae60;
    width: 180px;
}

.secondary-button {
    background-color: #6c757d;
    width: 180px;
}

.buttons-container {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.storage-notice {
    text-align: center;
    background-color: #f0f8ff; /* Azul muy claro */
    padding: 10px 15px;
    border-radius: 5px;
    margin: 15px 0;
    color: #1E90FF; /* Azul brillante */
    border-left: 4px solid #1E90FF;
    font-size: 0.9em;
}

/* Estilos para los iconos y botones de acción */
tr {
    position: relative;
}

tr .row-actions {
    display: flex;
    justify-content: flex-end;
    visibility: visible;
    position: static;
    padding: 2px 0;
}

@media (max-width: 768px) {
    tr .row-actions {
        flex-direction: column;
        align-items: center;
    }
}

/* Efecto hover para las filas */
tr:hover {
    background-color: rgba(231, 76, 60, 0.1) !important;
}

.row-actions button {
    background: none;
    border: none;
    cursor: pointer;
    margin: 0 2px;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    font-size: 18px;
}

@media (max-width: 768px) {
    .row-actions button {
        padding: 10px;
        margin: 2px;
        font-size: 20px; /* Botones más grandes para móviles */
    }
}

.remove-btn {
    color: #e74c3c;
}

.remove-btn:hover {
    background-color: rgba(231, 76, 60, 0.1);
}

/* Estilo para filas ignoradas */
tr.ignored {
    opacity: 0.5;
    text-decoration: line-through;
    background-color: #f8f8f8 !important;
}

/* Botón para recalcular */
.recalculate-container {
    margin: 15px 0;
    display: none;
}

#recalculateButton {
    background-color: #e67e22;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#recalculateButton:hover {
    background-color: #d35400;
}

@media (max-width: 768px) {
    #recalculateButton {
        width: 100%;
        padding: 12px 15px;
        font-size: 16px;
    }
}

/* Estilos para navegación secuencial */
.sequential-navigation {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    background-color: #f1f9ff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.sequential-nav-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sequential-nav-content h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.current-stop-info {
    background-color: #fff;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    width: 100%;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nav-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.nav-buttons button {
    padding: 8px 15px;
    font-weight: bold;
}

@media (max-width: 768px) {
    .sequential-navigation {
        padding: 10px;
    }
    
    .nav-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-buttons button {
        width: 100%;
        margin: 5px 0;
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .current-stop-info {
        font-size: 14px;
    }
}

#nav-to-current-btn {
    background-color: #3498db;
}

#mark-current-completed-btn {
    background-color: #27ae60;
}

#reset-route-btn {
    background-color: #e67e22;
    padding: 8px 15px;
    font-weight: bold;
}

@media (max-width: 768px) {
    #reset-route-btn {
        width: 100%;
        padding: 12px 15px;
        font-size: 16px;
    }
}

/* Estilos para filas completadas */
tr.completed {
    background-color: #d4edda !important;
    color: #155724;
}

tr.completed:hover {
    background-color: #c3e6cb !important;
}

/* Estilos para botones de acción adicionales */
.navigate-btn {
    color: #3498db;
}

.navigate-btn:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.complete-btn {
    color: #27ae60;
}

.complete-btn:hover {
    background-color: rgba(39, 174, 96, 0.1);
}

/* Estilos para el nuevo PlaceAutocompleteElement */
#startPointContainer {
    width: 100%;
    margin-bottom: 10px;
}

#startPointContainer gmp-place-autocomplete {
    width: 100%;
}

#startPointContainer input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

/* Cuando está dentro de un contenedor con ancho limitado */
.input-section #startPointContainer {
    width: 300px;
}

@media (max-width: 768px) {
    .input-section #startPointContainer,
    #startPointContainer {
        width: 100%;
    }
}