div.pix-campo.pix-no-valido::after {
    left: 0% !important;
}

#bp-address-fields {
    margin-top: 16px;
    padding: 12px;
    background: #ffffff;
    border: 1px dashed #7f8c8d;
    border-radius: 4px;
}
#bp-mostrar-coords {
    margin-top: 12px;
    font-style: italic;
}
#bp-full-address {
    margin-top: 8px;
    color: #34495e;
    font-style: italic;
}

#divContenedorBtn { 
    text-align: center; 
    margin-bottom: 20px; 
}

#bp-toggle-form { 
    display: inline-flex; 
    align-items: center; 
    padding: 19px 42px; 
    background-color: #000000; 
    color: #fff; border: none; 
    cursor: pointer; 
    transition: background-color 0.2s; 
    text-decoration: none; 
    font-family: 'Roboto'; 
    font-style: normal; 
    font-weight: 500; 
    letter-spacing: 0.3px; 
    font-size: 15px; 
    line-height: 1.3em; }

#bp-toggle-form img {
    width: 20px;
    height: 20px;
    margin-right: 6px;
    transition: transform 0.2s;
}
#bp-toggle-form:hover {
    background-color: #424242;
}

#bp-toggle-form:active {
    transform: translateY(1px);
}



/* Ocultar flechas nativas de los selects y dejar solo la de Select2 */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: none;
}

/* Asegurar que Select2 tenga solo una flecha */
.select2-container--default .select2-selection--single {
    background-image: none;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    background-image: none;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #999 transparent transparent transparent;
    border-style: solid;
    border-width: 5px 4px 0 4px;
    height: 0;
    left: 50%;
    margin-left: -4px;
    margin-top: -2px;
    position: absolute;
    top: 50%;
    width: 0;
}

/* Estilos específicos para tus selects */
#bp_country, #bp_province, #bp_municipality {
    -webkit-appearance: none ;
    -moz-appearance: none ;
    appearance: none ;
    background-image: none ;
}

/* Ajustar el contenedor de Select2 */
.select2-container {
    width: 100% ;
}

.select2-container--default .select2-selection--single {
    height: 40px ;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    background-image: none ;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 12px;
    padding-top: 8px;
    color: #333;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
    right: 8px;
    background-image: none ;
}

/* Ocultar completamente la flecha de Select2 */
.select2-selection__arrow {
    display: none !important;
}

/* Para navegadores WebKit (Chrome, Safari) */
#bp_country::-webkit-appearance,
#bp_province::-webkit-appearance,
#bp_municipality::-webkit-appearance {
    display: none ;
}

/* Para Firefox */
#bp_country::-moz-appearance,
#bp_province::-moz-appearance,
#bp_municipality::-moz-appearance {
    display: none ;
}


#bp-show-map {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    margin-left: 10px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    box-shadow: 0 1px 6px rgba(60,60,60,0.05);
}
#bp-show-map img {
    width: 20px;
    height: 20px;
    margin-right: 7px;
    transition: transform 0.2s;
}
#bp-show-map:hover {
    background-color: #217dbb;
    transform: translateY(-1px);
}
#bp-show-map:active {
    transform: translateY(1px);
}


.marker-popup {
    text-align: center;
    font-size: 14px;
}

.marker-popup strong {
    color: #2c3e50;
    font-size: 16px;
}

.marker-popup small {
    color: #666;
    display: block;
    margin: 2px 0;
}



.help-icon {
    display: inline-block;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: bold;
    width: 1.2em;
    height: 1.2em;
    line-height: 1.2;
    text-align: center;
    margin-left: 0.5em;
    cursor: help;
    position: relative;
    z-index: 1000;
}

.help-icon .help-tooltip {
    visibility: hidden;
    opacity: 0;
    width: 20em;               /* más ancho */
    background: #f0f0f0;
    color: #333;
    font-size: 0.875em;
    line-height: 1.4;
    border: 1px solid #ccc;
    text-align: left;
    padding: 0.5em;            /* menos alto */
    border-radius: 4px;
    position: absolute;
    top: 50%;                  /* centra verticalmente */
    left: 2em;                 /* desplazado a la derecha */
    transform: translateY(-50%); /* centra */
    transition: opacity 0.2s ease-in-out;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    pointer-events: none;
}

.help-icon:hover .help-tooltip,
.help-icon:focus .help-tooltip {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}


/* ============================================================
   ESTILOS PARA EL MAPA PÚBLICO Y PANEL DE DETALLES
   ============================================================ */

