/* ============================================================
   DISPONIBILIDADE — MAPA PÚBLICO
   Abordagem: transform no wrapper, pontos absolute, zero reflow
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    background: #f3f3f3;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   MAPA
   ============================================================ */
#zoom-container {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #f3f3f3;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
}

#map-wrapper {
    position: relative;
    transform-origin: center center;
    transition: transform 0.07s ease-out;
    will-change: transform;
}

#map-image {
    display: block;
    max-width: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* ============================================================
   PONTOS DOS LOTES
   ============================================================ */
.lote-point {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255,255,255,0.9);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: transform 0.1s;
    touch-action: auto;
    z-index: 5;
}

.lote-point:hover {
    transform: translate(-50%, -50%) scale(1.5);
    z-index: 10;
}

/* Cores por situação */
.lote-disponivel { background-color: #34a853; }
.lote-reservada { background-color: #fc9507; }
.lote-vendida { background-color: #ea4335; }
.lote-em-processo { background-color: #006dcc; }
.lote-bloqueada { background-color: #a3a3a3; }

/* Tooltip CSS nativo (hover) */
.lote-point:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 18, 24, 0.92);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    margin-bottom: 6px;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* ============================================================
   TOOLBAR
   ============================================================ */
.toolbar {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toolbar button {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background 0.12s;
    font-family: inherit;
}

.toolbar button:hover {
    background: #fff;
}

.toolbar button:active {
    transform: scale(0.92);
}

/* ============================================================
   MINI NAVIGATOR
   ============================================================ */
#mini-navigator {
    position: fixed;
    top: 12px;
    right: 12px;
    width: 180px;
    height: 100px;
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1000;
    overflow: hidden;
    cursor: crosshair;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    background-image: url('../planta/planta-gjm.png');
    background-size: cover;
    background-position: center;
}

#mini-viewbox {
    position: absolute;
    border: 2px solid rgba(234, 67, 53, 0.85);
    background-color: rgba(234, 67, 53, 0.12);
    border-radius: 2px;
    z-index: 2;
    pointer-events: all;
    cursor: grab;
    transition: left 0.1s, top 0.1s, width 0.1s, height 0.1s;
}

#mini-viewbox:active {
    cursor: grabbing;
    border-color: rgba(234, 67, 53, 1);
    background-color: rgba(234, 67, 53, 0.22);
}

/* ============================================================
   LEGENDA BAR
   ============================================================ */
.legenda-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 1000;
    border-top: 1px solid rgba(0,0,0,0.06);
}

.legenda-items {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.legenda-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #111;
    font-weight: 500;
    white-space: nowrap;
}

.legenda-item span:first-child {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.filtro-select {
    padding: 5px 28px 5px 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-size: 12px;
    font-family: inherit;
    background: #fff;
    color: #333;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    flex-shrink: 0;
}

.filtro-select:focus {
    outline: none;
    border-color: #4285f4;
}

.disclaimer {
    font-size: 9px;
    color: #333;
    line-height: 1.3;
    margin-left: auto;
}

/* ============================================================
   TOOLTIP JS (fallback / mobile)
   ============================================================ */
.lote-tooltip {
    position: fixed;
    background: rgba(18, 18, 24, 0.94);
    color: #fff;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    pointer-events: none;
    z-index: 2000;
    max-width: 220px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.lote-tooltip.hidden {
    display: none;
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 768px) {
    #mini-navigator {
        width: 120px;
        height: 68px;
        top: 10px;
        right: 10px;
    }

    .toolbar {
        top: 10px;
        left: 10px;
    }

    .toolbar button {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .legenda-bar {
        flex-wrap: wrap;
        padding: 8px 12px;
        gap: 8px;
    }

    .legenda-items {
        gap: 8px;
        flex-wrap: wrap;
    }

    .legenda-item {
        font-size: 11px;
    }

    .disclaimer {
        width: 100%;
        margin-left: 0;
        font-size: 8px;
    }

    .lote-point {
        width: 14px;
        height: 14px;
    }

    /* No mobile o tooltip é via JS, não CSS hover */
    .lote-point::after {
        display: none !important;
    }
}
