/* Vista Home - Main Stylesheet */

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.6); }
}

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-fade-in-up { animation: fadeInUp 0.8s ease-out forwards; }
.animate-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.glass-dark {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero gradient */
.hero-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
}

/* Card hover */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Tour viewer mobile dock */
.tour-mobile-price-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 32;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.72) 80%, transparent 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    pointer-events: none;
}
.tour-mobile-price-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    pointer-events: auto;
}
.tour-mobile-price-left {
    flex: 1;
    min-width: 0;
}
.tour-mobile-price-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.tour-mobile-price-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.65);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tour-mobile-price-dot {
    margin: 0 3px;
    opacity: 0.5;
}
.tour-mobile-price-value {
    flex-shrink: 0;
    font-size: 17px;
    font-weight: 700;
    color: #d4a853;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.tour-mobile-dock {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 35;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.85) 70%, transparent 100%);
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
}
.tour-mobile-dock > * { pointer-events: auto; }

.tour-room-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 8px 16px 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tour-room-scroll::-webkit-scrollbar { display: none; }

.tour-room-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s;
}
.tour-room-card:active { transform: scale(0.96); }

.tour-room-card .thumb-wrap {
    width: 72px;
    height: 52px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.15);
    transition: border-color 0.2s, box-shadow 0.2s;
    background: rgba(255,255,255,0.08);
}
.tour-room-card.active .thumb-wrap {
    border-color: #d4a853;
    box-shadow: 0 0 0 1px #d4a853, 0 4px 12px rgba(212,168,83,0.35);
}
.tour-room-card .thumb-wrap img,
.tour-desktop-room-card .thumb-wrap img {
    width: 100%; height: 100%; object-fit: cover;
}
.pano-thumb-preview {
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.06);
}
.tour-room-card .room-label {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}
.tour-room-card.active .room-label { color: #d4a853; font-weight: 600; }

.tour-action-bar {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding: 4px 8px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.tour-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    min-width: 64px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.tour-action-btn .icon-circle {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.15s;
}
.tour-action-btn:active .icon-circle {
    transform: scale(0.92);
    background: rgba(255,255,255,0.18);
}
.tour-action-btn .icon-circle.whatsapp { background: rgba(37, 211, 102, 0.15); border-color: rgba(37, 211, 102, 0.3); }
.tour-action-btn span {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
}

.tour-more-sheet {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: flex-end;
}
.tour-more-panel {
    width: 100%;
    background: #1a1a1a;
    border-radius: 20px 20px 0 0;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    animation: slideUp 0.25s ease;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.tour-more-panel button,
.tour-more-panel a {
    display: flex; align-items: center; gap: 14px;
    width: 100%; padding: 14px 16px;
    border-radius: 12px;
    color: white; font-size: 15px; font-weight: 500;
    background: rgba(255,255,255,0.06);
    border: none; margin-bottom: 8px;
    text-decoration: none;
    cursor: pointer;
}
.tour-toast {
    position: fixed; bottom: 160px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.85); color: white;
    padding: 10px 20px; border-radius: 999px;
    font-size: 13px; z-index: 60;
    animation: fadeInUp 0.3s ease;
}

/* Desktop room strip */
.tour-desktop-dock {
    display: none;
}
@media (min-width: 768px) {
    .tour-desktop-dock {
        display: flex;
        justify-content: center;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 30;
        padding: 16px 24px 24px;
        background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.75) 65%, transparent 100%);
        pointer-events: none;
        transition: right 0.3s ease;
    }
    .tour-desktop-dock.sidebar-open { right: 320px; }
    .tour-mobile-dock { display: none; }
    .tour-mobile-price-bar { display: none; }
}

.tour-desktop-rooms {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 8px;
    pointer-events: auto;
    scrollbar-width: none;
    max-width: min(720px, 100%);
}
.tour-desktop-rooms::-webkit-scrollbar { display: none; }

.tour-desktop-room-card {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s;
}
.tour-desktop-room-card:hover { transform: translateY(-2px); }
.tour-desktop-room-card:active { transform: scale(0.97); }

