/*
Theme Name: Nooni Child
Theme URI: https://demo.theme-sky.com/nooni/
Author: Theme Sky Team
Author URI: http://theme-sky.com/
Description: A Premium and Responsive WordPress theme, designed for E-Commerce websites
Template: nooni
Version: 1.0.0
License: GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Tags: two-columns, left-sidebar, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
Text Domain: nooni-child
*/

/* ============================== */
/*       ESTILOS GENERALES        */
/* ============================== */

.mb100 {
    margin-bottom: 100px;
}

.mt100 {
    margin-top: 100px;
}

/* ============================== */
/*     CONTENEDOR PRINCIPAL       */
/* ============================== */

.map-finder-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    margin-bottom: 100px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ============================== */
/*      HEADER DE BÚSQUEDA        */
/* ============================== */

.search-header {
    background-color: #f8f9fa;
    padding: 25px 30px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.search-header h2 {
    font-size: 24px;
    font-weight: 300;
    color: #2c3e50;
    margin: 0 0 20px 0;
    letter-spacing: -0.5px;
}

.search-controls {
    display: flex;
    align-items: end;
    gap: 20px;
    flex-wrap: wrap;
}

.search-group {
    display: flex;
    flex-direction: column;
    min-width: 140px;
}

.search-group label {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
    min-height: 20px;
    display: block;
}

.search-group input,
.search-group select {
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    height: 42px;
    box-sizing: border-box;
    margin: 0;
}

.search-group input:focus,
.search-group select:focus {
    outline: none;
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-btn {
    background-color: #2c3e50;
    color: white;
    border: none;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    height: 42px;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
    margin: 0;
    margin-top: 26px; /* Compensar la altura del label + margin */
}

.search-btn:hover {
    background-color: #34495e;
    transform: translateY(-1px);
}

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

/* ============================== */
/*      CONTENIDO PRINCIPAL       */
/* ============================== */

.finder-content {
    display: flex;
    gap: 20px;
    min-height: 600px;
}

/* ============================== */
/*       SIDEBAR DE TIENDAS       */
/* ============================== */

.stores-sidebar {
    flex: 0 0 350px;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

#stores-list {
    height: 600px;
    overflow-y: auto;
    padding: 0;
}

/* Scrollbar personalizado */
#stores-list::-webkit-scrollbar {
    width: 6px;
}

#stores-list::-webkit-scrollbar-track {
    background: #f8f9fa;
}

#stores-list::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 3px;
}

#stores-list::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

.store-item {
    padding: 20px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.store-item:hover {
    background-color: #f8f9fa;
}

.store-item:last-child {
    border-bottom: none;
}

.store-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.store-address {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 4px;
    line-height: 1.4;
}

.store-city {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
    line-height: 1.4;
}

.store-schedule {
    font-size: 13px;
    color: #868e96;
    margin-bottom: 10px;
    font-style: italic;
}

.store-link {
    color: #345F76;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.store-link:hover {
    color: #345F76;
    text-decoration: underline;
}

/* ============================== */
/*         SECCIÓN DEL MAPA       */
/* ============================== */

.map-section {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

#map {
    width: 100%;
    height: 600px;
    border-radius: 8px;
}

/* ============================== */
/*       MARCADORES DEL MAPA      */
/* ============================== */

/* Marcadores circulares simples SIN BORDE BLANCO */
.circle-marker {
    background-color: #757C65 !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    transition: transform 0.3s ease !important;
    position: relative !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4) !important;
}

.circle-marker:hover {
    transform: scale(1.2) !important;
}

/* Forzar el color correcto en todos los marcadores SIN BORDE */
#map div[style*="border-radius"] {
    background-color: #757C65 !important;
    border: none !important;
}

/* Asegurar que funciona en dispositivos de alta densidad SIN BORDE */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .circle-marker {
        background-color: #757C65 !important;
        border: none !important;
    }
}

/* Forzar estilos en todos los elementos que puedan ser marcadores */
div[style*="757C65"] {
    border: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4) !important;
}

