/* Fuentes de Google */
@import url('https://fonts.googleapis.com/css2?family=Julius+Sans+One&family=Work+Sans:wght@400;500&display=swap');

/*
 * Estilos Generales del Formulario
 * -------------------------------------------------- */
#sdm-new-store-form {
    font-family: 'Work Sans', sans-serif;
    color: #333;
    max-width: 700px;
    margin: 2em auto;
    padding: 2em;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Títulos del formulario */
#sdm-new-store-form h2 {
    font-family: 'Julius Sans One', sans-serif !important;
    color: #000;
    margin-top: 1em;
    margin-bottom: 0.5em;
    border-bottom: 2px solid #b01741;
    padding-bottom: 0.3em;
}

#sdm-new-store-form h2:first-of-type {
    margin-top: 0;
}

/* Párrafos y etiquetas */
#sdm-new-store-form p {
    margin-bottom: 1.5em;
}

#sdm-new-store-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5em;
}

/* Campos de entrada y textarea */
#sdm-new-store-form input[type="text"],
#sdm-new-store-form input[type="url"],
#sdm-new-store-form textarea {
    width: 100% !important; /* Forzar ancho */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Asegura que el padding no afecte el ancho */
    font-family: 'Work Sans', sans-serif;
    transition: border-color 0.3s ease;
}

#sdm-new-store-form input[type="text"]:focus,
#sdm-new-store-form input[type="url"]:focus,
#sdm-new-store-form textarea:focus {
    border-color: #b01741 !important;
    outline: none !important;
    box-shadow: 0 0 5px rgba(176, 23, 65, 0.3);
}

/* Pequeñas ayudas de texto */
#sdm-new-store-form small {
    display: block;
    margin-top: 0.5em;
    color: #777;
    font-size: 0.9em;
}

/* Línea divisoria */
#sdm-new-store-form hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 2em 0;
}

/* Contenedor de reCAPTCHA */
.sdm-recaptcha-container {
    text-align: center;
    margin: 20px 0 !important;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.sdm-recaptcha-container .g-recaptcha {
    display: inline-block;
}

/* Botón de envío */
#sdm-new-store-form input[type="submit"] {
    font-family: 'Work Sans', sans-serif;
    font-weight: 500;
    font-size: 1em;
    color: #fff !important;
    background-color: #b01741 !important;
    border: none !important;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#sdm-new-store-form input[type="submit"]:hover,
#sdm-new-store-form input[type="submit"]:focus {
    background-color: #8c1232 !important; /* Un tono más oscuro */
    outline: none;
}

/*
 * Estilos de los Filtros del Mapa
 * -------------------------------------------------- */
#sdm-map-filters {
    font-family: 'Work Sans', sans-serif;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-top: none;
    margin: 0 -1.5em; /* Compensar padding de la sidebar */
    padding: 1.5em;
}

#sdm-map-filters h3 {
    font-family: 'Julius Sans One', sans-serif !important;
    margin-top: 0;
    color: #000;
    border-bottom: 2px solid #b01741;
    padding-bottom: 0.3em;
}

#sdm-map-filters p {
    margin: 1em 0;
}

#sdm-map-filters label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5em;
}

#sdm-map-filters input[type="text"],
#sdm-map-filters select {
    width: 100% !important;
    padding: 10px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
    font-family: 'Work Sans', sans-serif !important;
    background-color: #fff !important;
    color: #333 !important;
    margin-bottom: 10px;
}

#sdm-map-filters input[type="text"]:focus,
#sdm-map-filters select:focus {
    border-color: #b01741 !important;
    outline: none !important;
    box-shadow: 0 0 5px rgba(176, 23, 65, 0.3);
}

#sdm-map-filters button {
    font-family: 'Work Sans', sans-serif;
    font-weight: 500;
    font-size: 1em;
    color: #fff !important;
    background-color: #b01741 !important;
    border: none !important;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-right: 10px;
    margin-bottom: 10px;
}

#sdm-map-filters button:hover,
#sdm-map-filters button:focus {
    background-color: #8c1232 !important;
}

#sdm-map-filters button#sdm-reset-filter-btn {
    background-color: #6c757d !important;
}
#sdm-map-filters button#sdm-reset-filter-btn:hover,
#sdm-map-filters button#sdm-reset-filter-btn:focus {
    background-color: #5a6268 !important;
}

/*
 * Estilos del Popup de Búsqueda por Radio
 * -------------------------------------------------- */
#sdm-radius-popup {
    font-family: 'Work Sans', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px; /* Espacio entre los elementos */
}

#sdm-radius-popup div.input-group {
    display: flex;
    align-items: center;
}

#sdm-radius-popup label {
    margin-right: 8px;
    color: #333;
}

