/* ==========================================================================
   TUTORIAL — overlay, recorte do elemento e balão.
   Segue os tokens do design system (arquivos_css/design-system.css): preto,
   branco e verde. Sem azul em lugar nenhum.
   O recorte é uma box-shadow gigante: escurece tudo menos o alvo, e como o
   elemento do recorte não captura clique, o usuário continua usando a tela.
   ========================================================================== */

.tut-recorte {
    position: absolute;
    z-index: 20000;
    border-radius: var(--ds-border-radius-btn, 6px);
    pointer-events: none;
    box-shadow: 0 0 0 9999px rgba(17, 17, 17, .55);
    outline: 2px solid var(--ds-green, #70BF00);
    outline-offset: 2px;
    transition: top .15s ease, left .15s ease, width .15s ease, height .15s ease;
}

.tut-recorte-vazio {
    box-shadow: 0 0 0 9999px rgba(17, 17, 17, .55);
    outline: none;
}

.tut-balao {
    position: absolute;
    z-index: 20001;
    width: 340px;
    max-width: calc(100vw - 32px);
    background: var(--ds-white, #fff);
    border-radius: var(--ds-border-radius-card, 12px);
    padding: 14px 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    font-size: .8rem;
    color: var(--ds-gray-900, #111827);
}

.tut-balao-centro {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 360px;
}

.tut-balao h4 {
    font-size: .95rem;
    font-weight: 500;
    margin: 0 0 6px;
    color: var(--ds-gray-900, #111827);
}

.tut-balao p {
    margin: 0 0 12px;
    line-height: 1.5;
    color: var(--ds-gray-700, #374151);
    /* o texto vem de textarea: o Enter do editor vira quebra de linha aqui */
    white-space: pre-line;
}

/* Rodapé em duas fileiras: a de cima é informação (etapa e saída), a de baixo
   é ação. Numa linha só, "Voltar + Fazer agora + Próximo" não cabia. */
.tut-balao .tut-rodape {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--ds-gray-200, #e5e7eb);
    padding-top: 10px;
}

.tut-balao .tut-rodape-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tut-balao .tut-etapa {
    font-size: .68rem;
    color: var(--ds-gray-500, #6b7280);
}

.tut-balao .tut-acoes {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.tut-balao .tut-acoes button {
    white-space: nowrap;
}

.tut-btn {
    border: 1px solid var(--ds-gray-300, #d1d5db);
    background: var(--ds-white, #fff);
    color: var(--ds-gray-700, #374151);
    font-size: .72rem;
    padding: 5px 12px;
    border-radius: var(--ds-border-radius-btn, 6px);
    cursor: pointer;
}

.tut-btn:hover {
    background: var(--ds-gray-50, #f9fafb);
}

.tut-btn-principal {
    background: var(--ds-green, #70BF00);
    border-color: var(--ds-green, #70BF00);
    color: var(--ds-white, #fff);
}

.tut-btn-principal:hover {
    background: var(--ds-green-dark, #4a9d15);
    border-color: var(--ds-green-dark, #4a9d15);
    color: var(--ds-white, #fff);
}

.tut-link {
    background: none;
    border: none;
    color: var(--ds-gray-500, #6b7280);
    font-size: .68rem;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}

.tut-link:hover {
    color: var(--ds-gray-900, #111827);
}

.tut-opcoes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.tut-opcao {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid var(--ds-gray-300, #d1d5db);
    background: var(--ds-white, #fff);
    border-radius: var(--ds-border-radius-btn, 6px);
    padding: 8px 10px;
    cursor: pointer;
}

.tut-opcao:hover {
    border-color: var(--ds-green, #70BF00);
    background: var(--ds-green-light, #f0f9e8);
}

.tut-opcao strong {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--ds-gray-900, #111827);
}

.tut-opcao span {
    font-size: .68rem;
    color: var(--ds-gray-500, #6b7280);
}

.tut-progresso {
    height: 3px;
    background: var(--ds-gray-200, #e5e7eb);
    border-radius: 2px;
    margin-bottom: 10px;
    overflow: hidden;
}

.tut-progresso div {
    height: 100%;
    background: var(--ds-green, #70BF00);
    transition: width .2s ease;
}

/* Confirmação do tutorial (SweetAlert) precisa passar por cima do balão e do
   recorte, que vivem em z-index 20001. Sem isso a pergunta "sair do tutorial?"
   aparece atrás do próprio tutorial. */
.tut-swal-topo {
    z-index: 20050 !important;
}

/* Pastilha do tutorial recolhido: o usuário mandou "fazer agora", então a tela
   fica livre e só sobra este atalho para voltar de onde parou. */
.tut-pastilha {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 20002;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--ds-black, #111);
    color: #fff;
    border-radius: 999px;
    padding: 8px 8px 8px 16px;
    font-size: .75rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

.tut-pastilha button {
    border: none;
    background: var(--ds-green, #70BF00);
    color: #fff;
    font-size: .72rem;
    padding: 5px 12px;
    border-radius: 999px;
    cursor: pointer;
}

.tut-pastilha button:hover {
    background: var(--ds-green-dark, #4a9d15);
}

.tut-espera {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .68rem;
    color: var(--ds-green-badge-text, #247A0F);
    background: var(--ds-green-badge-bg, #dcfce7);
    border-radius: var(--ds-border-radius-btn, 6px);
    padding: 4px 8px;
    margin-bottom: 10px;
}