/* Contenedor principal del mapa */
#bp-map-container {
    display: block;
    margin: 20px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Contenedor flex para mapa + lista */
#bp-map-container > div {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Contenedor del mapa */
#cluster-map {
    height: 500px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

/* Contenedor de información lateral */
#bp-info-container {
    flex: 1;
    min-width: 300px;
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    border:0 !important;
}

#bp-info-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* Lista de bellotas */
#bp-marker-info { 
    display: inline-flex; 
    gap: 10px; 
    flex-wrap: wrap; 
    padding: 0; 
    margin: 0; 
}

/* Items de bellota */
.bellota-item {
    margin: 0 !important;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
    background-color: #f9f9f9 !important;
    overflow: hidden;
    flex: 0 0 148px !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius:0 !important;
}

.bellota-item:hover {
    background-color: #f5f5f5 !important;
    transform: translateY(-2px);
}

/* Header de la bellota */
.bellota-header {
    text-align: center;
    width: 100% !important;
    display: inline-block;
}

.bellota-header h4 {
    margin: 0;
    font-size: 16px;
    color: #363636 !important;
    font-family: 'Montserrat';
    font-weight: 600;
}

.bellota-header span {
    background: #e74c3c;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Información de la bellota */
.bellota-info {
    color: #666;
    font-size: 14px;
    text-align: center;
    line-height: 1.2em;
    font-family: 'Montserrat';
    font-style: normal;
}

.bellota-info p:first-child {
    font-weight: 600;
}

.bellota-info p {
    margin: 5px 0;
}

.bellota-info img {
    width: 100px !important; 
    height: 100px !important; 
    object-fit: cover !important; 
    border-radius: 100% !important; 
    box-shadow: none !important; 
    margin-top: 0 !important; 
    max-height: 100% !important; /*
    -webkit-mask-image: url(/wp-content/uploads/2025/10/bellota-img.svg);
    -webkit-mask-size: cover;
    mask-image: url('/wp-content/uploads/2025/10/bellota-img.svg');
    mask-size: cover;
    */ }

/* ============================================================
   Ajustes de estilo para popups públicos
   ============================================================ */


/* ==== Ajuste de imágenes en popups ==== */
.leaflet-popup-content {
  max-width: 250px !important;
  overflow-wrap: break-word;
}

.leaflet-popup-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 4px;
}

/* Limitar ancho y ajustar contenido */
.leaflet-popup-content-wrapper { }
  
/* ==== Ajuste de imágenes en popups de Leaflet ==== */
.leaflet-popup-content {
    max-width: 300px !important;
    overflow-wrap: break-word;
    padding: 10px;
}

.leaflet-popup-content .marker-popup img {
    width: 100px !important; 
    height: 100px !important; 
    object-fit: cover !important; 
    border-radius: 100% !important; 
    box-shadow: none !important; 
    margin-top: 0 !important; 
    max-height: 100% !important;
}

.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    padding: 0;
}

.marker-popup {
    max-width: 280px;
    text-align: center;
    padding: 5px;
}

.marker-popup strong {
    margin: 0;
    font-size: 16px;
    color: #363636 !important;
    font-family: 'Montserrat';
    font-weight: 600;
    font-style:normal !important;
}

/* Mejorar apariencia del botón de cerrar */
.leaflet-popup-close-button {
    font-size: 20px;
    padding: 4px 8px;
    color: #666;
    top: 15px;
    right: 10px;
}

.leaflet-popup-close-button:hover {
    color: #333;
          /* Ancho máximo */
  padding: 10px 14px;         /* Espaciado interno */
  border-radius: 8px;         /* Bordes redondeados */
  box-shadow: 0 3px 14px rgba(0,0,0,0.2);
}

/* Estilo del contenido interno */
.marker-popup {
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;     /* Evitar que el texto salga del contenedor */
}

/* Título de la bellota */
.marker-popup strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  color: #2c3e50;
}

