/* pano-render.css — estilos del motor de render compartido (PanoRender).
   Ficha de lote, leyenda de estados, modal de foto/plano vinculado,
   vertices editables y seleccion. Replica el aspecto del visor actual. */

/* SVG unico superpuesto para poligonos (mismo z-index que #linesSvg del visor) */
.pr-shapes-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

/* Seleccion / resaltado de marcadores (aro alrededor del icono) */
.pr-selected .pr-anchor,
.pr-highlight .pr-anchor {
    border-radius: 50%;
}

.pr-selected .pr-anchor {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95), 0 0 0 6px #0ea5e9;
}

.pr-highlight .pr-anchor {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 0 0 6px #f59e0b;
}

/* Vertices arrastrables y trazado clicable (modo edicion) */
.pr-vertex {
    cursor: grab;
}

.pr-vertex:active {
    cursor: grabbing;
}

.pr-shape-hit {
    cursor: pointer;
}

/* Ficha de lote (identica a la tarjeta del visor) */
.pr-lot-card {
    position: absolute;
    z-index: 12500;
    background: rgba(15, 23, 34, 0.96);
    color: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    min-width: 210px;
    max-width: 320px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-family: Montserrat, system-ui, sans-serif;
    visibility: hidden;
}

.pr-lot-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}

.pr-lot-card-title {
    font-size: 15px;
}

.pr-lot-card-close {
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #94a3b8;
}

.pr-lot-card-estado {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 13px;
}

.pr-lot-card-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid #fff;
}

.pr-lot-card-row {
    font-size: 12.5px;
    color: #cbd5e1;
    margin-bottom: 2px;
}

.pr-lot-card-row b {
    color: #fff;
}

/* Leyenda de estados de lotes */
.pr-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    font-family: 'Open Sans', system-ui, sans-serif;
    font-size: 13px;
    color: #0f172a;
}

.pr-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.pr-legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.25);
}

.pr-legend-count {
    font-weight: 700;
}

/* Modal de fotografia / plano / 360 vinculado (identico al del visor) */
.pr-photo-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.78);
}

.pr-photo-modal.active {
    display: flex;
}

.pr-photo-dialog {
    width: min(960px, 96vw);
    max-height: 92vh;
    overflow: hidden;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.pr-photo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.pr-photo-title {
    margin: 0;
    font-size: 1.25rem;
    font-family: Montserrat, system-ui, sans-serif;
    font-weight: 600;
    color: #0f172a;
}

.pr-photo-desc {
    color: #6c757d;
    font-size: 0.85em;
}

.pr-photo-close {
    border: 1px solid #6c757d;
    background: #fff;
    color: #6c757d;
    border-radius: 6px;
    padding: 3px 9px;
    font-size: 13px;
    cursor: pointer;
}

.pr-photo-close:hover {
    background: #6c757d;
    color: #fff;
}

.pr-photo-body {
    position: relative;
    padding: 18px;
    background: #f8fafc;
}

.pr-photo-img {
    display: block;
    width: 100%;
    max-height: 68vh;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
}

.pr-map-frame {
    display: none;
    width: 100%;
    height: min(68vh, 620px);
    border: 0;
    border-radius: 6px;
    background: #fff;
}

.pr-photo-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 64px;
    border: 0;
    border-radius: 8px;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 22px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
    cursor: pointer;
}

.pr-photo-nav:hover,
.pr-photo-nav:focus {
    background: #1a5f7a;
    color: #fff;
    outline: none;
}

.pr-photo-prev {
    left: 8px;
}

.pr-photo-next {
    right: 8px;
}

.pr-photo-modal.has-navigation .pr-photo-nav {
    display: flex;
}

.pr-photo-actions {
    margin-top: 1rem;
    text-align: right;
}

@media (max-width: 576px) {
    .pr-photo-nav {
        width: 38px;
        height: 54px;
        font-size: 18px;
    }
}

/* Elementos ocultados con setVisible() (p. ej. el ojo de Capas del editor) */
.pr-hidden {
    display: none !important;
}

/* Pannellum pinta su sprite por defecto en los hotspots; en los marcadores
   propios (data-pr-id) debe ir limpio o asoma una cruz en los de solo texto. */
.pnlm-hotspot.pnlm-sprite[data-pr-id] {
    background-image: none !important;
}

/* Boton de WhatsApp flotante (fijo sobre el visor) */
.pr-wa-fab {
    position: absolute;
    left: 18px;
    top: 18px;
    z-index: 60;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: #25D366;
    color: #fff;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: transform .15s;
}
.pr-wa-fab:hover { transform: scale(1.07); }