/* Eliminar cualquier borde blanco residual */
#map div[style*="border: "] {
    border: none !important;
}

#map div[style*="border-color"] {
    border: none !important;
}

#map div[style*="border-width"] {
    border: none !important;
}

/* ============================== */
/*      INFO WINDOWS DEL MAPA     */
/* ============================== */

#marker-content {
    width: 400px;
    max-width: 95vw;
    padding: 0;
    border-radius: 8px;
    color: #2c3e50;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    box-sizing: border-box;
}

.marker-title-header {
    background-color: #345F76;
    color: white;
    padding: 12px 15px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-radius: 0 !important;
}

.marker-content-body {
    padding: 15px;
    padding-right: 0 !important;
}

#marker-content table,
#marker-content td,
#marker-content th {
    border-style: none;
}

#marker-content td {
    padding: 6px 8px !important;
    vertical-align: top;
}

#marker-content .marker-customer-info-header {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    min-width: 80px;
}

#marker-content .marker-customer-info {
    font-size: 14px;
    color: #6c757d;
}

.marker-customer-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.marker-customer-footer a {
    color: #345F76;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.2s ease;
}

.marker-customer-footer a:hover {
    color: #345F76;
    text-decoration: underline;
}

/* ============================== */
/*         MEDIA QUERIES          */
/* ============================== */

/* Tablets */
@media (max-width: 1024px) {
    .map-finder-wrapper {
        padding: 0 15px;
    }

    .stores-sidebar {
        flex: 0 0 300px;
    }

    .finder-content {
        gap: 15px;
    }

    /* Ajustar popup para tablets */
    #marker-content {
        width: 350px;
        max-width: 90vw;
    }

    .marker-title-header {
        font-size: 15px !important;
        padding: 11px 14px !important;
    }

    #marker-content .marker-customer-info-header,
    #marker-content .marker-customer-info {
        font-size: 13px;
    }
}

/* Tablets pequeñas */
@media (max-width: 768px) {
    .search-header {
        padding: 20px;
    }

    .search-header h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .search-controls {
        gap: 15px;
    }

    .search-group {
        min-width: 120px;
    }

    .finder-content {
        flex-direction: column;
        gap: 15px;
    }

    .stores-sidebar {
        flex: none;
        order: 2;
        height: 300px;
    }

    #stores-list {
        height: 300px;
    }

    .map-section {
        order: 1;
        height: 400px;
    }

    #map {
        height: 400px;
    }
}

/* Móviles */
@media (max-width: 480px) {
    .map-finder-wrapper {
        padding: 0 10px;
    }

    .search-header {
        padding: 15px;
        margin-bottom: 15px;
    }

    .search-header h2 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .search-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-group {
        min-width: auto;
        width: 100%;
    }

    .search-group input,
    .search-group select,
    .search-btn {
        width: 100%;
        height: 44px;
    }

    .finder-content {
        gap: 10px;
    }

    .stores-sidebar {
        height: 250px;
    }

    #stores-list {
        height: 250px;
    }

    .store-item {
        padding: 15px;
    }

    .store-name {
        font-size: 15px;
    }

    .store-address,
    .store-city {
        font-size: 13px;
    }

    .map-section {
        height: 350px;
    }

    #map {
        height: 550px;
    }

    div[role="dialog"]{
        padding-right: 0 !important;
    }

    /* Info window en móvil */
    #marker-content {
        width: 320px;
        max-width: 90vw;
        font-size: 14px;
    }

    .marker-title-header {
        font-size: 15px !important;
        padding: 10px 12px !important;
        line-height: 1.3 !important;
        word-wrap: break-word;
        white-space: normal;
    }

    .marker-content-body {
        padding: 12px !important;
    }

    #marker-content table {
        width: 100%;
        table-layout: fixed;
    }

    #marker-content .marker-customer-info-header {
        font-size: 12px !important;
        width: 70px !important;
        padding: 4px 6px !important;
        white-space: nowrap;
        vertical-align: top;
    }

    #marker-content .marker-customer-info {
        font-size: 12px !important;
        padding: 4px 6px !important;
        word-wrap: break-word;
        line-height: 1.3;
    }

    .marker-customer-footer {
        margin-top: 10px !important;
        padding-top: 10px !important;
        text-align: center;
    }

    .marker-customer-footer a {
        font-size: 12px !important;
        padding: 6px 12px !important;
        display: inline-block;
        width: auto;
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
    .search-header h2 {
        font-size: 16px;
        line-height: 1.3;
    }

    .map-section {
        height: 300px;
    }

    #map {
        height: 300px;
    }

    .stores-sidebar {
        height: 200px;
    }

    #stores-list {
        height: 200px;
    }

    #marker-content {
        width: 280px;
        max-width: 85vw;
        font-size: 13px;
    }

    .marker-title-header {
        font-size: 14px !important;
        padding: 8px 10px !important;
    }

    #marker-content .marker-customer-info-header {
        font-size: 11px !important;
        width: 60px !important;
    }

    #marker-content .marker-customer-info {
        font-size: 11px !important;
    }

    .marker-customer-footer a {
        font-size: 11px !important;
        padding: 5px 10px !important;
    }
}

