/* ============================================
   FUENTES
   ============================================ */
@font-face {
    font-family: 'Montserrat';
    src: url('/assets/Montserrat-Regular.woff2') format('woff2'),
         url('/assets/Montserrat-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('/assets/Montserrat-Bold.woff2') format('woff2'),
         url('/assets/Montserrat-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}

body, .controls-container, .custom-dropdown, .custom-slider, .custom-button, .custom-toggle-button, #info-registro, .contact-button-circle {
    font-family: 'Montserrat', sans-serif;
}

/* ============================================
   UTILIDADES
   ============================================ */
.hidden {
    display: none;
}

.visible {
    display: block;
}

/* ============================================
   CONTENEDOR DE CONTROLES (PANEL FILTROS)
   ============================================ */
.controls-container {
    position: absolute;
    top: 100px;
    left: 10px;
    z-index: 1000;
    width: 22%;
    height: auto !important;
    background-color: #104547 !important;
    color: #fffff5 !important;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.4);
    gap: 8px;
    flex-direction: column;
    max-height: 80vh;
    overflow-y: auto;
}

.controls-container > * {
    margin-bottom: 15px;
}

@media (max-width: 1440px) {
    .controls-container {
        width: 30%;
    }
}

@media (max-width: 1024px) {
    .controls-container {
        width: 30%;
    }
}

@media (max-width: 768px) {
    .controls-container {
        width: 90%;
        left: 5%;  
    }
}

@media (max-width: 430px) {
    .controls-container {
        width: 85% !important;
        left: 5%;  
    }
}

@media (max-width: 425px) {
    .controls-container {
        width: 85% !important;
        left: 5%;  
    }
}

@media (max-width: 375px) {
    .controls-container {
        width: 85%;
        left: 5%;  
    }
}

/* ============================================
   DROPDOWNS - Dash 4.0.0 (ULTRA ESPECÍFICO)
   ============================================ */

/* Contenedor principal */
.custom-dropdown {
    width: 80% !important;
    margin: 10px auto !important;
}

/* Forzar fondo oscuro en TODO el dropdown */
.custom-dropdown *:not(input):not(svg) {
    background-color: #104547 !important;
}

/* Control principal - el campo cerrado */
.custom-dropdown > div,
.custom-dropdown > div > div,
.custom-dropdown [class*="control"],
.custom-dropdown .dropdown__control {
    background-color: #104547 !important;
    border: 1px solid #fffff5 !important;
    border-radius: 4px !important;
    min-height: 38px !important;
}

/* Contenedor de valores */
.custom-dropdown [class*="ValueContainer"],
.custom-dropdown .dropdown__value-container {
    background-color: #104547 !important;
    padding: 2px 8px !important;
}

/* Placeholder */
.custom-dropdown [class*="placeholder"],
.custom-dropdown .dropdown__placeholder {
    color: #fffff5 !important;
    font-size: 0.8em !important;
    background-color: transparent !important;
}

/* Valor único seleccionado */
.custom-dropdown [class*="singleValue"],
.custom-dropdown .dropdown__single-value {
    color: #fffff5 !important;
    font-size: 0.8em !important;
    background-color: transparent !important;
}

/* Chips de valores múltiples */
.custom-dropdown [class*="multiValue"],
.custom-dropdown .dropdown__multi-value {
    background-color: #145a3d !important;
    border-radius: 4px !important;
    margin: 2px !important;
}

.custom-dropdown [class*="multiValue"] *,
.custom-dropdown .dropdown__multi-value * {
    background-color: #145a3d !important;
}

.custom-dropdown [class*="multiValueLabel"],
.custom-dropdown .dropdown__multi-value__label {
    color: #fffff5 !important;
    font-size: 0.8em !important;
    padding: 2px 6px !important;
}

/* Botón X para quitar selección */
.custom-dropdown [class*="multiValueRemove"],
.custom-dropdown .dropdown__multi-value__remove {
    color: #fffff5 !important;
    cursor: pointer !important;
    padding: 0 4px !important;
}

.custom-dropdown [class*="multiValueRemove"]:hover,
.custom-dropdown .dropdown__multi-value__remove:hover {
    background-color: rgba(255, 0, 0, 0.5) !important;
    color: #fff !important;
}

/* Input cuando escribís */
.custom-dropdown input {
    color: #fffff5 !important;
    background-color: transparent !important;
}

/* Indicadores (flechita, separador) */
.custom-dropdown [class*="IndicatorsContainer"],
.custom-dropdown .dropdown__indicators {
    background-color: #104547 !important;
}

.custom-dropdown [class*="indicatorSeparator"],
.custom-dropdown .dropdown__indicator-separator {
    background-color: #fffff5 !important;
}

.custom-dropdown [class*="indicatorContainer"] svg,
.custom-dropdown .dropdown__dropdown-indicator svg,
.custom-dropdown .dropdown__clear-indicator svg {
    fill: #fffff5 !important;
}

/* MENÚ DESPLEGABLE - CRÍTICO */
.custom-dropdown [class*="menu"],
.custom-dropdown .dropdown__menu {
    background-color: #104547 !important;
    border: 1px solid #fffff5 !important;
    z-index: 1500 !important;
}

/* Forzar fondo oscuro en todo el menú */
.custom-dropdown [class*="menu"] *,
.custom-dropdown .dropdown__menu * {
    background-color: #104547 !important;
}

/* Lista de opciones */
.custom-dropdown [class*="MenuList"],
.custom-dropdown .dropdown__menu-list {
    background-color: #104547 !important;
    padding: 0 !important;
}

/* Cada opción individual */
.custom-dropdown [class*="option"],
.custom-dropdown .dropdown__option {
    background-color: #104547 !important;
    color: #fffff5 !important;
    padding: 8px 12px !important;
    cursor: pointer !important;
    font-size: 0.8em !important;
}

/* Opción con hover */
.custom-dropdown [class*="option"]:hover,
.custom-dropdown .dropdown__option:hover,
.custom-dropdown [class*="option--is-focused"],
.custom-dropdown .dropdown__option--is-focused {
    background-color: #145a3d !important;
    color: #fffff5 !important;
}

/* Opción seleccionada */
.custom-dropdown [class*="option--is-selected"],
.custom-dropdown .dropdown__option--is-selected {
    background-color: #0d3d2e !important;
    color: #fffff5 !important;
    font-weight: bold !important;
}

/* Ocultar checkboxes */
.custom-dropdown input[type="checkbox"] {
    display: none !important;
}

/* Ocultar Select All/Deselect All */
.custom-dropdown [class*="group"]:first-child,
.custom-dropdown .dropdown__group:first-child {
    display: none !important;
}

/* Ocultar "No results" */
.custom-dropdown [class*="menu-notice"],
.custom-dropdown .dropdown__menu-notice,
.Select-noresults {
    display: none !important;
}

/* ============================================
   RANGE SLIDER - Dash 4.0.0 (colores antiguos)
   ============================================ */
.controls-container .custom-slider {
    width: 77% !important;
    margin: 0 auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Rail - pista completa */
.controls-container .custom-slider .rc-slider-rail {
    background-color: #666 !important; /* gris oscuro */
    height: 4px !important;
}

/* Track - pista activa */
.controls-container .custom-slider .rc-slider-track {
    background-color: #dac69a !important; /* amarillo/beige */
    height: 4px !important;
}

/* Handle - manijas */
.controls-container .custom-slider .rc-slider-handle {
    border: 2px solid #dac69a !important;
    background-color: #dac69a !important;
    width: 16px !important;
    height: 16px !important;
    margin-top: -6px !important;
}

/* Hover / Focus manijas */
.controls-container .custom-slider .rc-slider-handle:hover,
.controls-container .custom-slider .rc-slider-handle:active,
.controls-container .custom-slider .rc-slider-handle:focus {
    border-color: #dac69a !important;
    box-shadow: 0 0 0 5px rgba(218, 198, 154, 0.2) !important;
}

/* Dots */
.controls-container .custom-slider .rc-slider-dot {
    border-color: #dac69a !important;
    background-color: #104547 !important;
}

/* Dots activos */
.controls-container .custom-slider .rc-slider-dot-active {
    border-color: #dac69a !important;
}

/* Texto marcas (min / max) */
.controls-container .custom-slider .rc-slider-mark-text {
    color: #fffff5 !important; /* blanco */
    font-size: 12px !important;
}

/* Tooltip */
.controls-container .custom-slider .rc-slider-tooltip-inner {
    background-color: #dac69a !important; /* beige */
    color: #104547 !important;           /* texto verde oscuro */
    border: 1px solid #dac69a !important;
    min-width: 30px !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
}

/* Flechita tooltip */
.controls-container .custom-slider .rc-slider-tooltip-arrow {
    border-top-color: #dac69a !important;
}




/* ============================================
   LEYENDA DE COLORES
   ============================================ */
.color-legend {
    display: flex !important;
    width: 80%;
    min-height: 10px !important;
    margin: 10px auto;
    height: 10px;
    visibility: visible !important;
    position: relative;
    z-index: 1 !important;
    min-width: 200px;
    max-width: 80%;
    margin-bottom: 0px !important;
    background-color: transparent !important;
}

.color-legend div {
    height: 100%;
    flex: 1;
}

.color-legend .color-1 { 
    background-color: #ff0000 !important;
}
.color-legend .color-2 { 
    background-color: #800080 !important;
}
.color-legend .color-3 { 
    background-color: #00ced1 !important;
}
.color-legend .color-4 { 
    background-color: #f5deb3 !important;
}
.color-legend .color-5 { 
    background-color: #008000 !important;
}

@media (max-width: 768px) {
    .color-legend {
        width: 80% !important;
        margin: 10px auto;
    }
}

/* ============================================
   BOTONES
   ============================================ */
.custom-button {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1em;
    width: 80%;
    margin: 10px auto;
    padding: 7px 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fffff5 !important;
    background-color: #4CAF50 !important;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.custom-button:hover {
    background-color: #45a049 !important;
}

@media (max-width: 768px) {
    .custom-button {
        font-size: 0.85em;
    }
}

.custom-toggle-button {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 80%;
    width: auto;
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #fffff5 !important;
    border: 2px solid #000000 !important;
    border-radius: 5px;
    position: fixed !important;
    font-weight: bold !important;
    top: 10px;
    left: 10px;
    z-index: 2000;
    color: #194d33 !important;
    cursor: pointer;
}

.contact-button-circle {
    margin-left: 15px !important;
    margin-right: 15px !important;
    margin-top: 15px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;   
    text-decoration: none;
    border: 2px solid #fffff5 !important;
    color: #194d33 !important;
    background-color: #fffff5 !important;
}

.custom-floating-button {
    position: fixed;
    top: 140px;
    right: 10px;
    width: 45px;
    height: 45px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 3000;
}

.custom-floating-button:hover {
    background-color: #f0f0f0;
}

/* ============================================
   PANEL DE SUGERENCIAS
   ============================================ */
.suggestion-panel {
    position: fixed;
    top: 210px;
    right: 10px;
    width: 40%;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    max-width: 200px;
}

@media (max-width: 768px) {
    .suggestion-panel {
        top: 210px !important;
        width: 200px !important;
    }
}

.close-button {
    background: none;
    border: none;
    font-size: 16px;
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
}

.custom-input {
    width: 90%;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* ============================================
   LEAFLET (MAPA Y POPUPS)
   ============================================ */
.leaflet-control-attribution {
    display: none !important;
}

.leaflet-tooltip {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.leaflet-tooltip {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    background: #64b6ac !important;
    color: #fffff5;
    border: 2px solid #fffff5;
    border-radius: 5px;
    padding: 10px;
    min-width: 150px;
    word-wrap: break-word;
}

.marker-tooltip .nombre {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: #000000;
    margin-top: 0px;
    margin-bottom: 2px;
}

.marker-tooltip .bold-text {
    font-weight: bold;
}

.marker-tooltip p {
    margin-bottom: 2px !important;
}

.marker-tooltip div {
    margin-bottom: 2px !important;
    font-size: 14px !important;
}

.marker-tooltip div:last-child {
    margin-bottom: 0;
}

.marker-tooltip.clicked {
    display: none !important;
}

@media (max-width: 768px) {
    .marker-tooltip {
        display: none !important;
    }
}

.leaflet-popup-content {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.leaflet-popup-content .popup-nombre {
    font-size: 18px !important;
    font-weight: bold;
    text-decoration: none;
    color: #333;
    margin-top: 5px !important;
    margin-bottom: 5px !important;
    text-align: center;
}

.leaflet-popup-content .popup-rating,
.leaflet-popup-content .popup-reviews,
.leaflet-popup-content .popup-web,
.leaflet-popup-content .popup-direccion {
    font-size: 14px;
    font-weight: normal;
    text-decoration: none;
    color: #555;
}

.leaflet-popup-content .popup-rating {
    margin-top: 5px !important;
    margin-bottom: 5px !important;
}

.popup-horarios-title {
    text-decoration: underline;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    margin-bottom: 5px;
}

.popup-horarios-content {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
    margin: 0;
}

.leaflet-popup-close-button {
    position: absolute !important;
    top: 15px !important;
    right: 3px !important;
    background-color: transparent !important;
    border: none !important;
    font-size: 2em !important;
    cursor: pointer !important;
    line-height: 1 !important;
    color: black !important;
    width: 50px !important;
    height: 50px !important;
    text-align: center !important;
}

/* ============================================
   OTROS
   ============================================ */
.custom-spinner {
    z-index: 9999 !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-overlay {
    z-index: 2000 !important;
}

#info-registro {
    position: absolute;
    top: 60px;
    right: 110px;
    width: 30%;
    border: 2px solid #404040;
    background-color: rgba(255, 255, 255, 1);
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.close-info-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: transparent;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
}
