/***** GERAL *****/


body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #000000;
}


/***** PANORAMA *****/

#panorama {
    flex: 1;
    width: 100%;
    min-height: 0;
    background: #000;
    transition: opacity 450ms ease, filter 800ms ease;
}

body.is-scene-loading #panorama{
  filter: blur(1.5px) brightness(0.65) saturate(0.85);
}

/***** CARROSSEL *****/

#carrossel {
    display: flex;
    flex-direction: row;
    overflow: hidden;
    overflow-x: auto;
    padding: 10px;
    gap: 10px;
    background-color: #000000;
    border-top: 1px solid #000000;
    opacity: 1;
    height: 80px;
    transition: height 0.3s ease, opacity 0.3s ease;
    /* Transições suaves */
}

/* Quando o carrossel não está visivel */
#carrossel.hidden {
    height: 0;
    /* Reduz altura ao esconder */
    opacity: 0;
    /* Oculta o carrossel */
    padding: 0;
    /* Remove padding para evitar espaços extras */
    border-top: none;
    /* Remove a borda ao esconder */
    pointer-events: none;
    /* Evita interação com o conteúdo oculto */
}

/* Estilo da imagem do carrossel */
.image-container {
    position: relative;
    /* Para a sobreposição */
    display: inline-block;
    /* Para que as imagens fiquem lado a lado */
}

/* imagem do carrossel */
#carrossel img {
    height: 80px;
    width: 180px;
    cursor: pointer;
    border-radius: 5px;
    transition: transform 0.3s ease;/
}

/* quando passa o mouse em alguma foto */
#carrossel img:hover {
    transform: scale(1.1);
}

/* efeito cinza ao passar o mouse */
.image-container:hover img {
    filter: grayscale(60%);
}

/* Sobreposição centralizada com o nome da foto */
.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Exibir a sobreposição ao passar o mouse */
.image-container:hover .overlay {
    opacity: 1;
}

/* Estilo para a planta no carrossel */
.planta-container img {
    border: 2px solid #ffffff;
    /* Destaque para a imagem da planta */
}


/***** BOTÃO DO CARROSSEL *****/

/* botão para esconder ou abrir */
#toggleCarousel {
    background-color: #000000;
    border: 1.5px solid rgb(255, 255, 255);
    color: white;
    border-radius: 1px;
    padding: 5px 18px;
    font-size: 8px;
    cursor: pointer;
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translate(-50%, 0);
    z-index: 20;
    transition: bottom 0.3s ease;
    /* A transição suave da seta */
}

/* Quando o carrossel estiver escondido */
.carrossel-escondido #toggleCarousel {
    bottom: 0px;
    /* A seta vai para baixo */
}

/* quando passa o mouse */
#toggleCarousel:hover {
    background-color: #e0e0e0;
    color: rgb(0, 0, 0);
    border: 2px solid rgb(0, 0, 0);
    /* Adiciona uma borda sólida */
}

/* Tooltip personalizada */
#toggleCarousel[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    /* O texto da tooltip vem do atributo data-tooltip */
    position: absolute;
    bottom: 120%;
    /* Posiciona acima do botão */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    /* Evita quebra de linha */
    font-size: 14px;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease;
    z-index: 999;
}

/***** LEGENDA DA FOTO *****/

/* estilo da legenda da foto no canto inferior esquerdo da tela */
#scene-caption {
    position: absolute;
    bottom: 120px;
    /* altura inicial para aparecer acima do carrossel */
    left: 10px;
    color: white;
    background-color: rgba(0, 0, 0, 0.6);
    /* fundo semi-transparente */
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    transition: bottom 0.3s ease;
    /* Transição suave para o movimento */
}

/* quando o carrossel baixa, a legenda baixa */
.carrossel-escondido #scene-caption {
    bottom: 20px;
}

/***** MODAL DO BOTÃO DE INFORMAÇÕES *****/

/* icone do botão */
.photo-info-icon {
    position: absolute;
    bottom: 118px;
    left: 70px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
    transition: bottom 0.3s ease;
    /* Transição suave para o movimento */
}

/* Tooltip oculta por padrão */
.photo-info-icon::after {
    content: attr(data-tooltip);
    /* O texto da tooltip vem do atributo data-tooltip */
    position: absolute;
    bottom: 120%;
    /* Acima do botão */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    color: #000000;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    /* Evita quebra de linha */
    font-size: 14px;
    opacity: 0;
    /* Invisível inicialmente */
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 999;
}

/* Exibir a tooltip ao passar o mouse */
.photo-info-icon:hover::after,
.photo-info-icon:hover::before {
    opacity: 1;
    visibility: visible;
}

.photo-info-icon:hover {
    filter: invert(1);
    /* Inverte as cores para branco e preto */
}

.photo-info-icon img {
    width: 32px;
    height: 32px;
}