#sdm-radius-popup input[type="number"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 60px; /* Ancho fijo para el input */
    text-align: center;
}

#sdm-radius-popup button {
    font-family: 'Work Sans', sans-serif;
    padding: 10px 15px;
    color: #fff;
    background-color: #b01741;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%; /* El botón ocupa todo el ancho */
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}

#sdm-radius-popup button:hover {
    background-color: #8c1232;
}

/*
 * Estilos del Popup del Marcador
 * -------------------------------------------------- */

/* Contenedor principal del popup */
.leaflet-popup-content-wrapper {
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

.leaflet-popup-content {
    font-family: 'Work Sans', sans-serif !important;
    color: #333;
    margin: 15px 20px !important;
    line-height: 1.6;
    min-width: 200px !important;
}

/* Título de la tienda dentro del popup */
.leaflet-popup-content strong {
    font-family: 'Julius Sans One', sans-serif !important;
    font-size: 1.2em !important;
    color: #000 !important;
    display: block;
    margin-bottom: 5px;
}

/* Enlaces dentro del popup */
.leaflet-popup-content a {
    color: #b01741 !important;
    text-decoration: none !important;
    font-weight: 500;
    transition: text-decoration 0.2s ease;
}

.leaflet-popup-content a:hover {
    text-decoration: underline !important;
}

/* Botón de Google Maps */
.leaflet-popup-content a.sdm-popup-btn {
    display: block !important;
    margin-top: 15px !important;
    padding: 10px 15px !important;
    background-color: #b01741 !important;
    color: #fff !important;
    border-radius: 4px !important;
    text-align: center;
    font-weight: 500;
    text-decoration: none !important;
    transition: background-color 0.3s ease;
}

.leaflet-popup-content a.sdm-popup-btn:hover {
    background-color: #8c1232 !important;
    text-decoration: none !important;
}

/* Flecha del popup */
.leaflet-popup-tip {
    background: #fff !important;
}

/* Botón de cerrar (X) */
.leaflet-popup-close-button {
    color: #999 !important;
    padding: 8px 8px 0 0 !important;
}

.leaflet-popup-close-button:hover {
    color: #000 !important;
}

/*
 * Estructura Principal del Mapa y Sidebar
 * -------------------------------------------------- */
#sdm-main-container {
    display: flex;
    flex-wrap: wrap;
    font-family: 'Work Sans', sans-serif;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

#sdm-sidebar {
    width: 350px;
    background-color: #fff;
    padding: 1.5em;
    height: 80vh; /* Misma altura que el mapa */
    overflow-y: auto; /* Scroll si el contenido es largo */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#sdm-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #b01741;
    padding-bottom: 0.5em;
}

#sdm-sidebar-header h2 {
    font-family: 'Julius Sans One', sans-serif !important;
    margin: 0;
    font-size: 1.5em;
}

#sdm-toggle-filters-btn {
    cursor: pointer;
    color: #b01741;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

#sdm-toggle-filters-btn svg {
    width: 24px;
    height: 24px;
}

#sdm-toggle-filters-btn:hover {
    color: #8c1232;
}

#sdm-map-container {
    flex: 1; /* El mapa ocupa el resto del espacio */
    height: 80vh;
}

#sdm-results-list-container {
    flex-grow: 1;
    overflow-y: auto;
    margin: 0 -1.5em; /* Compensar padding para que el scroll funcione bien */
    padding: 0 1.5em;
}

#sdm-sidebar h4 {
    font-family: 'Julius Sans One', sans-serif !important;
    margin-top: 2em;
    color: #000;
}

/*
 * Estilos de la Lista de Resultados
 * -------------------------------------------------- */
#sdm-results-list .sdm-result-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#sdm-results-list .sdm-result-item:hover {
    background-color: #f9f9f9;
}

#sdm-results-list .sdm-result-item.sdm-active-item {
    background-color: #f8d7da; /* Color de acento suave */
}

#sdm-results-list .sdm-result-item h5 {
    font-family: 'Julius Sans One', sans-serif !important;
    margin: 0 0 5px 0;
    color: #b01741;
}

#sdm-results-list .sdm-result-item p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

/*
 * Marcador personalizado del mapa (Icono en círculo)
 * -------------------------------------------------- */

.sdm-custom-marker {
    background: #b01741 !important; /* Color corporativo */
    border-radius: 50% !important; /* Círculo perfecto */
    border: 2px solid #fff !important; /* Borde blanco para resaltar */
    width: 36px !important;
    height: 36px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

/* El SVG del icono dentro del círculo */
.sdm-hero-marker {
    width: 20px !important;
    height: 20px !important;
}

@media (max-width: 768px) {
    #sdm-sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh; /* Limitar altura en móvil */
    }
    #sdm-map-container {
        height: 60vh;
    }
} 