/* Estilos generales */
body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
    color: #333;
}

header, footer {
    background-color: #004d99;
    color: white;
    padding: 15px;
    text-align: center;
}

main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Estilos del formulario de búsqueda */
#search-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

#search-form input[type="text"] {
    padding: 10px;
    width: 300px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#search-form button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#search-form button:hover {
    background-color: #0056b3;
}

/* Estilos del mapa */
#map {
    height: 400px;
    width: 100%;
    margin-bottom: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
}

/* Estilos de la tabla de resultados */
#results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#results-table th, #results-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

#results-table td, #results-table th {
    border: 1px solid #ddd;
    padding: 12px;
    vertical-align: middle; /* Centrar verticalmente */
    text-align: center;     /* Centrar horizontalmente */
}


#results-table th {
    background-color: #007bff;
    color: white;
}

#results-table tr:hover {
    background-color: #f1f1f1;
    cursor: pointer;
}

/* Modal personalizado */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
    margin: auto;
}

.modal-content h2 {
    margin-top: 0;
}

.close-modal {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.close-modal:hover {
    background-color: #0056b3;
}

/* Responsive */
@media (max-width: 768px) {
    #search-form {
        flex-direction: column;
        align-items: center;
    }

    #search-form input[type="text"],
    #search-form button {
        width: 100%;
        max-width: 300px;
    }
}



.radius-label {
    background-color: white;
    border: 1px solid black;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    color: black;
}

#results-table tbody tr {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#results-table tbody tr:hover {
    background-color: #f0f0f0;
}

.leaflet-popup-content {
    font-size: 14px;
    font-weight: bold;
    color: black;
    text-align: center;
    margin: 5px 0;
}

.leaflet-popup-content-wrapper {
    background-color: white;
    border: 1px solid #004d99;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.error-message {
    background-color: #fff4f4;
    color: #b20000;
    border: 1px solid #f3c2c2;
    border-radius: 6px;
    padding: 12px 20px;
    font-size: 16px;
    margin: 20px auto;
    text-align: center;
    max-width: 600px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