/* ============================== */
/*       ESTILOS LEGACY           */
/* ============================== */

/* Mantengo algunos estilos del código original para compatibilidad */
#map-customer-info-name {
    color: black;
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 30px;
}

.map-customer-info-description,
.map-customer-info-hours {
    color: black;
}

.map-customer-info-service-icon {
    font-size: 50px;
    width: 300px;
    height: 100%;
    text-align: center;
    margin-bottom: 100px;
    color: black;
}

.map-customer-info-service-name {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
}

#map-customer-map {
    display: block;
    position: relative;
    margin: auto;
    margin-top: 50px;
    margin-bottom: 100px;
    height: 500px;
    width: calc(100vw - 360px);
    z-index: 0;
    overflow: hidden;
}

.map-customer-info-hours table,
.map-customer-info-hours th,
.map-customer-info-hours td {
    text-align: left;
    border: none;
}

.sale-point-info {
    margin-top: 50px;
}

.sale-point-info .sale-point-info-header {
    color: black;
    font-size: 1.6em;
    font-weight: 700;
}

.sale-point-info-desc {
    color: black;
    font-weight: 500;
}

.sale-point-info-map {
    display: block;
    position: relative;
    margin: auto;
    margin-top: 30px;
    height: 300px;
    width: 500px;
    z-index: 0;
    overflow: hidden;
}

/* Responsive para estilos legacy */
@media (max-width: 768px) {
    #map-customer-info-name {
        text-align: center;
        font-size: 32px;
        margin-bottom: 20px;
    }

    .map-customer-info-description,
    .map-customer-info-hours {
        text-align: center;
    }

    #map-customer-map {
        width: 100%;
        margin-top: 30px;
        margin-bottom: 50px;
        height: 400px;
    }

    .map-customer-info-service-icon {
        font-size: 40px;
        width: 250px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 20px;
    }

    #map-customer-info {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ============================== */
/*         MEJORAS ADICIONALES    */
/* ============================== */

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Estados de focus mejorados */
.search-group input:focus,
.search-group select:focus {
    transform: translateY(-1px);
}

/* Animaciones suaves */
* {
    transition: all 0.2s ease;
}

/* Mejora de accesibilidad */
.search-btn:focus,
.store-link:focus {
    outline: 3px solid #ff6b35;
    outline-offset: 2px;
}

/* Estilos adicionales para forzar el header en Google Maps Info Windows */
.gm-style-iw-c .marker-header,
.gm-style-iw .marker-header,
div[role="dialog"] .marker-header {
    background-color: #2c3e50 !important;
    color: white !important;
    padding: 12px 15px !important;
    margin: -20px -20px 0 -20px !important; /* Compensar padding del info window */
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 8px 8px 0 0 !important;
    position: relative !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    text-align: left !important;
    line-height: 1.3 !important;
}

.gm-style-iw-c .marker-body,
.gm-style-iw .marker-body,
div[role="dialog"] .marker-body {
    padding: 15px 0 0 0 !important;
    background-color: white !important;
}