/* Imagen dentro del popup */
.marker-popup img {
  display: block;
  margin: 0 auto;
  max-width: 100%;            /* Nunca excede el ancho del popup */
  height: auto;
  max-height: 180px;          /* Altura máxima para mantener proporción */
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Ajustes responsive */
@media (max-width: 480px) {
  .leaflet-popup-content-wrapper {
    max-width: 240px;
    padding: 8px 10px;
  }
  .marker-popup strong {
    font-size: 14px;
  }
  .marker-popup img {
    max-height: 140px;
  }
}


.marker-popup {
    text-align: center;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.marker-popup strong {
    display: block;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.marker-popup img {
    display: block;
    margin: 10px auto 0;
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Scrollbar personalizada para el contenedor de info */
#bp-info-container::-webkit-scrollbar {
    width: 8px;
}

#bp-info-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#bp-info-container::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

#bp-info-container::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
    #bp-map-container > div {
        flex-direction: column !important;
    }

    #cluster-map {
        height: 400px !important;
    }

    #bp-info-container {
        max-height: 300px !important;
        min-width: 100%;
    }

    .bellota-item {
        padding: 12px;
    }

    .bellota-header h4 {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #cluster-map {
        height: 350px !important;
    }

    #bp-info-container h3 {
        font-size: 18px;
    }

    .bellota-item {
        padding: 10px;
    }
}

/* Ajustes para clusters de Leaflet */
.marker-cluster-small {
    background-color: rgba(110, 204, 57, 0.6);
}

.marker-cluster-small div {
    background-color: rgba(110, 204, 57, 0.8);
}

.marker-cluster-medium {
    background-color: rgba(241, 211, 87, 0.6);
}

.marker-cluster-medium div {
    background-color: rgba(241, 211, 87, 0.8);
}

.marker-cluster-large {
    background-color: rgba(253, 156, 115, 0.6);
}

.marker-cluster-large div {
    background-color: rgba(253, 156, 115, 0.8);
}

/* Ajustes para el control de zoom */
.leaflet-control-zoom a {
    border-radius: 4px;
}

/* Animaciones suaves */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bellota-item {
    animation: fadeIn 0.3s ease-in-out;
}


/* ============================================================
   AJUSTES OPTIMIZADOS PARA POPUPS DE LEAFLET
   ============================================================ */

/* Contenido del popup */
.leaflet-popup-content-wrapper > .leaflet-popup-content {
    min-width: 200px !important;
    max-width: 320px !important;
    overflow-wrap: break-word;
    padding: 8px !important;
    margin: 10px !important;
}

/* Imágenes dentro del popup */
.leaflet-popup-content img {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-height: 250px !important;
    margin: 0 auto;
    border-radius: 6px;
    object-fit: contain !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* Contenedor del popup */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    padding: 0 !important;
}

/* Flecha del popup */
.leaflet-popup  .leaflet-popup-tip-container {
    display: block;
    margin-top: -10px !important;
    width: 40px;
    height: 20px;
}

/* Clase marker-popup para contenido personalizado */
.marker-popup {
    min-width: 200px;
    max-width: 300px;
    text-align: center;
    padding: 8px;
}

.marker-popup strong {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

/* Botón de cerrar del popup */
.leaflet-container a.leaflet-popup-close-button{
    width: 45px !important;
    height: 45px !important;
    font-size: 25px !important;
    font-family: 'Montserrat' !important;
    font-style: normal !important;
    line-height: 25px !important;
    top: 10px !important;
}

.leaflet-popup-close-button:hover {
    color: #333;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.leaflet-popup-tip-container { 
    margin-top: -10px; 
}

.leaflet-popup-close-button:hover { 
    border-radius: 0 !important; 
    box-shadow: none !important; 
}

/* Asegurar que el popup se ajuste al contenido */
.leaflet-popup {
    margin-bottom: 20px;
}

/* Responsive para popups en móvil */
@media (max-width: 480px) {
    .leaflet-popup-content {
        min-width: 180px !important;
        max-width: 280px !important;
    }

    .leaflet-popup-content img {
        max-height: 200px !important;
    }

    .marker-popup strong {
        font-size: 14px;
    }
}
/*Estilos formulario*/

.pix-upload:not(.imgCargada):before {
    padding: 10px 25px !important;
    line-height: 28px !important;
    border-radius: 0 !important;
    background-color: #1e1e1e !important;
    letter-spacing: 0.3px !important;
    font-weight: 500 !important;
    font-size: 15px !important;
    text-transform: none !important;
    box-shadow: none !important;
    font-family: 'Roboto'!important;
    font-style: normal!important;
}

.pix-form-cargado .pix-campo > label {
    font-family: 'Roboto';
    font-style: normal;
}

input.fill_inited.filled {
    font-family: 'Roboto';
    font-style: normal;
}

input[placeholder]::placeholder {
    font-family: 'Roboto';
    font-style: normal;

    text-overflow: ellipsis;
    opacity: 1;
    color: var(--theme-color-input_light);
    -webkit-transition: color 0.3s 
ease;
    -ms-transition: color 0.3s ease;
    transition: color 0.3s 
ease;
}

.pix-tarjeta {
    box-shadow: none !important;
    background-color: #f5f5f5 !important;
    padding: 50px !important;
    border-radius: 0 !important;
}

a.pix-btn {
    font-family: 'Roboto';
    font-style: normal;
    letter-spacing: 0.3px;
    font-weight: 500;
    background-color: black !important;
    text-transform: none !important;
    border-radius: 0 !important;
}

#bp-form button {
    font-family: 'Roboto';
    font-style: normal;
    letter-spacing: 0.3px;
    font-weight: 500;
    text-transform: none !important;
    border-radius: 0 !important;
}

