/* ==================== VIEWER UI ELEMENTS ==================== */

/* Planta Toggle (Botones 2D/3D) */
.planta-view-toggle {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.planta-view-toggle button {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.planta-view-toggle button:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.planta-view-toggle button.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Planta Flotante Draggable */
.planta-floating {
    position: fixed;
    top: 80px;
    right: 40px;
    left: auto;
    width: 580px;
    min-width: 300px;
    max-width: 800px;
    background: linear-gradient(160deg, rgba(30, 32, 40, .98), rgba(20, 22, 28, .98));
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08);
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.planta-floating.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.planta-floating.pinned {
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6), 0 0 0 2px rgba(16, 185, 129, .5);
}

.planta-floating.expanded {
    width: 450px;
}

.planta-floating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 0, 0, .3);
    cursor: move;
    user-select: none;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.planta-floating-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.planta-floating-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.planta-floating-btn {
    background: rgba(255, 255, 255, .08);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #fff;
}

.planta-floating-btn:hover {
    background: rgba(255, 255, 255, .15);
}

.planta-floating-btn.active {
    background: rgba(16, 185, 129, .3);
}

.planta-zoom-level {
    font-size: 11px;
    color: rgba(255, 255, 255, .6);
    min-width: 40px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
}

.planta-floating-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.planta-floating-img-wrap {
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    max-height: 500px;
    height: 400px;
    position: relative;
    cursor: grab;
}

.planta-floating-img-wrap.grabbing {
    cursor: grabbing;
}

.planta-floating-img-wrap img {
    max-width: none;
    max-height: none;
    object-fit: contain;
    transition: transform 0.1s ease-out, opacity 0.2s ease;
    transform-origin: center center;
    pointer-events: none;
}

.planta-no-img {
    text-align: center;
    color: rgba(255, 255, 255, .4);
    padding: 20px;
}

.planta-floating-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.planta-info-item {
    background: rgba(255, 255, 255, .05);
    padding: 8px 12px;
    border-radius: 8px;
    flex: 1;
    min-width: 80px;
}

.planta-info-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, .4);
    margin-bottom: 4px;
}

.planta-info-value {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.planta-info-value.price {
    color: #4ade80;
}

.planta-floating-resize {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: se-resize;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, .1) 50%);
    border-radius: 0 0 16px 0;
}

/* Hover Card */
.hover-card {
    position: absolute;
    pointer-events: none;
    z-index: 200;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: all 0.25s cubic-bezier(.4, 0, .2, 1);
}

.hover-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hover-card-inner {
    background: rgba(25, 28, 35, 0.85);
    backdrop-filter: blur(16px);
    border-radius: 16px;
    padding: 20px 24px;
    min-width: 200px;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .4);
}

.hover-top {
    text-align: center;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    margin-bottom: 14px;
}

.hover-id {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.hover-name {
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
    margin-top: 4px;
}

.hover-specs {
    display: flex;
    justify-content: space-around;
    margin-bottom: 14px;
}

.hover-spec {
    text-align: center;
}

.hover-spec-icon {
    width: 24px;
    height: 24px;
    margin: 0 auto 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .5);
}

.hover-spec-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}

.hover-spec-value {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, .7);
}

.hover-price-btn {
    background: transparent;
    border: 2px solid #4ade80;
    border-radius: 10px;
    padding: 12px 16px;
    text-align: center;
    margin-bottom: 10px;
}

.hover-price-btn span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #4ade80;
}

.hover-price-btn.vendido {
    border-color: #f87171;
}

.hover-price-btn.vendido span {
    color: #f87171;
    text-decoration: line-through;
}

.hover-price-btn.reservado {
    border-color: #fbbf24;
}

.hover-price-btn.reservado span {
    color: #fbbf24;
}

.hover-hint {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, .35);
}

/* Floating Labels */
.floating-label {
    position: absolute;
    pointer-events: none;
    z-index: 50;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(20, 20, 30, 0.9) 100%);
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    letter-spacing: 0.3px;
}

.floating-label::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
}

.floating-label span {
    margin-left: 10px;
}

.floating-label.disponible::before { background: #10b981; }
.floating-label.reservado::before { background: #f59e0b; }
.floating-label.vendido::before { background: #ef4444; }
.floating-label.premium::before { background: #06b6d4; }

.floating-label.vendido {
    opacity: 0.6;
    text-decoration: line-through;
}

.floating-label.selected {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 0 2px var(--accent);
}

/* Mobile Info Card (Solo visible en responsive, pero es UI de viewer) */
.mobile-info-card {
    display: none;
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.98), rgba(15, 15, 25, 0.98));
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 300;
    max-width: 90%;
    text-align: center;
}

.mobile-info-card.visible {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.mobile-info-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.mobile-info-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

.mobile-info-details {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

/* Sun Flare */
.sun-flare {
    position: absolute;
    pointer-events: none;
    z-index: 40;
    border-radius: 50%;
    mix-blend-mode: screen;
}

/* ==================== SHARE & CORRETOR OVERLAYS ==================== */

/* Corretor Badge */
.corretor-badge {
    position: fixed;
    top: 70px;
    right: 20px;
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid #ff6b35;
    color: #ff6b35;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    z-index: 500;
    display: none;
}

.corretor-badge.visible {
    display: block;
}

/* Share Floating Button (FAB) */
.share-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 500;
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    transition: all 0.3s;
    display: none;
    align-items: center;
    justify-content: center;
}

.share-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.5);
}

.share-fab.visible {
    display: flex;
}

/* Share Modal */
.share-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.share-modal.visible {
    opacity: 1;
    visibility: visible;
}

.share-box {
    background: linear-gradient(160deg, #1e2028, #14161c);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 28px;
    width: 90%;
    max-width: 400px;
    transform: scale(0.95);
    transition: transform 0.3s;
    position: relative;
}

.share-modal.visible .share-box {
    transform: scale(1);
}

.share-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

.share-url-box {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.share-url {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #fff;
    word-break: break-all;
}

.share-copy {
    background: #ff6b35;
    border: none;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.share-copy:hover {
    background: #e55a2b;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
}

.share-btn.qr {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 20px;
    cursor: pointer;
}

.share-close:hover {
    color: #fff;
}

.share-qr {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
}

.share-qr.visible {
    display: block;
}

.share-qr canvas {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
}