.tour-desktop-room-card .thumb-wrap {
    width: 96px;
    height: 68px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.tour-desktop-room-card.active .thumb-wrap {
    border-color: #d4a853;
    box-shadow: 0 0 0 1px #d4a853, 0 6px 20px rgba(212,168,83,0.35);
}
.tour-desktop-room-card .thumb-wrap img {
    width: 100%; height: 100%; object-fit: cover;
}
.tour-desktop-room-card .room-label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}
.tour-desktop-room-card.active .room-label { color: #d4a853; font-weight: 600; }

/* Sidebar reopen tab (desktop) */
.tour-sidebar-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 35;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: white;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.tour-sidebar-tab:hover { background: rgba(0,0,0,0.9); }

/* Panorama fly transition overlay */
.pano-fly-fade {
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

/* Zoom controls */
.pano-zoom-controls {
    position: absolute;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    pointer-events: auto;
}
.pano-zoom-btn {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
}
.pano-zoom-btn:hover {
    background: rgba(79, 70, 229, 0.85);
    transform: scale(1.05);
}

/* Hotspot size scales (tour editor + public viewer) */
.pano-hotspot-layer.hotspot-size-small .hotspot-wrap {
    transform: translate(-50%, -50%) scale(0.68);
}
.pano-hotspot-layer.hotspot-size-medium .hotspot-wrap {
    transform: translate(-50%, -50%) scale(0.88);
}
.pano-hotspot-layer.hotspot-size-large .hotspot-wrap {
    transform: translate(-50%, -50%) scale(1);
}

/* Hotspot positioning */
.hotspot-wrap {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 10;
    transition: opacity 0.15s;
    transform-origin: center center;
}
.hotspot-marker {
    width: 44px; height: 44px;
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.95), rgba(79, 70, 229, 0.95));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}
.hotspot-marker__glyph { line-height: 1; }
.hotspot-marker:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 28px rgba(79, 70, 229, 0.55);
}
.hotspot-marker.info {
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.95), rgba(5, 150, 105, 0.95));
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}
.hotspot-marker.cta {
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.95));
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}
.hotspot-marker.image {
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.95), rgba(2, 132, 199, 0.95));
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}
.hotspot-marker__glyph { font-size: 1.1rem; line-height: 1; }

/* Navigation hotspot — pill with label */
.hotspot-nav {
    position: relative;
    display: inline-block;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    font-family: Inter, system-ui, sans-serif;
    -webkit-tap-highlight-color: transparent;
}
.hotspot-nav__pulse {
    position: absolute;
    inset: -10px;
    border-radius: 9999px;
    background: rgba(99, 102, 241, 0.35);
    animation: hotspot-nav-pulse 2.2s ease-out infinite;
    pointer-events: none;
}
.hotspot-nav__inner {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.97) 0%, rgba(67, 56, 202, 0.97) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 9999px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow:
        0 10px 40px rgba(67, 56, 202, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hotspot-nav__label { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.hotspot-nav__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    transition: transform 0.2s ease, background 0.2s ease;
}
.hotspot-nav:hover .hotspot-nav__inner {
    transform: scale(1.06);
    box-shadow:
        0 14px 48px rgba(67, 56, 202, 0.6),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.hotspot-nav:hover .hotspot-nav__arrow {
    transform: translateX(2px);
    background: rgba(255, 255, 255, 0.3);
}
@keyframes hotspot-nav-pulse {
    0% { transform: scale(0.85); opacity: 0.7; }
    70% { transform: scale(1.15); opacity: 0; }
    100% { transform: scale(1.15); opacity: 0; }
}

/* Loading screen */
.tour-loader {
    position: fixed; inset: 0;
    background: #0f172a;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s;
}
.tour-loader.hidden { opacity: 0; pointer-events: none; }

/* Upload zone */
.upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 1rem;
    transition: all 0.2s;
}
.upload-zone.dragover {
    border-color: #6366f1;
    background: #eef2ff;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Form inputs */
.form-input {
    @apply w-full px-4 py-3 bg-gray-50 border border-gray-200 rounded-xl text-sm focus:ring-2 focus:ring-brand-500 focus:border-brand-500 focus:bg-white transition;
}

/* Stat card */
.stat-card {
    @apply bg-white rounded-2xl p-4 sm:p-6 border border-gray-100 shadow-sm;
}

/* Responsive tour sidebar */
@media (max-width: 767px) {
    .tour-sidebar { width: 88%; max-width: 360px; z-index: 45; }
    .tour-sidebar-tab { display: none !important; }
}