.carrossel-escondido .photo-info-icon {
    bottom: 20px;
}

/* Modal de informações da foto */
.photo-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.photo-modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.photo-modal h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.photo-modal p {
    font-size: 16px;
    color: #555;
}

/* Botão de fechar */
.photo-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 50px;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s;
}

.photo-close-button:hover {
    color: #000;
}

/* Exibir o modal */
.photo-modal.show {
    opacity: 1;
    visibility: visible;
}

/***** MODAL DA PLANTA *****/

/* estilo modal*/
.modal-planta {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Impede a rolagem no modal */
    background-color: rgba(0, 0, 0, 0.9);
    /* Fundo escuro semi-transparente */
}

/* Imagem dentro do modal */
.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    /* Largura total da tela */
    height: 100vh;
    /* Altura total da tela */
    object-fit: contain;
    /* Ajusta a imagem mantendo a proporção */
}

/* Fechar botão "X" */
.close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    /* Mantém o botão acima da imagem */
}

/* Sposts do modal */
#plant-modal .spot {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid black;
    cursor: pointer;
    transition: transform 0.2s;
}

#plant-modal .spot:hover {
    transform: scale(1.2);
    /* aumenta o spot ao passar o mouse */
    background-color: rgba(43, 255, 0, 0.356);
    /* pinta o spot ao passar o mouse */
}

/* tooltip do spot do modal */
#plant-modal .spot .tooltip {
    visibility: hidden;
    width: 60px;
    background-color: black;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    bottom: 125%;
    /* posicione a tooltip acima do spot */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    white-space: nowrap;
}

#plant-modal .spot:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/*** PANNELLUM ***/

/* bussola */
.pnlm-compass {
    filter: invert(1);
    /* Inverte as cores para branco e preto */
}

/* controles de zoom e tela cheia */
.pnlm-controls-container {
    filter: invert(1);
    /* Inverte as cores para branco e preto */
}

/* zoom mais */
.pnlm-zoom-in:hover {
    filter: invert(1);
}

/* zoom menos */
.pnlm-zoom-out:hover {
    filter: invert(1);
}

/* tela cheia */
.pnlm-fullscreen-toggle-button:hover {
    filter: invert(1);
}

/* ocultar o texto de "LOADING..." ao trocar de cena */
.pnlm-load-box {
    display: none !important;
}

/* Tooltip do Hotspot */
.pnlm-tooltip span {
    max-width: 300px;
    /* Largura máxima */
    white-space: normal;
    /* Permitir quebra de linha */
    padding: 10px;
    /* Ajustar o espaçamento interno */
    font-size: 14px;
    /* Tamanho do texto */
    background-color: rgba(0, 0, 0, 0.8);
    /* Cor do fundo */
    color: #fff;
    /* Cor do texto */
    border-radius: 5px;
    /* Bordas arredondadas */
    text-align: center;
    /* Alinhar texto */
}

/* efeito "nublado" e menos interativo antes de iniciar */
body.tour-not-started #panorama {
    filter: blur(6px) brightness(0.55) saturate(0.75);
}

body.tour-not-started #carrossel {
    height: 0;
    opacity: 0;
    padding: 0;
    border-top: none;
    overflow: hidden;
    pointer-events: none;
}

/* bloqueia interação no pano antes do start (mas mantém auto-rotate funcionando) */
body.tour-not-started #panorama {
    pointer-events: none;
}

/* esconde ui até iniciar */
body.tour-not-started #toggleCarousel,
body.tour-not-started #scene-caption,
body.tour-not-started #photoInfoButton {
    opacity: 0;
    pointer-events: none;
}

/* também esconde controles do pannellum na abertura */
body.tour-not-started .pnlm-controls-container,
body.tour-not-started .pnlm-compass {
    opacity: 0;
    pointer-events: none;
}

.tour-intro {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.75)),
        rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 1;
    transition: opacity 600ms ease, visibility 600ms ease;
}

.tour-intro.hide {
    opacity: 0;
    visibility: hidden;
}

.tour-intro-card {
    width: min(520px, 92vw);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    border-radius: 14px;
    padding: 28px 22px;
}

.tour-intro-title {
    color: #ffffff;
    font-size: 28px;
    letter-spacing: 0.4px;
    margin-bottom: 18px;
}

.tour-intro-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 12px 26px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.tour-intro-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.20);
    border-color: rgba(255, 255, 255, 0.85);
}

.tour-intro-btn:active {
    transform: translateY(0px);
}

/***** FADE SUAVE ENTRE CENAS (seu changeSceneSmoothly usa .hidden no #panorama) *****/
#panorama.hidden {
    opacity: 0;
}

.scene-loader{
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

body.is-scene-loading .scene-loader{
  opacity: 1;
}

.scene-loader::after{
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,0.28);
  border-top-color: rgba(255,255,255,0.9);
  animation: spin 800ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
