/* * HGG Formulários Inteligentes - Estilos Multi-Step 
 * Versão: 1.6.2 - Suporte a Variáveis Dinâmicas e Slide Real
 */

:root {
    --hgg-step-color: #2271b1; /* Cor Primária (Botões/Destaques) */
    --hgg-step-bg: #f0f0f1;    /* Cor de Fundo (Track da Barra) */
    --hgg-step-text: #50575e;  /* Cor de Texto */
}

/* Container Geral de Etapas */
.hgg-form-steps-wrapper {
    position: relative;
    min-height: 100px;
    margin-bottom: 25px;
    overflow: hidden; /* Vital para o Slide Horizontal não criar scrollbar */
}

/* Base das Etapas */
.hgg-form-step {
    display: none;
    width: 100%;
}

.hgg-form-step.active {
    display: block;
}

/* --- NOVAS ANIMAÇÕES DE TRANSIÇÃO (SLIDE HORIZONTAL) --- */

/* Avançar: Novo step vem da DIREITA */
.hgg-step-slide-next {
    display: block !important;
    animation: hggEnterRight 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Voltar: Novo step vem da ESQUERDA */
.hgg-step-slide-prev {
    display: block !important;
    animation: hggEnterLeft 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes hggEnterRight {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes hggEnterLeft {
    from { opacity: 0; transform: translateX(-60px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- ANIMAÇÕES DE TRANSIÇÃO ORIGINAIS --- */
.hgg-anim-fade { animation: hggFadeIn 0.5s ease; }
.hgg-anim-slide { animation: hggSlideUp 0.5s ease-out; }
.hgg-anim-zoom { animation: hggZoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

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

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

@keyframes hggZoomIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

/* --- INDICADORES DE PROGRESSO --- */
.hgg-progress-container {
    margin-bottom: 40px;
    width: 100%;
}

/* MODO 1: Barra de Porcentagem (bar) */
.hgg-progress-bar-wrapper {
    width: 100%;
    height: 10px;
    background-color: var(--hgg-step-bg);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.hgg-progress-bar-fill {
    height: 100%;
    background-color: var(--hgg-step-color);
    transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1);
    width: 0%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.hgg-progress-info {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--hgg-step-text);
}

/* MODO 2: Ícones/Bolas (steps) */
.hgg-progress-steps {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.hgg-progress-steps li {
    position: relative;
    flex: 1;
    text-align: center;
    z-index: 1;
}

.hgg-progress-steps li .step-number {
    width: 35px;
    height: 35px;
    line-height: 31px;
    border: 2px solid #ddd;
    background: #fff;
    border-radius: 50%;
    margin: 0 auto 8px;
    font-weight: bold;
    color: #999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hgg-progress-steps li .step-label {
    font-size: 13px;
    color: #999;
    font-weight: 500;
}

.hgg-progress-steps li::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #ddd;
    top: 17px;
    left: -50%;
    z-index: -1;
    transition: background-color 0.3s ease;
}

.hgg-progress-steps li:first-child::after { content: none; }

/* Estados Ativos e Completos */
.hgg-progress-steps li.active .step-number {
    border-color: var(--hgg-step-color);
    background-color: var(--hgg-step-color);
    color: #fff;
}

.hgg-progress-steps li.active .step-label {
    color: var(--hgg-step-color);
}

.hgg-progress-steps li.active::after,
.hgg-progress-steps li.completed::after {
    background-color: var(--hgg-step-color);
}

.hgg-progress-steps li.completed .step-number {
    border-color: #10b981;
    background-color: #10b981;
    color: #fff;
    font-size: 0;
}

.hgg-progress-steps li.completed .step-number::before {
    content: "✓";
    font-size: 16px;
}

/* MODO 3: Texto Simples (text) */
.hgg-progress-text {
    font-size: 16px;
    font-weight: 600;
    padding: 15px;
    border-left: 5px solid var(--hgg-step-color);
    background: var(--hgg-step-bg);
    color: #1d2327;
    border-radius: 0 4px 4px 0;
}

/* --- NAVEGAÇÃO (BOTÕES) --- */
.hgg-multistep-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #f0f0f1;
}

.hgg-multistep-navigation button {
    padding: 14px 28px;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    font-size: 15px;
}

/* Botão Próximo (Sempre usa a cor primária) */
.hgg-next-step {
    background-color: var(--hgg-step-color) !important;
    color: #ffffff !important;
    border: none !important;
    margin-left: auto;
}

.hgg-next-step:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Botão Anterior */
.hgg-prev-step {
    background-color: #ffffff;
    color: var(--hgg-step-text);
}

.hgg-prev-step:hover {
    background-color: #f8fafc;
    border-color: #cbd5e0;
}

/* --- UTILITÁRIOS --- */

/* Shake de Erro */
.hgg-shake-error {
    animation: hgg-shake 0.4s ease-in-out;
}

@keyframes hgg-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    50% { transform: translateX(8px); }
    75% { transform: translateX(-4px); }
}