/**
 * Stili per il Tour Virtuale Interattivo
 */

/* Container dei punti interattivi */
#hotspots-container {
    z-index: 100;
}

/* Punto interattivo */
.hotspot {
    position: absolute;
    cursor: pointer;
    z-index: 100;
    transform: translate(-50%, -50%);
}

/* Icona del punto interattivo */
.hotspot-icon {
    width: 32px;
    height: 32px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.hotspot-icon:hover {
    transform: scale(1.1);
}

/* Etichetta del punto interattivo */
.hotspot-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    margin-top: 4px;
}

/* Mostra l'etichetta al passaggio del mouse */
.hotspot:hover .hotspot-label {
    opacity: 1;
}

/* Effetto hover sul punto interattivo */
.hotspot:hover .hotspot-icon {
    transform: scale(1.1);
    background-color: rgba(var(--tblr-primary-rgb), 1);
}

/* Popup del punto interattivo */
.hotspot-popup {
    position: absolute;
    z-index: 1000;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 350px;
    max-width: 90vw;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
}

[data-bs-theme="dark"] .hotspot-popup {
    background-color: #1e293b;
    color: #fff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header del popup */
.hotspot-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .hotspot-popup-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.hotspot-popup-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.hotspot-popup-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-bs-theme="dark"] .hotspot-popup-close {
    color: #ccc;
}

.hotspot-popup-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .hotspot-popup-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Body del popup */
.hotspot-popup-body {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

/* Loader del popup */
.hotspot-popup-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}

.hotspot-popup-loading p {
    margin-top: 12px;
    color: #666;
}

[data-bs-theme="dark"] .hotspot-popup-loading p {
    color: #ccc;
}

/* Domande nel popup */
.hotspot-popup-questions {
    display: none;
}

/* Stili per la chat AI */
.ai-chat-container {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-chat-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    position: relative;
}

.ai-chat-message.user {
    align-self: flex-end;
    background-color: rgba(var(--tblr-primary-rgb), 0.1);
    color: var(--tblr-primary);
}

.ai-chat-message.ai {
    align-self: flex-start;
    background-color: #f0f0f0;
    color: #333;
}

[data-bs-theme="dark"] .ai-chat-message.user {
    background-color: rgba(var(--tblr-primary-rgb), 0.2);
}

[data-bs-theme="dark"] .ai-chat-message.ai {
    background-color: #2c3c56;
    color: #fff;
}

.ai-chat-input {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .ai-chat-input {
    border-top-color: rgba(255, 255, 255, 0.1);
}
