/* ===================================================================
   TOUR.CSS - Estilos específicos do tour virtual
   ================================================================== */

/* Modal do tour */
#tourModal {
    z-index: 10000;
    backdrop-filter: blur(3px);
}

#tourModal .bg-black {
    background-color: rgba(0, 0, 0, 0.9);
}

/* Frame do tour */
#tourFrame {
    background: white;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
}

/* Indicadores de progresso do tour */
.tour-indicator {
    transition: all 0.3s ease;
    cursor: pointer;
}

.tour-indicator:hover .w-3 {
    transform: scale(1.2);
}

.tour-indicator.active .w-3 {
    background: var(--linktor-purple) !important;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(69, 30, 255, 0.5);
}

.tour-indicator.completed .w-3 {
    background: #10b981 !important;
    transform: scale(1.1);
}

/* Navegação do tour */
.tour-navigation {
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
    border-top: 1px solid #e2e8f0;
}

/* Botões do tour */
#prevBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

#nextBtn, #prevBtn {
    transition: all 0.3s ease;
    min-width: 120px;
}

#nextBtn:hover:not(:disabled), #prevBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* MODAL DE ROTAÇÃO MOBILE */
#rotateModal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 15000;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 20px;
}

#rotateModal.show {
    display: flex;
}

.rotate-content {
    max-width: 300px;
    animation: rotatePrompt 2s ease-in-out infinite;
}

.phone-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--linktor-orange);
}

.rotate-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.rotate-subtext {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

/* Animação de rotação */
@keyframes rotatePrompt {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-5deg);
    }
}

.phone-rotate-animation {
    animation: phoneRotate 3s ease-in-out infinite;
}

@keyframes phoneRotate {
    0%, 100% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(90deg);
    }
}

/* Orientação landscape obrigatória para mobile */
@media screen and (max-width: 768px) {
    /* Detectar portrait em mobile */
    @media (orientation: portrait) {
        #tourModal.mobile-tour {
            display: none !important;
        }
        
        #rotateModal.mobile-required {
            display: flex !important;
        }
    }
    
    /* Detectar landscape em mobile */
    @media (orientation: landscape) {
        #tourModal.mobile-tour {
            display: flex !important;
        }
        
        #rotateModal.mobile-required {
            display: none !important;
        }
        
        /* Otimizações para landscape mobile */
        #tourFrame {
            height: calc(100vh - 120px);
        }
        
        .tour-navigation {
            padding: 8px 16px;
        }
        
        .tour-indicator span {
            display: none; /* Esconder labels em mobile landscape */
        }
        
        #nextBtn, #prevBtn {
            padding: 8px 16px;
            font-size: 14px;
            min-width: 100px;
        }
        
        #tourStep {
            font-size: 12px;
            padding: 4px 8px;
        }
    }
}

/* Estados de loading */
.tour-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 1000;
}

.tour-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--linktor-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

/* Responsividade geral do tour */
@media (max-width: 1024px) {
    .tour-indicator span {
        font-size: 10px;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 10px;
    }
    
    /* Esconder alguns elementos em telas muito pequenas */
    .hidden-mobile {
        display: none !important;
    }
}

/* Transições suaves */
.tour-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Acessibilidade */
.tour-indicator:focus {
    outline: 2px solid var(--linktor-purple);
    outline-offset: 2px;
}

#nextBtn:focus, #prevBtn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Suporte para modo escuro (opcional) */
@media (prefers-color-scheme: dark) {
    .tour-navigation {
        background: linear-gradient(to right, #1e293b, #0f172a);
        border-top-color: #334155;
    }
}