/**
 * Tour 360° CSS Styles
 * Estilos para a seção e modal de tours virtuais 360°
 */

/* ========================================
   SEÇÃO DO TOUR 360° 
======================================== */

.tour360-container {
    margin: 0;
    padding: 0;
}

.tour-selector {
    margin-bottom: 1rem;
}

.tour-selector .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.tour-selector .form-select {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tour-selector .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Informações do tour */
.tour-info {
    margin-bottom: 1rem;
}

.tour-info h5 {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.tour-info p {
    color: #666;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Preview/Thumbnail do tour */
.tour-preview {
    margin-bottom: 1rem;
}

.tour-thumbnail {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 200px;
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.tour-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.tour-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    transition: background 0.3s ease;
}

.tour-thumbnail:hover .tour-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.tour-overlay h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tour-overlay p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.tour-overlay i {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

/* Botão de tela cheia */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* ========================================
   MODAL DO TOUR 360° 
======================================== */

.modal-tour360 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-tour360[style*="block"] {
    opacity: 1;
}

.modal-tour360-content {
    position: relative;
    width: 95%;
    height: 90%;
    max-width: 1200px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.modal-tour360-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}

.modal-tour360-header h5 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

.btn-close-tour360 {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.btn-close-tour360:hover {
    background: #e9ecef;
    color: #333;
}

.modal-tour360 iframe {
    flex: 1;
    border: none;
    width: 100%;
    height: 100%;
}

/* ========================================
   LOADING OVERLAY 
======================================== */

#tour360Loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#tour360Loading > div {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    max-width: 300px;
}

#tour360Loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

#tour360Loading p {
    margin: 0;
    font-size: 1rem;
}

/* ========================================
   RESPONSIVIDADE 
======================================== */

/* Tablets */
@media (max-width: 768px) {
    .modal-tour360-content {
        width: 98%;
        height: 95%;
        border-radius: 4px;
    }
    
    .modal-tour360-header {
        padding: 0.75rem 1rem;
    }
    
    .modal-tour360-header h5 {
        font-size: 1rem;
    }
    
    .tour-thumbnail {
        height: 160px;
    }
    
    .tour-overlay i {
        font-size: 2.5rem;
    }
    
    .tour-overlay h5 {
        font-size: 1.1rem;
    }
    
    .btn-primary {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .modal-tour360-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    
    .modal-tour360-header {
        padding: 0.5rem 0.75rem;
    }
    
    .modal-tour360-header h5 {
        font-size: 0.9rem;
    }
    
    .btn-close-tour360 {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
    
    .tour-thumbnail {
        height: 140px;
    }
    
    .tour-overlay i {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    
    .tour-overlay h5 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .tour-overlay p {
        font-size: 0.85rem;
    }
    
    .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .tour-selector .form-select {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .tour-info h5 {
        font-size: 1.1rem;
    }
    
    .tour-info p {
        font-size: 0.9rem;
    }
}

/* ========================================
   ANIMAÇÕES 
======================================== */

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-tour360-content {
    animation: fadeIn 0.3s ease-out;
}

/* ========================================
   ACESSIBILIDADE 
======================================== */

.btn-close-tour360:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.tour-thumbnail:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.btn-primary:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ========================================
   COMPATIBILIDADE COM TEMA EXISTENTE 
======================================== */

/* Manter consistência com o estilo existing do site */
.south-property-details-area .property-details-title h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.south-property-details-area .property-details-title h4 i {
    color: #667eea;
}

/* Ajustes para diferentes temas */
.modal-tour360-header {
    border-bottom: 1px solid var(--border-color, #dee2e6);
    background: var(--bg-light, #f8f9fa);
}

.btn-close-tour360 {
    color: var(--text-muted, #666);
}

.btn-close-tour360:hover {
    background: var(--bg-hover, #e9ecef);
    color: var(--text-dark, #333);
}