/* ==========================================================================
   Steps Widget (Passo a Passo) for Elementor — v1.0.0
   Loaded only on pages that contain the widget (get_style_depends).
   ========================================================================== */

.pwa-steps {
    --pwa-marker-size: 60px;
    --pwa-connector-color: #cccccc;
    --pwa-connector-height: 2px;
    --pwa-connector-style: solid;
    --pwa-content-top-spacing: 16px;
    --pwa-content-gap: 20px;
    --pwa-steps-gap: 32px;

    width: 100%;
    box-sizing: border-box;
}

.pwa-steps * { box-sizing: border-box; }

.pwa-steps-track {
    display: flex;
}

.pwa-step-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--pwa-marker-size);
    height: var(--pwa-marker-size);
    flex-shrink: 0;
    border-radius: 50%;
    background-color: #1a7d8c;
    color: #ffffff;
    font-weight: 700;
    font-size: 18px;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.pwa-step-marker i,
.pwa-step-marker svg {
    font-size: 42%;
    width: 42%;
    height: 42%;
}

.pwa-step-title {
    font-weight: 700;
    margin: 0;
}

.pwa-step-title-link {
    color: inherit;
    text-decoration: underline;
}

.pwa-step-desc {
    margin: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HORIZONTAL
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.pwa-steps-horizontal .pwa-steps-track {
    flex-direction: row;
    align-items: flex-start;
}

.pwa-steps-horizontal .pwa-step {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pwa-steps-horizontal .pwa-step-marker-col {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
}

.pwa-steps-horizontal .pwa-step-line {
    display: none;
}

.pwa-steps-horizontal .pwa-step:not(:last-child) .pwa-step-marker-wrap::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 0;
    border-top-width: var(--pwa-connector-height);
    border-top-style: var(--pwa-connector-style);
    border-top-color: var(--pwa-connector-color);
    transform: translateY(-50%);
    z-index: 0;
}

.pwa-steps-horizontal .pwa-step-content {
    margin-top: var(--pwa-content-top-spacing);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   VERTICAL
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.pwa-steps-vertical .pwa-steps-track {
    flex-direction: column;
}

.pwa-steps-vertical .pwa-step {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
}

.pwa-steps-vertical .pwa-step-marker-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: var(--pwa-content-gap);
    /* O passo usa align-items: flex-start, então a coluna do marcador não
       esticava e o flex:1 da linha não tinha altura para crescer — o conector
       ficava preso no min-height, sem alcançar o marcador seguinte. */
    align-self: stretch;
}

.pwa-steps-vertical .pwa-step-line {
    display: block;
    flex: 1;
    width: 0;
    min-height: 24px;
    margin: 6px 0;
    border-left-width: var(--pwa-connector-height);
    border-left-style: var(--pwa-connector-style);
    border-left-color: var(--pwa-connector-color);
}

.pwa-steps-vertical .pwa-step-content {
    flex: 1;
    padding-bottom: var(--pwa-steps-gap);
}

.pwa-steps-vertical .pwa-step:last-child .pwa-step-content {
    padding-bottom: 0;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NO CONNECTOR
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.pwa-steps-no-connector .pwa-step-line,
.pwa-steps-no-connector .pwa-step-marker-wrap::after {
    display: none !important;
    content: none !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STACK ON MOBILE (horizontal → vertical below 767px)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 767px) {
    .pwa-steps-stack-mobile .pwa-steps-track {
        flex-direction: column;
    }

    .pwa-steps-stack-mobile .pwa-step {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        padding: 0 !important;
    }

    .pwa-steps-stack-mobile .pwa-step-marker-col {
        flex-direction: column;
        align-items: center;
        width: auto;
        margin-right: var(--pwa-content-gap);
        align-self: stretch; /* mesmo motivo do vertical */
        /* O horizontal usa justify-content: center para centralizar o marcador
           na coluna; aqui o eixo principal virou vertical e a coluna estica,
           então "center" empurrava o marcador para o meio do passo. Só aparecia
           no último passo, o único sem linha para ocupar a sobra — era o
           conector anterior que parecia não chegar. */
        justify-content: flex-start;
    }

    .pwa-steps-stack-mobile .pwa-step-marker-wrap::after {
        content: none !important;
    }

    .pwa-steps-stack-mobile .pwa-step-line {
        display: block;
        flex: 1;
        width: 0;
        min-height: 24px;
        margin: 6px 0;
        border-left-width: var(--pwa-connector-height);
        border-left-style: var(--pwa-connector-style);
        border-left-color: var(--pwa-connector-color);
    }

    .pwa-steps-stack-mobile .pwa-step-content {
        margin-top: 0;
        padding-bottom: var(--pwa-steps-gap);
    }

    .pwa-steps-stack-mobile .pwa-step:last-child .pwa-step-content {
        padding-bottom: 0;
    }
}
