/* ============================================================
   TOUR GUIADO - Amazonastur
   Versão 2.1: backdrop visível só na etapa de boas-vindas
   ============================================================ */

#tour-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999997;
    display: none;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.05);
    touch-action: none;
    overscroll-behavior: none;
    cursor: not-allowed;
}

/* Quando ativo na etapa de boas-vindas: oclusão real */
#tour-backdrop.tour-backdrop-visivel {
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    animation: tourBackdropFadeIn 0.3s ease;
}

@keyframes tourBackdropFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#tour-highlight {
    position: fixed;
    border-radius: 10px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
    outline: 3px solid #ffb300;
    outline-offset: 3px;
    z-index: 999998;
    pointer-events: none;
    display: none;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    animation: tourPulse 2s ease-in-out infinite;
}

@keyframes tourPulse {
    0%, 100% { outline-color: #ffb300; }
    50%      { outline-color: #ffd54f; }
}

#tour-popup {
    position: fixed;
    background: white;
    border-radius: 16px;
    padding: 28px 32px 24px;
    max-width: 560px;
    width: calc(100% - 32px);
    box-shadow: 0 20px 70px rgba(0, 0, 0, 0.4);
    z-index: 999999;
    display: none;
    font-family: 'Montserrat', Arial, sans-serif;
    border-top: 6px solid #ffb300;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                top 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#tour-popup.ativo {
    display: block;
}

/* Seta do balão */
#tour-popup::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 14px solid transparent;
    left: var(--arrow-x, 50%);
    transform: translateX(-50%);
}

#tour-popup[data-placement="top"]::before {
    top: -25px;
    border-bottom-color: #ffb300;
    border-top-width: 0;
}

#tour-popup[data-placement="bottom"]::before {
    bottom: -25px;
    border-top-color: #ffb300;
    border-bottom-width: 0;
}

#tour-popup[data-placement="center"]::before {
    display: none;
}

.tour-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 12px;
    flex-wrap: wrap;
}

.tour-titulo {
    font-size: 18px;
    font-weight: 800;
    color: #0d4a2a;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
}

.tour-titulo i {
    color: #ffb300;
    font-size: 20px;
}

.tour-badge {
    background: #e8f5e9;
    color: #1a6b3c;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 50px;
    white-space: nowrap;
}

.tour-texto {
    font-size: 15px;
    line-height: 1.7;
    color: #212529;
    margin-bottom: 22px;
}

.tour-texto strong {
    color: #0d4a2a;
    font-weight: 700;
}

.tour-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tour-footer-esquerda {
    display: flex;
    gap: 8px;
}

.tour-footer-direita {
    display: flex;
    gap: 10px;
}

.tour-btn {
    padding: 11px 22px;
    border-radius: 50px;
    border: none;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tour-btn-primario {
    background: linear-gradient(90deg, #0d4a2a, #1a6b3c);
    color: white;
}

.tour-btn-primario:hover {
    background: linear-gradient(90deg, #1a6b3c, #2d8a4e);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(13, 74, 42, 0.35);
}

.tour-btn-secundario {
    background: #f1f3f5;
    color: #495057;
}

.tour-btn-secundario:hover {
    background: #e9ecef;
}

.tour-btn-pular {
    background: transparent;
    color: #6c757d;
    padding: 11px 14px;
    font-size: 13px;
}

.tour-btn-pular:hover {
    color: #dc3545;
}

.tour-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* Botão "?" no cabeçalho */
.btn-tour-ajuda {
    background: #ffb300;
    color: #0d4a2a;
    border: 2px solid #ffb300;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
    transition: all 0.25s ease;
    margin-left: 8px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    animation: btnPulse 3s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 179, 0, 0); }
    50%      { box-shadow: 0 0 0 10px rgba(255, 179, 0, 0.25); }
}

.btn-tour-ajuda:hover {
    background: #ffc107;
    border-color: #ffc107;
    transform: scale(1.1);
    animation: none;
}

@media (max-width: 576px) {
    #tour-popup {
        padding: 20px 22px 18px;
        border-radius: 12px;
        max-width: calc(100% - 24px);
    }
    .tour-titulo { font-size: 16px; }
    .tour-texto { font-size: 14px; }
    .tour-btn { padding: 10px 16px; font-size: 12.5px; }
    .tour-btn-pular { padding: 10px 12px; }
}