/* Ajustar el contenedor principal para el info window */
.gm-style-iw-c #marker-content,
.gm-style-iw #marker-content,
div[role="dialog"] #marker-content {
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 0px !important;
}

.gm-style-iw.gm-style-iw-c{
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.gm-ui-hover-effect{
    height: 30px !important;
    width: 30px !important;
}

.gm-ui-hover-effect span{
    height: 14px !important;
    width: 14px !important;
    margin: 10px !important;
}

/* ============================== */
/*     MEJORAS RESPONSIVAS        */
/* ============================== */

/* Asegurar que las info windows no se salgan de la pantalla */
.gm-style-iw-c {
    max-width: 95vw !important;
    max-height: 80vh !important;
}

.gm-style-iw-d {
    overflow: auto !important;
    max-height: 60vh !important;
}

/* Mejorar la visualización en pantallas pequeñas */
@media (max-width: 480px) {
    .gm-style-iw-c {
        max-width: 90vw !important;
        max-height: 70vh !important;
    }

    .gm-style-iw-d {
        max-height: 50vh !important;
    }

    /* Asegurar que el contenido del popup no cause scroll horizontal */
    #marker-content table {
        table-layout: fixed !important;
        word-break: break-word !important;
    }

    #marker-content .marker-customer-info {
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
}

/* Mejorar la experiencia táctil en móviles */
@media (pointer: coarse) {
    .marker-customer-footer a {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px 16px !important;
    }

    .store-link {
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        padding: 8px 12px !important;
    }
}

/* Asegurar que el mapa funcione bien en orientación horizontal en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    .finder-content {
        height: 300px !important;
    }

    #map {
        height: 300px !important;
    }

    .stores-sidebar {
        height: 300px !important;
    }

    #stores-list {
        height: 300px !important;
    }
}

#results-counter {
    padding: 10px 20px !important;
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    border-radius: 0 !important;
    margin: 0 !important;
    user-select: none !important;
    cursor: pointer !important;
    position: relative !important;
}

#results-counter:hover {
    background-color: #e9ecef !important;
    transform: translateX(2px) !important;
}

#results-counter:active {
    transform: translateX(1px) scale(0.98) !important;
}

/* Cuando hay búsqueda activa (verde) */
#results-counter[style*="28a745"] {
    border-left: 4px solid #28a745 !important;
}

#results-counter[style*="28a745"]:hover {
    background-color: #d4edda !important;
}

/* Cuando es vista completa (azul) */
#results-counter[style*="6c757d"] {
    border-left: 4px solid #345F76 !important;
}

#results-counter[style*="6c757d"]:hover {
    background-color: #d1ecf1 !important;
}

/* Estilos para el texto pequeño */
#results-counter small {
    display: block !important;
    margin-top: 4px !important;
    font-style: italic !important;
    opacity: 0.9 !important;
    font-weight: 400 !important;
}

/* Indicador visual que es clickeable */
#results-counter::after {
    content: "👆";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 12px;
}

#results-counter:hover::after {
    opacity: 0.6;
}

/* Animación sutil al cambiar */
#results-counter {
    animation: fadeIn 0.3s ease !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mejorar el botón de limpiar búsqueda */
.clear-search-btn {
    transition: all 0.2s ease !important;
}

.clear-search-btn:hover {
    background-color: #e9ecef !important;
    color: #dc3545 !important;
    transform: translateY(-50%) scale(1.1) !important;
}

.clear-search-btn:active {
    transform: translateY(-50%) scale(0.95) !important;
}

/* Responsive para el contador */
@media (max-width: 480px) {
    #results-counter {
        padding: 8px 15px !important;
        font-size: 13px !important;
    }

    #results-counter small {
        font-size: 11px !important;
    }

    #results-counter::after {
        right: 10px !important;
        font-size: 10px !important;
    }
}

@media (max-width: 360px) {
    #results-counter {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }

    #results-counter small {
        font-size: 10px !important;
    }
}