button.select2-selection__clear span {
    color: #3b3b3b !important;
    font-size: 20px;
    margin-right: 20px;
    margin-top: 18px;
    background-color: #f9f9f9;
    padding: 10px 15px;
    border-radius: 100%;
}

.pix-check {
    font-family: 'Roboto';
    font-style: normal;
    margin-bottom: 20px;
}

div#bp-address-fields-filled { 
    margin: 12px 0px; 
}

#bp-address-fields-filled .pix-campo { 
    padding: 8px 0px; 
}

.pix-campo input {
    background-color: transparent !important;
}

.pix-tarjeta-titulo {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600;
        white-space: normal !important;
}

.pix-campo {
    padding-bottom: 16px !important;
    padding-right: 5px;
    padding-left: 5px;
}

div#box_number_status_registro {
    line-height: 1.2em;
    font-family: 'Roboto';
    font-style: normal;
}

div#box_number_status_registro {
    margin-top: 0 !important;
    min-height: 0 !important;
}

.pix-campo.pix-label-fija[name="bp_foto"] {
    padding-left: 0 !important;
    padding-top: 10px !important;
}

.pix-upload {
    border-bottom: 0 !important;
}

span.select2-selection__rendered, .pix-campo.pix-foco.pix-relleno input, div#postal_code_status {
    font-family: 'Roboto';
    font-style: normal;
    padding-bottom: 0 !important;
}

.select2-results__option, input.select2-search__field {
    font-family: 'Roboto' !important;
    font-style: normal !important;
    font-size: 14px;
    line-height: 1.3;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

div#bp-puntos-encontrados {
    background: rgb(99 99 99) !important;
    color: white;
    padding: 10px;
    border-radius: 0 !important;
    margin: 10px 0px;
    text-align: center;
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 500 !important;
}

div#postal_code_status {
    line-height: 1.1em;
    margin-top: 0 !important;
    margin-left: 10px;
}

div#bp-preview {
    margin-bottom: 15px;
}

div#bp-success {
    font-family: 'Roboto' !important;
    font-style: normal !important;
    color: #444444 !important;
}

.leaflet-marker-icon img {
    filter: none !important;
}

.btnSubirFoto .pix-upload:before {
    content: 'Sube la foto de la bellota' !important;
}

.btnSacarFotoMovil .pix-upload:before {
    content: 'Tomar foto de la bellota' !important;
}

.btnSubirFoto, .btnSacarFotoMovil{
    padding:0 !important;
}

.pix-upload.cargado { margin-top: 0 !important; }


/* Hacer la caja de recorte circular */
.cropper-crop-box, .cropper-view-box {
    border-radius: 50%;
}

.cropper-view-box {
    box-shadow: 0 0 0 2px #39f;
    outline: 0;
}
.btn-crop-control {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}
.btn-crop-control:hover {
    background: #f0f0f0;
    transform: scale(1.05);
}
.btn-crop-control:active {
    background: #e0e0e0;
    transform: scale(0.98);
}

#applyCrop:hover {
    background: #45a049;
}

#cancelCrop:hover {
    background: #f5f5f5;
}

#cropperModal div#divContenedorBtnRecorte { 
    justify-content: space-between !important; 

}

#cropperModal div#divContenedorBtnRecorte button#cancelCrop { 
    background-color: red !important; 

}

/* Responsive para móvil */
@media (max-width: 768px) {
    #cropperModal > div {
        width: 98%;
        margin: 5px auto;
        padding: 10px;
    }
    
    .btn-crop-control {
        padding: 8px 12px;
        font-size: 16px;
    }
}