/* =========================================================
   WELCOME - Seleção do tipo de cálculo TMU
   Baseado em style.css
   ========================================================= */


/* O wizard normal tem max-width: 650px.
   Na página welcome precisamos de espaço para os dois cartões. */
.wizard-card.welcome-wrapper {
    max-width: 1150px;
    width: calc(100% - 40px);
}


/* Título / introdução */
.welcome-intro h4 {
    font-weight: 500;
}

.welcome-intro p {
    color: #6c757d;
}


/* =========================================================
   CARTÕES DE SELEÇÃO
   ========================================================= */

.tmu-option {
    height: 100%;
    display: flex;
    flex-direction: column;

    background-color: #fff;

    border: 1px solid var(--bg-gray);
    border-radius: 10px;

    padding: 25px;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.tmu-option:hover {
    transform: translateY(-3px);

    border-color: var(--main-color);

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.10);
}


/* Número 1 / 2 */
.tmu-number {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 18px;

    border-radius: 50%;

    background-color: var(--main-color);
    color: var(--font-white);

    font-size: 18px;
    font-weight: 700;
}


/* Título de cada opção */
.tmu-option h5 {
    min-height: 72px;

    margin-bottom: 15px;

    font-size: 15px;
    font-weight: 500;
    line-height: 1.45;

    text-align: center;
}


/* =========================================================
   FÓRMULAS
   ========================================================= */

.formula {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 4px;

    width: 100%;

    margin: 10px 0 25px;

    padding: 14px 8px;

    background-color: #f8f9fa;

    border: 1px solid var(--bg-gray);
    border-radius: 6px;

    /*
     * Tamanho mais reduzido para permitir
     * que a fórmula fique numa única linha.
     */
    font-size: 13px;
    font-weight: 500;

    line-height: 1.2;

    white-space: nowrap;
}


/* Frações matemáticas */
.formula-frac {
    display: inline-flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    vertical-align: middle;

    line-height: 1.05;

    white-space: nowrap;
}


/* Numerador */
.formula-frac .numerator {
    display: block;

    padding: 0 4px 3px;

    border-bottom: 1px solid currentColor;
}


/* Denominador */
.formula-frac .denominator {
    display: block;

    padding-top: 3px;
}


/* Botão sempre alinhado no fundo dos dois cartões */
.tmu-option .btn {
    margin-top: auto;
}


/* =========================================================
   RESPONSIVIDADE
   ========================================================= */


/*
 * Tablets / ecrãs intermédios.
 * Reduz ligeiramente fórmula e padding.
 */
@media (max-width: 991.98px) {

    .wizard-card.welcome-wrapper {
        max-width: 900px;
    }

    .tmu-option {
        padding: 20px;
    }

    .formula {
        font-size: 11.5px;
        gap: 3px;
        padding-left: 5px;
        padding-right: 5px;
    }

}


/*
 * Mobile
 *
 * Cada opção passa para uma linha.
 * A fórmula pode adaptar-se à largura disponível.
 */
@media (max-width: 767.98px) {

    .wizard-card.welcome-wrapper {
        width: calc(100% - 20px);

        margin-top: 15px;
        margin-bottom: 15px;
    }

    .content {
        padding: 20px;
    }

    .tmu-option {
        padding: 20px;
    }

    .tmu-option h5 {
        min-height: auto;

        font-size: 14px;
    }

    .formula {
        /*
         * Continua compacta, mas permite quebra
         * caso um telemóvel seja muito estreito.
         */
        flex-wrap: wrap;

        white-space: normal;

        font-size: 11px;

        line-height: 1.35;

        margin-bottom: 20px;
    }

    .formula-frac {
        white-space: nowrap;
    }

}


/*
 * Telemóveis muito pequenos
 */
@media (max-width: 420px) {

    .content {
        padding: 15px;
    }

    .tmu-option {
        padding: 15px;
    }

    .formula {
        font-size: 10px;
    }

    .tmu-number {
        width: 40px;
        height: 40px;

        font-size: 16px;
    }
}