/**
 * Checkout Multi-Step CSS
 *
 * Estilização completa do checkout multi-step:
 * - Layout principal (sidebar + content)
 * - Barra de progresso lateral (SUA JORNADA)
 * - Formulários de cada etapa
 * - Cards de planos
 * - Responsividade mobile
 *
 * Version: 1.0.0
 * Updated: 2026-02-13 11:00:00
 */

/* ==========================================================================
   Layout Principal
   ========================================================================== */

/* Ocultar Título Padrão do Tema (Checkout apenas) */
.woocommerce-checkout .entry-title,
.woocommerce-checkout .page-title {
    display: none !important;
}

.tnm-checkout-wrapper {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .tnm-checkout-wrapper {
        flex-direction: column;
        gap: 20px;
    }
}

.tnm-checkout-content {
    flex: 1;
    min-width: 0;
    /* Evita overflow */
}

/* ==========================================================================
   Layout: Step Indicator no Topo (desktop)
   Ativado via opção no Dashboard → tnm_checkout_indicator_layout = top
   ========================================================================== */

/* ==========================================================================
   Layout: Step Indicator no Topo (desktop)
   Ativado via opção no Dashboard → tnm_checkout_indicator_layout = top
   ========================================================================== */

.tnm-checkout-wrapper--top {
    flex-direction: column;
    gap: 40px;
}

.tnm-checkout-wrapper--top .tnm-step-indicator {
    width: 100%;
    position: relative;
    top: 0;
    padding: 0 20px 20px;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    /* Permitir labels para fora se necessário */
}

/* Ocultar título "SUA JORNADA" */
.tnm-checkout-wrapper--top .tnm-step-indicator__title {
    display: none;
}

/* Lista horizontal centralizada */
.tnm-checkout-wrapper--top .tnm-step-indicator__list {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    /* Espalhar itens */
    align-items: flex-start;
    gap: 0;
    position: relative;
    max-width: 800px;
    /* Limitar largura para não ficar muito espaçado */
    margin: 0 auto;
}

/* Linha Conectora (Background) */
.tnm-checkout-wrapper--top .tnm-step-indicator__list::before {
    content: '';
    position: absolute;
    top: 15px;
    /* Metade da altura da bolinha (30px/2) */
    left: 40px;
    /* Ajuste inicial */
    right: 40px;
    /* Ajuste final */
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

/* Item (Container) - Remover estilo de "Pill" */
.tnm-checkout-wrapper--top .tnm-step-indicator__item {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    z-index: 1;
    flex: 1;
    /* Distribuir espaço */
    transform: none !important;
    /* Remover hover lift */
}

/* Bolinha do Número */
.tnm-checkout-wrapper--top .tnm-step__number {
    width: 32px;
    height: 32px;
    font-size: 14px;
    margin: 0 0 8px 0;
    /* Margem inferior para o texto */
    border: 2px solid #ccc;
    background: #fff;
    color: #ccc;
    z-index: 2;
    /* Ficar acima da linha */
    transition: all 0.3s ease;
}

/* Título (Label) abaixo da bolinha */
.tnm-checkout-wrapper--top .tnm-step__title {
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    color: #999;
    text-transform: uppercase;
}

/* Ocultar check e outros ícones extras se houver */
.tnm-checkout-wrapper--top .tnm-step__check,
.tnm-checkout-wrapper--top .tnm-step__arrow {
    display: none;
}

/* --- ESTADOS (Top Layout) --- */

/* Ativo (Bola Verde Cheia) */
.tnm-checkout-wrapper--top .tnm-step--active .tnm-step__number {
    background: #008a6a;
    /* Verde Teal da imagem */
    border-color: #008a6a;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 138, 106, 0.1);
}

.tnm-checkout-wrapper--top .tnm-step--active .tnm-step__title {
    color: #008a6a;
}

/* Completado (Bola Branca com Borda Verde + Texto Verde) */
/* Update: Imagem mostrava bolas vazadas para passos futuros, mas vamos assumir completados como verdes também ou vazados? 
   Na imagem, o '1' está cheio. Os outros '2, 3, 4' estão vazados.
   Vamos seguir o padrão comum: Completados = Cheios ou Checks. 
   Mas para ficar IGUAL a imagem (onde parece ser step 1 checkado):
   Vamos fazer: Ativo = Cheio. Completado = Cheio também (ou check).
   Desenhando estilo "Clean": */

.tnm-checkout-wrapper--top .tnm-step--completed .tnm-step__number {
    background: #008a6a;
    border-color: #008a6a;
    color: #fff;
}

.tnm-checkout-wrapper--top .tnm-step--completed .tnm-step__title {
    color: #858585;
}

/* Pendente (Bola Branca, Borda Verde para combinar com o tema) */
.tnm-checkout-wrapper--top .tnm-step--pending .tnm-step__number {
    background: #fff;
    border-color: #008a6a;
    color: #008a6a;
    /* Texto verde também */
}

/* Ajuste da Linha de Progresso (Colorir até o ponto certo seria JS, vamos deixar cinza ou colorir tudo se quiser estilo fixo) 
   Para fazer a linha ficar verde nos completados, precisaríamos de CSS complexo com :has ou JS.
   Vamos deixar a linha simples #e0e0e0 ou verde fixa se preferir. 
   Na imagem a linha é verde inteira. Vamos por verde inteira então?
   "a horizontal connecting line crossing through the steps" -> Imagem tem linha verde. */
.tnm-checkout-wrapper--top .tnm-step-indicator__list::before {
    background: #008a6a;
    /* Linha Verde */
}

/* Ajuste para o Content ocupar largura total e centralizar */
.tnm-checkout-wrapper--top .tnm-checkout-content {
    width: 100%;
    margin: 0 auto;
}

/* ==========================================================================
   Step Indicator (Barra de Progresso Lateral)
   ========================================================================== */

.tnm-step-indicator {
    flex-shrink: 0;
    width: 260px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

@media (max-width: 768px) {
    .tnm-step-indicator {
        width: 100%;
        position: static;
        padding: 15px;
        /* Menos padding no mobile */
        overflow-x: auto;
        /* Permitir scroll se estourar */
    }

    .tnm-step-indicator__list {
        display: flex;
        flex-direction: row;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 5px;
        /* Espaço para scrollbar se houver */
        white-space: nowrap;
    }

    .tnm-step-indicator__item {
        flex-shrink: 0;
        /* Não espremer os itens */
        margin-bottom: 0;
        padding: 8px 12px;
        /* Itens menores */
    }

    .tnm-step-indicator__title {
        display: none;
        /* Ocultar título "SUA JORNADA" no mobile para economizar espaço */
    }
}

.tnm-step-indicator__title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.tnm-step-indicator__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tnm-step-indicator__item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 16px;
    margin-bottom: 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
}

/* Container da Jornada */
.tnm-step-indicator {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.tnm-step-indicator__item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    /* Pill shape */
    background: #fff;
    transition: all 0.3s ease;
    cursor: default;
}

/* Estados */
.tnm-step--completed {
    background: #f8f9fa;
    border-color: #e0e0e0;
    color: #28a745;
}

.tnm-step--active {
    background: #5ccc5c;
    /* Green Theme */
    border-color: #5ccc5c;
    color: #fff;
    box-shadow: 0 4px 12px rgba(92, 204, 92, 0.4);
    transform: translateY(-2px);
}

.tnm-step--pending {
    background: #fff;
    border-color: #eee;
    color: #999;
}

/* Elementos internos */
.tnm-step__icon {
    font-size: 20px;
}

.tnm-step__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.tnm-step--completed .tnm-step__number {
    background: #28a745;
    color: #fff;
    display: none;
}

/* On Active, make number white/green inverted */
.tnm-step--active .tnm-step__number {
    background: #fff;
    color: #5ccc5c;
}

.tnm-step--pending .tnm-step__number {
    background: #f1f1f1;
    color: #ccc;
}

.tnm-step__title {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.tnm-step__check {
    color: #28a745;
    font-size: 18px;
    font-weight: 700;
}

.tnm-step__arrow {
    color: #007bff;
    font-size: 18px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ==========================================================================
   Step Container
   ========================================================================== */

.tnm-step {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.tnm-step.tnm-step--4 {
    padding: 0px;
}

@media (max-width: 768px) {
    .tnm-step {
        padding: 24px;
    }
}

.tnm-step__header {
    margin-bottom: 40px;
    text-align: center;
    /* Centralizado */
}

.tnm-step__badge {
    display: inline-block;
    padding: 6px 16px;
    background: #e6fffa;
    /* Cyan claro */
    color: #0e5944;
    /* Verde marca */
    border: 1px solid #b2f5ea;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

/* Specific overwrite for Step 1 Title */
.tnm-step--1 .tnm-step__header .tnm-step__title {
    font-size: 28px;
    /* Maior destaque */
    color: #1a202c;
    margin-bottom: 12px;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .tnm-step--1 .tnm-step__header .tnm-step__title {
        font-size: 32px;
    }
}

.tnm-step-indicator__list .tnm-step__title {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

@media (max-width: 768px) {
    .tnm-step__title {
        font-size: 22px;
    }
}

.tnm-step__subtitle {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}

/* ==========================================================================
   Formulários
   ========================================================================== */

.tnm-form {
    margin: 0;
}

.tnm-form__row {
    margin-bottom: 24px;
}

.tnm-form__row--2cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .tnm-form__row--2cols {
        grid-template-columns: 1fr;
    }
}

.tnm-form__field {
    position: relative;
}

.tnm-form__label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.tnm-form__label .required {
    color: #dc3545;
}

.tnm-form__label-optional {
    font-weight: 400;
    color: #6c757d;
    font-style: italic;
}

.tnm-form__input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.tnm-form__input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.tnm-form__input:invalid {
    border-color: #dc3545;
}

.tnm-form__input[readonly] {
    background: #f8f9fa;
    cursor: not-allowed;
}

.tnm-form__hint {
    display: block;
    font-size: 13px;
    color: #6c757d;
    margin-top: 6px;
}

.tnm-form__field-with-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tnm-form__field-with-link .tnm-form__input {
    flex: 1;
}

.tnm-form__link {
    white-space: nowrap;
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
}

.tnm-form__link:hover {
    text-decoration: underline;
}

.tnm-form__loading {
    margin-top: 8px;
    color: #007bff;
    font-size: 14px;
    font-weight: 500;
}

.tnm-form__field-group {
    display: flex;
    gap: 12px;
}

.tnm-form__input--city {
    flex: 2;
}

.tnm-form__input--state {
    flex: 1;
    text-transform: uppercase;
}

/* ==========================================================================
   Plan Summary Banner (Step 2)
   ========================================================================== */

/* ==========================================================================
   Plan Summary Banner (When Plan is Selected)
   ========================================================================== */

.tnm-plan-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #0e5944;
    /* Borda Verde da Marca */
    border-left: 5px solid #0e5944;
    /* Destaque lateral */
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 32px;
    box-shadow: 0 4px 12px rgba(14, 89, 68, 0.08);
    /* Sombra leve verde */
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tnm-plan-summary-box {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 12px;
    flex-wrap: wrap;
}

.tnm-plan-summary__label {
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

.tnm-plan-summary__name {
    color: #0e5944;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tnm-plan-summary__price {
    color: #1a202c;
    font-weight: 600;
    font-size: 15px;
    background: #f0fdf4;
    padding: 4px 10px;
    border-radius: 6px;
    color: #0e5944;
}

/* Botão Trocar Plano (Ghost melhorado) */
#tnm-change-plan-btn {
    margin-left: auto;
    background: transparent;
    color: #666;
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#tnm-change-plan-btn:hover {
    background: #f3f4f6;
    color: #333;
    border-color: #9ca3af;
}

/* Mobile Adjustments for Summary */
@media (max-width: 600px) {
    .tnm-plan-summary-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    #tnm-change-plan-btn {
        margin-left: 0;
        width: 100%;
        margin-top: 8px;
        text-align: center;
        display: block;
    }
}

/* ==========================================================================
   Card de Upgrade (Step 2 — plano mais barato selecionado)
   ========================================================================== */

.tnm-upgrade-card {
    background: linear-gradient(135deg, #0e5944 0%, #1a7a5e 100%);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(14, 89, 68, 0.2);
    animation: tnm-upgrade-fadein 0.4s ease;
}

@keyframes tnm-upgrade-fadein {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tnm-upgrade-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.tnm-upgrade-card__text {
    flex: 1;
}

.tnm-upgrade-card__headline {
    color: #fff;
    font-size: 15px;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.tnm-upgrade-card__headline strong {
    color: #ccff00;
}

.tnm-upgrade-card__benefits {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tnm-upgrade-card__benefits li {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
}

.tnm-upgrade-card__btn {
    flex-shrink: 0;
    background: #ccff00;
    color: #0e5944;
    border: none;
    border-radius: 50px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tnm-upgrade-card__btn:hover {
    background: #d9ff33;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(204, 255, 0, 0.3);
}

.tnm-upgrade-card__btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Variante compacta — Step 4 (coluna lateral) */
.tnm-upgrade-card--compact {
    padding: 16px 18px;
    margin-bottom: 16px;
}

.tnm-upgrade-card--compact .tnm-upgrade-card__body {
    flex-direction: column;
    gap: 12px;
}

.tnm-upgrade-card--compact .tnm-upgrade-card__headline {
    font-size: 13px;
    margin-bottom: 6px;
}

.tnm-upgrade-card--compact .tnm-upgrade-card__benefits li {
    font-size: 12px;
}

.tnm-upgrade-card--compact .tnm-upgrade-card__btn {
    width: 100%;
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
}

/* Variante PIX pendente — order-received (mesmo verde TNM, destaque em ccff00) */
.tnm-upgrade-card--pix-pending .tnm-upgrade-card__benefits li {
    color: #ccff00;
    font-size: 14px;
}

@media (max-width: 600px) {
    .tnm-upgrade-card__body {
        flex-direction: column;
        align-items: flex-start;
    }

    .tnm-upgrade-card__btn {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   Botões
   ========================================================================== */

.tnm-form__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
}

.tnm-form__actions--center {
    justify-content: center;
}

.tnm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    line-height: 1.5;
}

.tnm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tnm-btn--primary {
    background: #007bff;
    color: #fff;
}

.tnm-btn--primary:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.tnm-btn--secondary {
    background: #6c757d;
    color: #fff;
}

.tnm-btn--secondary:hover:not(:disabled) {
    background: #5a6268;
}

.tnm-btn--ghost {
    background: transparent;
    color: #6c757d;
    border: 2px solid #dee2e6;
}

.tnm-btn--ghost:hover {
    background: #f8f9fa;
    border-color: #6c757d;
}

.tnm-btn--block {
    width: 100%;
    margin-top: 16px;
}

.tnm-btn__arrow {
    font-size: 18px;
}

/* ==========================================================================
   Cards de Planos
   ========================================================================== */

.tnm-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

@media (max-width: 640px) {
    .tnm-plans {
        grid-template-columns: 1fr;
    }
}

.tnm-plan {
    position: relative;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    /* Mais arredondado */
    padding: 32px 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.tnm-plan:hover {
    border-color: #0e5944;
    transform: translateY(-8px);
    /* Maior flutuação */
    box-shadow: 0 12px 24px -4px rgba(14, 89, 68, 0.12);
    /* Sombra verde suave */
}

.tnm-plan--featured {
    border: 2px solid #0e5944;
    /* Borda destaque */
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.tnm-plan--selected {
    border-color: #0e5944;
    background: #f0fff4;
    /* Fundo verde bem claro */
    box-shadow: 0 0 0 2px #0e5944;
    /* Anel externo */
}

.tnm-plan__badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    /* Centralizado no topo */
    background: #0e5944;
    color: #ccff00;
    /* Neon text */
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 150px;
}

.tnm-plan__header {
    margin-bottom: 20px;
}

.tnm-plan__name {
    font-size: 22px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 4px 0;
}

.tnm-plan__tagline {
    font-size: 14px;
    color: #6c757d;
    margin: 0 auto;
}

.tnm-checkout-header {
    text-align: center;
    max-width: 800px;
    margin: 40px auto 20px;
    padding: 0 20px;
}

.tnm-checkout-main-title {
    width: 100%;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: #222;
    margin-bottom: 10px;
    line-height: 1.2;
}

.tnm-checkout-subtitle {
    display: block;
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
    font-weight: 400;
}

.tnm-checkout-wrapper {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 24px;
}

.tnm-plan__price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 24px;
}

.tnm-plan__currency {
    font-size: 18px;
    color: #6c757d;
}

.tnm-plan__value {
    font-size: 36px;
    font-weight: 700;
    color: #212529;
}

.tnm-plan__period {
    font-size: 16px;
    color: #6c757d;
}

.tnm-plan__features {
    list-style: none;
    margin: 0 0 24px 0;
    padding: 0;
}

.tnm-plan__feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 15px;
    color: #212529;
}

.tnm-plan__feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #28a745;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.tnm-plan__action {
    margin-top: auto;
}

/* ==========================================================================
   Etapa 4: Pagamento (Grid 2 colunas: Pagamento Esquerda, Resumo Direita)
   ========================================================================== */

.tnm-checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 0;
    /* Remove gap as requested (visual connection) */
    align-items: start;
}

@media (max-width: 992px) {
    .tnm-checkout-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        /* Restore gap on mobile where they stack */
    }
}

/* Coluna Esquerda: Métodos de Pagamento */
.tnm-checkout-payment-column {
    background: #f8f9fa;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;

    /* Equal padding */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
}

@media (max-width: 992px) {
    .tnm-checkout-payment-column {
        border-radius: 12px;
        padding: 24px;
    }
}

.tnm-checkout-payment-column .tnm-column-title {
    margin: 30px 30px 0px 30px;
}

.tnm-column-title {
    font-size: 20px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 24px;
    padding-bottom: 15px;
    color: #333;
}

/* Esconder o botão, texto legal ORIGINAL e TABELA DE RESUMO (duplicada) */
.tnm-checkout-payment-column #place_order,
.tnm-checkout-payment-column .woocommerce-terms-and-conditions-wrapper,
.tnm-checkout-payment-column .woocommerce-privacy-policy-text,
.tnm-checkout-payment-column .form-row.place-order,
.tnm-checkout-payment-column .woocommerce-checkout-review-order-table {
    display: none !important;
}

/* Ajustes no container de pagamento para caber na coluna */
.tnm-checkout-payment-column #payment {
    background: transparent !important;
    border-radius: 0 !important;
}

/* ==========================================================================
   Payment Methods Tabs (Option 1: Classic Tabs)
   ========================================================================== */

/* Reset da Lista */
.tnm-checkout-payment-column ul.payment_methods {
    border-bottom: none !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    display: flex;
    flex-wrap: wrap;
    /* Espaço entre as abas */
}

/* O "Pulo do Gato": Flatten na estrutura LI para podermos ordenar os filhos */
.tnm-checkout-payment-column ul.payment_methods li.wc_payment_method {
    display: contents;
}

/* 1. Esconder o Radio Button Original */
.tnm-checkout-payment-column ul.payment_methods li.wc_payment_method>input[type=radio] {
    display: none;
}

/* 2. Estilizar os Labels como Abas (Order 1 = Topo) */
.tnm-checkout-payment-column ul.payment_methods li.wc_payment_method>label {
    order: 1;
    display: block;
    cursor: pointer;
    padding: 12px 24px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: #6c757d;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 0;
    transition: all 0.2s ease;
    flex-grow: 1;
    text-align: center;
    position: relative;
    top: 1px;
    /* Sobrepor borda do container */
    z-index: 1;
}

/* Hover na aba */
.tnm-checkout-payment-column ul.payment_methods li.wc_payment_method>label:hover {
    background: #e9ecef;
    color: #495057;
}

/* Estado Ativo (Checked) */
.tnm-checkout-payment-column ul.payment_methods li.wc_payment_method>input[type=radio]:checked+label {
    background: #ffa500;
    color: #000000;
    border-color: #dcd7e2;
    border-bottom-color: #fff;
    /* Conecta com o conteúdo */
    z-index: 3;
    font-weight: 700;
}

/* 3. Estilizar a Caixa de Conteúdo (Order 2 = Fundo/Largura Total) */
.tnm-checkout-payment-column ul.payment_methods li.wc_payment_method>.payment_box {
    order: 2;
    width: 100%;
    background: #fff;
    border: 1px solid #dde1e5;
    border-radius: 0 0 8px 8px;
    /* Arredonda só embaixo */
    padding: 24px;
    margin-top: 0;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.woocommerce-checkout #payment div.payment_box {
    margin: 0;
    padding: 20px 30px 0 30px;
}

/* Correções específicas para o plugin Vindi e campos internos */
.tnm-checkout-payment-column .payment_box fieldset {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.vindi_cc_card-container {
    position: relative;
    margin: 0 auto;
}

/* Se quiser esconder o triângulo padrão do WooCommerce */
.tnm-checkout-payment-column ul.payment_methods li.wc_payment_method>.payment_box::before {
    display: none !important;
}

/* Coluna Direita: Resumo e Ação (Sticky) */
.tnm-checkout-summary-column {
    /* No sticky container if we want them to feel connected, but preserving sticky behavior is usually desired. 
       If "no gap" implies they look like one block, we should handle border-radius. */
}

/* Wrapper interno do resumo para sticky */
.tnm-summary-box {
    background: #f8f9fa;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 30px;
    height: 100%;
    /* Match height visual if content differs */
    position: sticky;
    top: 20px;
}

@media (max-width: 992px) {
    .tnm-summary-box {
        border-radius: 12px;
        padding: 24px;
        position: static;
    }
}

.tnm-summary-box__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 24px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

/* --- Novo Estilo: Card Verde (Solicitado pelo User) --- */

.tnm-summary-item {
    background: #0e5944;
    /* Cor da Logo BG */
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: none;
    box-shadow: 0 4px 15px rgba(14, 89, 68, 0.15);
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    gap: 0;
    /* Gaps controlados internamente */
}

/* Divisor Vertical */
.tnm-summary-item::after {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 50%;
    width: 1px;
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-50%);
}

.tnm-summary-item__header {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    /* Alinhado à esquerda */
    margin-bottom: 0;
    padding-right: 20px;
    /* Espaço até o divisor */
}

.tnm-product-name {
    font-size: 16px;
    font-weight: 700;
    color: #ccff00;
    /* Cor viva (Amarelo/Verde Neon) */
    line-height: 1.3;
    text-transform: none;
    /* Manter case original "Mensalidade para toda a família*" */
    margin: 0;
}

.tnm-summary-price-row {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    /* Alinhado à esquerda na direita */
    padding-left: 20px;
    /* Espaço do divisor */
}

.tnm-price-label {
    font-size: 13px;
    color: #fff;
    opacity: 0.9;
    margin-bottom: 4px;
    font-weight: 500;
}

.tnm-summary-item__price {
    font-size: 28px;
    /* Grande destaque */
    font-weight: 800;
    color: #ccff00;
    /* Mesma cor viva */
    line-height: 1;
}

/* Responsividade do Card */
@media (max-width: 480px) {
    .tnm-summary-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 20px;
    }

    .tnm-summary-item::after {
        display: none;
        /* Remove divisor vertical no mobile */
    }

    .tnm-summary-item__header {
        align-items: center;
        padding-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        padding-bottom: 15px;
        width: 100%;
    }

    .tnm-summary-price-row {
        align-items: center;
        padding-left: 0;
        width: 100%;
    }
}


/* --- Cupom Inline --- */
/* --- Cupom Inline (Compacto) --- */
.tnm-coupon-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 8px 12px;
    border-radius: 8px;
}

.tnm-coupon-label {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

.checkout_coupon_box {
    display: flex !important;
    flex: 1;
    gap: 0;
    /* Unificado */
    margin-top: 0;
}

.checkout_coupon_box .input-text {
    flex: 1;
    margin: 0 !important;
    padding: 8px 12px !important;
    height: 36px;
    /* Mais baixo */
    font-size: 13px;
    border: 1px solid #d1d5db;
    border-right: none;
    /* Grudar no botão */
    border-radius: 6px 0 0 6px;
    background: #f9fafb;
}

.checkout_coupon_box .input-text:focus {
    z-index: 2;
    position: relative;
}

.checkout_coupon_box .button {
    width: auto !important;
    padding: 0 16px !important;
    height: 36px;
    display: flex;
    align-items: center;
    background: #0e5944;
    /* Verde da Marca */
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    border: 1px solid #0e5944;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
}

.checkout_coupon_box .button:hover {
    background: #0b4534;
    border-color: #0b4534;
}

/* Responsividade Cupom */
@media (max-width: 400px) {
    .tnm-coupon-section {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
    }

    .checkout_coupon_box {
        width: 100%;
        margin-top: 8px;
    }
}


/* --- Bloco de Total Melhorado --- */
/* --- Bloco de Total (Clean Brand Style) --- */
.tnm-summary-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Alinhar à direita */
    background: #f9fafb;
    /* Cinza super leve */
    padding: 24px;
    border-radius: 0 0 12px 12px;
    /* Arredondado só embaixo */
    margin-top: 24px;
    /* Colado no último item se quiser, ou separado */
    border-top: 2px solid #ccff00;
    /* Linha Neon da marca */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.tnm-total-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
    font-weight: 600;
}

.tnm-total-value {
    font-size: 42px;
    /* Bem grande */
    font-weight: 800;
    color: #0e5944;
    /* Verde da Marca */
    line-height: 1;
    letter-spacing: -1px;
}

/* --- Botões e Ações --- */
.tnm-actions {
    margin-top: 24px;
}

/* --- Texto Legal com Espaçamento --- */
.tnm-legal-text {
    margin-top: 32px;
    /* Mais espaço do botão */
    font-size: 12px;
    line-height: 1.5;
    color: #999;
    text-align: center;
}

.tnm-legal-text a {
    color: #999;
    text-decoration: underline;
}

.tnm-security-badge {
    margin-top: 15px;
    padding: 10px;
    color: #28a745;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ==========================================================================
   Mensagens de Feedback
   ========================================================================== */

.tnm-messages {
    margin: 20px 0;
}

.woocommerce-error,
.woocommerce-message {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.woocommerce-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
    padding: 15px 18px 14px 42px;
}

.woocommerce-error::before {
    left: 15px;
}

.woocommerce-message {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

/* Fix para remover ícone padrão do Woo nas nossas mensagens customizadas (.tnm-notice) */
.tnm-notice::before,
.tnm-notice.woocommerce-error::before,
.tnm-notice.woocommerce-message::before,
.tnm-notice.woocommerce-info::before {
    display: none !important;
    content: none !important;
}

.tnm-notice {
    padding: 14px 18px !important;
    /* Remove recuo do ícone padrão */
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Centralizar emoji se houver */
.tnm-notice img.emoji {
    margin: 0 !important;
    vertical-align: middle !important;
}

/* ==========================================================================
   Responsividade
   ========================================================================== */

@media (max-width: 576px) {
    .tnm-step {
        padding: 20px 16px;
    }

    .tnm-step__title {
        font-size: 20px;
    }

    .tnm-form__actions {
        flex-direction: column-reverse;
    }

    .tnm-btn {
        width: 100%;
    }
}

/* ==========================================================================
   Order Received (Thank You Page) Cleanup
   ========================================================================== */

/* Remove link behavior from Subscription ID */
.woocommerce-orders-table__cell-subscription-id a {
    pointer-events: none;
    text-decoration: none;
    color: inherit;
    cursor: default;
}

/* Ensure meta is hidden locally if filter misses (redundancy) */
.wc-item-meta {
    display: none !important;
}

/* ==========================================================================
   Order Received (Thank You Page) Update
   ========================================================================== */

/* 1. Main Container Scope */
.woocommerce-order {
    max-width: 900px;
    margin: 40px auto;
    font-family: 'DM Sans', sans-serif;
}

/* 2. Success Message */
.woocommerce-notice--success {
    background-color: #d4edda;
    color: #155724;
    padding: 20px 25px;
    border-radius: 8px;
    border-left: 5px solid #28a745;
    margin-bottom: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.woocommerce-notice--success::before {
    content: "✅";
    font-size: 1.4em;
}

/* 3. Order Overview (Number, Date, Total) */
ul.woocommerce-order-overview {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    list-style: none;
    padding: 25px;
    margin: 0 0 40px 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

ul.woocommerce-order-overview li {
    flex: 1 1 150px;
    padding: 10px;
    border-right: 1px solid #f0f0f0;
    margin-bottom: 0;
    text-align: center;
    color: #666;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

ul.woocommerce-order-overview li:last-child {
    border-right: none;
}

ul.woocommerce-order-overview li strong {
    display: block;
    font-size: 1.4em;
    /* Bigger numbers */
    color: #222;
    margin-top: 8px;
    font-weight: 700;
    text-transform: none;
}

/* 4. Content Cards (Bank Details, Order Details, Customer Details) */
.woocommerce-bacs-bank-details,
.woocommerce-order-details,
.woocommerce-customer-details {
    background: #fff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
}

.woocommerce-order-details__title,
.woocommerce-column__title,
.woocommerce-bacs-bank-details h2,
header h2 {
    font-size: 1.5em;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    color: #222;
    font-weight: 700;
}

/* 5. Order Tables */
table.woocommerce-table--order-details,
table.woocommerce-table--customer-details,
table.woocommerce-orders-table--subscriptions {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

table.woocommerce-table--order-details th,
table.woocommerce-table--order-details td,
table.woocommerce-orders-table--subscriptions th,
table.woocommerce-orders-table--subscriptions td {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    color: #555;
}

table.woocommerce-table--order-details th,
table.woocommerce-orders-table--subscriptions th {
    font-weight: 600;
    color: #444;
    background-color: #fafafa;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

/* Total Row Highlight */
table.woocommerce-table--order-details tfoot tr:last-child th,
table.woocommerce-table--order-details tfoot tr:last-child td {
    font-size: 1.2em;
    font-weight: 800;
    color: #000;
    background-color: #fff;
    border-top: 2px solid #eee;
}

/* 6. Address Box */
.woocommerce-customer-details address {
    font-style: normal;
    line-height: 1.8;
    color: #555;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    background: #fafafa;
}

/* 7. PIX Section Specifics */
.woocommerce-bacs-bank-details p {
    font-size: 1.1em;
    color: #444;
    margin-bottom: 20px;
}

/* ==========================================================================
   My Account Journey Navigation (Horizontal Steps)
   ========================================================================== */

/* 1. Layout (Sidebar + Content Side-by-Side) */
.woocommerce-account .woocommerce {
    display: flex;
    flex-direction: row;
    /* Default: Side by Side */
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1100px;
    margin: 40px auto;
    font-family: 'DM Sans', sans-serif;
    align-items: flex-start;
    /* Important for sticky sidebar */
}

/* 2. Navigation Container (Scrollable Row) */
/* 2. Navigation Container (Sidebar Style) */
body .woocommerce-MyAccount-navigation {
    flex: 0 0 280px !important;
    width: 280px !important;
    margin-bottom: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    float: none !important;
    position: sticky !important;
    top: 20px !important;
    height: fit-content !important;
}

body .woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    /* Stack vertically */
    gap: 10px !important;
    overflow: visible !important;
    /* No scroll on desktop */
}

/* Hide Scrollbar but keep functionality */
.woocommerce-MyAccount-navigation ul::-webkit-scrollbar {
    height: 6px;
    background-color: #f5f5f5;
    border-radius: 3px;
}

.woocommerce-MyAccount-navigation ul::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 3px;
}

/* 3. Step Items (Sidebar Links) */
body .woocommerce-MyAccount-navigation ul li {
    flex: 0 0 auto !important;
    margin: 0 !important;
    border: none !important;
    width: 100% !important;
}

/* ==========================================================================
   Upsell Banner (Step 2/3)
   ========================================================================== */
.tnm-upsell-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #fff8e1;
    /* Amarelo bem claro */
    border: 1px solid #ffecb3;
    border-left: 4px solid #ffc107;
    /* Amarelo destaque */
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease;
}

.tnm-upsell-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.tnm-upsell-icon {
    font-size: 24px;
}

.tnm-upsell-text strong {
    display: block;
    color: #856404;
    font-size: 14px;
    margin-bottom: 4px;
}

.tnm-upsell-text p {
    margin: 0;
    color: #664d03;
    font-size: 13px;
    line-height: 1.4;
}

.tnm-btn--upsell {
    background: #0e5944;
    /* Verde da marca */
    color: #fff;
    font-size: 13px;
    padding: 8px 16px;
    height: auto;
    white-space: nowrap;
}

.tnm-btn--upsell:hover {
    background: #0b4534;
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .tnm-upsell-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .tnm-btn--upsell {
        width: 100%;
        margin-top: 8px;
    }
}

/* ==========================================================================
   Payment Form Adjustments
   ========================================================================== */
/* Hide Vindi Installments (Always 1x) */
#vindi_cc_installments_field,
p.form-row.vindi_cc_installments_field,
label[for="vindi_cc_installments"],
select[name="vindi_cc_installments"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Fallback for wrapper without ID */
p.form-row:has(select[name="vindi_cc_installments"]) {
    display: none !important;
}

/* ==========================================================================
   Step 4 Payment Header Refinement (Compact)
   ========================================================================== */
.tnm-step--4 .tnm-step__header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 0 15px;
}

.tnm-step--4 .tnm-step__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f5e9;
    /* Light green background */
    color: #2e7d32;
    /* Dark green text */
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.tnm-step--4 .tnm-step__badge .emoji {
    width: 14px;
    height: 14px;
    margin: 0;
}

.tnm-step--4 .tnm-step__title {
    font-size: 20px;
    /* Reduced from default */
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    margin-top: 0;
    padding-top: 30px;
    /* Added spacing after badge removal */
    line-height: 1.3;
}

.tnm-step--4 .tnm-step__subtitle {
    font-size: 14px;
    /* Reduced from default */
    color: #666;
    margin: 0;
    font-weight: 400;
}

/* ==========================================================================
   Disable Header Links on Checkout (Distraction Free)
   ========================================================================== */
.woocommerce-checkout header.elementor-element a,
.woocommerce-checkout header.elementor-element .elementor-button {
    pointer-events: none !important;
    cursor: default !important;
    opacity: 1 !important;
    /* Keep original opacity */
}

/* ==========================================================================
   Payment Form Adjustments
   ========================================================================== */
/* Hide Vindi Installments (Always 1x) */
#vindi_cc_installments_field,
p.form-row.vindi_cc_installments_field,
label[for="vindi_cc_installments"],
select[name="vindi_cc_installments"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Fallback for wrapper without ID */
p.form-row:has(select[name="vindi_cc_installments"]) {
    display: none !important;
}

/* ==========================================================================
   Step 4 Payment Header Refinement (Compact)
   ========================================================================== */
.tnm-step--4 .tnm-step__header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 30px;
    padding: 0 15px;
}

.tnm-step--4 .tnm-step__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f5e9;
    /* Light green background */
    color: #2e7d32;
    /* Dark green text */
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.tnm-step--4 .tnm-step__badge .emoji {
    width: 14px;
    height: 14px;
    margin: 0;
}



.tnm-step--4 .tnm-step__subtitle {
    font-size: 14px;
    /* Reduced from default */
    color: #666;
    margin: 0;
    font-weight: 400;
}

/* ==========================================================================
   Disable Header Links on Checkout (Distraction Free)
   ========================================================================== */
.woocommerce-checkout header.elementor-element a,
.woocommerce-checkout header.elementor-element .elementor-button {
    pointer-events: none !important;
    cursor: default !important;
    opacity: 1 !important;
    /* Keep original opacity */
}

/* ==========================================================================
   Elementor Header Alignment Fix - Force Center
   ========================================================================== */

/* Fix for container alignment */
.woocommerce-checkout .elementor-element.e-con {
    align-items: center !important;
    justify-content: center !important;
}

/* Fix for Image Widget */
.woocommerce-checkout .elementor-widget-image {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.woocommerce-checkout .elementor-widget-image img {
    margin: 0 auto !important;
    display: inline-block !important;
    /* or block with margin auto */
}

/* Fix for Text Editor Widget */
.woocommerce-checkout .elementor-widget-text-editor {
    text-align: center !important;
    justify-content: center !important;
    display: flex !important;
}

/* Fix for Social Icons Widget */
.woocommerce-checkout .elementor-widget-social-icons {
    text-align: center !important;
}

.woocommerce-checkout .elementor-social-icons-wrapper {
    justify-content: center !important;
    display: flex !important;
}

/* Specific Targets based on User HTML */
.woocommerce-checkout .elementor-element-ae835cb {
    align-items: center !important;
}

.woocommerce-checkout .elementor-element-6456589,
.woocommerce-checkout .elementor-element-63ec515,
.woocommerce-checkout .elementor-element-fb79c5f {
    align-self: center !important;
}

body .woocommerce-MyAccount-navigation ul li a {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 16px 20px !important;
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
    /* Slightly less rounded than pills */
    color: #555 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
}

/* Hover State */
body .woocommerce-MyAccount-navigation ul li a:hover {
    background-color: #f9f9f9 !important;
    border-color: #ccc !important;
    transform: translateX(4px) !important;
    /* Slide right effect */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05) !important;
    color: #4CAF50 !important;
    padding-left: 20px !important;
}

/* Active State (Green Sidebar Item) */
body .woocommerce-MyAccount-navigation ul li.is-active a {
    background: #4CAF50 !important;
    /* Green Theme */
    color: #fff !important;
    border-color: #4CAF50 !important;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3) !important;
    font-weight: 600 !important;
    transform: translateX(4px) !important;
    padding-left: 20px !important;
}

/* Hover State */
.woocommerce-MyAccount-navigation ul li a:hover {
    background-color: #f9f9f9;
    border-color: #ccc;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    color: #4CAF50;
    /* Green highlight */
    padding-left: 20px;
    /* Reset slide effect from previous style */
}

/* Active State (Checkout Active Step Look) */
.woocommerce-MyAccount-navigation ul li.is-active a {
    background: #4CAF50;
    /* Green Theme */
    color: #fff;
    border-color: #4CAF50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    font-weight: 600;
    padding-left: 20px;
    /* Reset border padding offset */
}

/* Add Icons via CSS Content (Optional enhancement) */
.woocommerce-MyAccount-navigation-link--dashboard a::before {
    content: "🏠";
}

.woocommerce-MyAccount-navigation-link--orders a::before {
    content: "📦";
}

.woocommerce-MyAccount-navigation-link--subscriptions a::before {
    content: "🔄";
}

.woocommerce-MyAccount-navigation-link--downloads a::before {
    content: "⬇️";
}

.woocommerce-MyAccount-navigation-link--edit-address a::before {
    content: "📍";
}

.woocommerce-MyAccount-navigation-link--edit-account a::before {
    content: "👤";
}

.woocommerce-MyAccount-navigation-link--customer-logout a::before {
    content: "🚪";
}

/* 4. Content Area adjustment */
.woocommerce-MyAccount-content {
    flex: 1;
    min-width: 0;
    /* Prevent flex item from overflowing */
    background: #fff;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

/* Ensure tables don't break layout */
.woocommerce-MyAccount-content table.shop_table,
.woocommerce-MyAccount-content table.my_account_orders {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 20px;
    display: block;
    /* Fallback for very narrow screens */
    overflow-x: auto;
    /* Scroll horizontally */
    white-space: nowrap;
}

@media (min-width: 769px) {

    .woocommerce-MyAccount-content table.shop_table,
    .woocommerce-MyAccount-content table.my_account_orders {
        display: table;
        /* Reset to table on desktop */
        white-space: normal;
        overflow-x: visible;
    }
}

/* 6. My Account Specifics (Text & Buttons) */
.woocommerce-MyAccount-content p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.woocommerce-MyAccount-content mark {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

/* Subscription & Order Action Buttons */
.woocommerce-MyAccount-content .button {
    background-color: #4CAF50 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    transition: all 0.2s ease !important;
}

.woocommerce-MyAccount-content .button:hover {
    background-color: #43A047 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.woocommerce-MyAccount-content .button.view {
    background-color: #f0f0f0 !important;
    color: #333 !important;
}

.woocommerce-MyAccount-content .button.view:hover {
    background-color: #e0e0e0 !important;
}

/* ==========================================================================
   Mobile Responsiveness
   ========================================================================== */
@media (max-width: 768px) {

    /* Order Received Overview */
    ul.woocommerce-order-overview {
        flex-direction: column;
        text-align: left;
    }

    ul.woocommerce-order-overview li {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 15px 0;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    ul.woocommerce-order-overview li:last-child {
        border-bottom: none;
    }

    ul.woocommerce-order-overview li strong {
        margin-top: 0;
    }

    .woocommerce-order-details,
    .woocommerce-customer-details,
    .woocommerce-bacs-bank-details {
        padding: 20px;
    }

    /* My Account Mobile Stack */
    .woocommerce-account .woocommerce {
        flex-direction: column;
        gap: 20px;
    }

    .woocommerce-MyAccount-navigation {
        flex: auto !important;
        width: 100% !important;
        margin-bottom: 20px !important;
        position: static !important;
        /* Unstick on mobile */
    }

    /* Restore Horizontal Scroll on Mobile */
    body .woocommerce-MyAccount-navigation ul {
        flex-direction: row !important;
        overflow-x: auto !important;
        padding-bottom: 15px !important;
        gap: 10px !important;
    }

    body .woocommerce-MyAccount-navigation ul li {
        width: auto !important;
        flex: 0 0 auto !important;
    }

    body .woocommerce-MyAccount-navigation ul li a {
        border-radius: 50px !important;
        /* Back to pills */
        padding: 10px 16px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
    }


    .u-columns.woocommerce-Addresses {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   PIX Address Block (Campos de endereço inline para PIX)
   ========================================================================== */

#tnm-pix-address-block {
    margin: 0;
    padding: 30px;
    background: #fff;
    animation: tnm-pix-fadein 0.3s ease;
}

@keyframes tnm-pix-fadein {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tnm-pix-address-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tnm-pix-address-icon {
    font-size: 22px;
    line-height: 1;
}

.tnm-pix-address-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}

.tnm-pix-address-desc {
    width: 100%;
    margin: 4px 0 0 0;
    font-size: 13px;
    color: #6c757d;
}

/* Fields */
.tnm-pix-address-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tnm-pix-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.tnm-pix-field label abbr.required {
    color: #dc3545;
    text-decoration: none;
}

.tnm-pix-field .input-text {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
    box-sizing: border-box;
}

.tnm-pix-field .input-text:focus {
    outline: none;
    border-color: #4a6fa5;
    box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1);
}

.tnm-pix-field .input-text[readonly] {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

/* Row layout (2 colunas) */
.tnm-pix-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 480px) {
    .tnm-pix-field-row {
        grid-template-columns: 1fr;
    }
}

/* CEP wrapper com loader */
.tnm-pix-cep-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.tnm-pix-cep-wrapper .input-text {
    padding-right: 40px;
}

.tnm-pix-cep-loader {
    position: absolute;
    right: 12px;
    font-size: 16px;
    animation: tnm-spin 1s linear infinite;
}

/* --- Lista de Cupons (Modern Card Style) --- */
.tnm-coupons-applied {
    margin-top: 24px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.tnm-coupons-title {
    font-size: 13px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.tnm-coupon-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border-radius: 8px;
    border-left: 5px solid #0e5944;
    /* Verde Marca */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Sombra suave */
    margin-bottom: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tnm-coupon-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.tnm-coupon-info {
    display: flex;
    flex-direction: column;
}

.tnm-coupon-code {
    font-size: 15px;
    font-weight: 800;
    color: #333;
    text-transform: uppercase;
    line-height: 1.2;
}

.tnm-coupon-amount {
    font-size: 13px;
    color: #28a745;
    font-weight: 600;
    margin-top: 2px;
}

.tnm-remove-coupon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fee2e2;
    color: #dc2626;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.tnm-remove-coupon:hover {
    background: #fecaca;
    color: #b91c1c;
    opacity: 1;
    transform: scale(1.1);
}

@keyframes tnm-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* CEP field width */
.tnm-pix-field--cep {
    max-width: 200px;
}

/* Validation errors */
.tnm-pix-field-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
}

/* Alert message */
.tnm-pix-alert {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
    animation: tnm-pix-fadein 0.3s ease;
}

/* ==========================================================================
   FIXES & ADJUSTMENTS (USER REQUEST)
   ========================================================================== */

/* 1. Mobile Breakpoint Increase (max-width: 1024px instead of 768px/992px) */
@media (max-width: 1024px) {
    .tnm-checkout-header {
        margin: 80px auto 20px;
    }

    .tnm-checkout-wrapper {
        flex-direction: column;
    }

    .tnm-step-indicator {
        margin-bottom: 0;
    }

    .tnm-step-indicator__list {
        display: flex;
        flex-direction: row;
        gap: 15px;
        padding-bottom: 5px;
        white-space: nowrap;
    }

    .tnm-step-indicator__item {
        flex-shrink: 0;
        margin-bottom: 0;
        padding: 10px 15px;
    }

    .tnm-step-indicator__title {
        display: none;
    }


    .tnm-checkout-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .tnm-checkout-payment-column {
        border-radius: 12px;
        padding: 24px;
    }

    .tnm-form__row--2cols {
        grid-template-columns: 1fr;
    }

    .tnm-checkout-wrapper--top .tnm-step-indicator__item {
        gap: 0px;
    }
}

@media (max-width: 767px) {
    .tnm-checkout-header {
        margin: 0px auto 20px;
    }

    .tnm-plans {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .tnm-plan-summary-box {
        text-align: center;
    }

    .tnm-plan-summary-box * {
        width: 100%;
    }

    .tnm-plans {
        grid-template-columns: 1fr;
    }

    /* Reduce excessive padding inside step areas to maximize screen usage */
    .tnm-step,
    .tnm-checkout-payment-column {
        padding: 15px !important;
    }

    .tnm-step__header {
        margin-bottom: 20px;
    }

    /* Enhance sensitivity / touch target sizes */
    .tnm-btn,
    .button,
    .tnm-btn--next,
    .tnm-btn--prev {
        min-height: 48px !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }

    input.input-text,
    select,
    .select2-selection__rendered {
        min-height: 48px !important;
        line-height: 48px !important;
    }

    .woocommerce-form__input-checkbox,
    input[type="radio"] {
        width: 20px !important;
        height: 20px !important;
        margin-top: 2px !important;
    }
}

@media (max-width: 425px) {
    .tnm-checkout-main-title {
        font-size: 1.5rem;
    }

    .tnm-checkout-subtitle {
        margin-bottom: 0;

    }

    .tnm-checkout-wrapper {
        margin-top: 0px;
    }

    .tnm-step--4 .tnm-step__title {
        font-size: 14px;
    }
}

@media (max-width: 375px) {
    .vindi_cc_card-container {
        height: 140px;
    }
}

@media (max-width: 355px) {
    .tnm-checkout-wrapper--top .tnm-step-indicator {
        padding: 0 0px 20px;
    }

    .vindi_cc_card-container {
        height: 125px;
    }

}

@media (max-width: 320px) {
    .vindi_cc_card-container {
        height: 100px;
    }

    .tnm-checkout-header {
        padding: 0 5px;
    }

    .tnm-checkout-wrapper {
        padding: 0 10px;
    }

    .tnm-step--1 .tnm-step__header .tnm-step__title {
        font-size: 18px;
    }

    .tnm-step__subtitle {
        font-size: 14px;
    }

    .tnm-plan__name {
        font-size: 20px;
    }

}

/* 2. Datepicker Fixes */
.ui-datepicker {
    width: 300px !important;
    /* Largura fixa razoável */
    max-width: 90vw;
    font-size: 14px !important;
}

.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
    width: 48% !important;
    display: inline-block !important;
    padding: 2px 5px !important;
    height: 30px !important;
    font-size: 13px !important;
    text-align: center;
}

.ui-datepicker-title {
    display: flex !important;
    justify-content: center;
    gap: 5px;
    line-height: 1.2 !important;
}

.ui-datepicker th {
    font-size: 11px !important;
    padding: 5px 0 !important;
}

.ui-datepicker td span,
.ui-datepicker td a {
    padding: 5px !important;
    text-align: center !important;
}

/* 3. Force Coupon Box Visibility (Fix for Step 4) */
/* Elementor sometimes hides this with JS or specific classes */
.e-coupon-box {
    display: block !important;
    margin-bottom: 20px;
}

/* ==========================================================================
   CHECKOUT HEADER & FOOTER CLEANUP (User Request)
   Using Elementor IDs provided - Scoped to Checkout Page
   ========================================================================== */

.woocommerce-checkout .elementor-element-64ad42f,
/* Menu */
.woocommerce-checkout .elementor-element-255d23c,
/* Botão */
.woocommerce-checkout .elementor-element-63ec515,
/* Slogan */
.woocommerce-checkout .elementor-element-fb79c5f,
/* Social Icons */
.woocommerce-checkout .elementor-element-afa4686,
/* Links Col 1 */
.woocommerce-checkout .elementor-element-f125d98,
/* Links Col 2 */
.woocommerce-checkout .elementor-element-508f861 {
    /* Support Info */
    display: none !important;
}

/* Center Header Logo & Fix Size */
.woocommerce-checkout .elementor-element-a7b07c0 {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin: 0 auto !important;
    padding: 20px 0 !important;
    /* Respiro */
}

.woocommerce-checkout .elementor-element-a7b07c0 a {
    display: flex !important;
    justify-content: center !important;
}

.woocommerce-checkout .elementor-element-a7b07c0 img {
    width: auto !important;
    max-width: 140px !important;
    /* Reduzido conforme pedido, era 180px */
    height: auto !important;
}


/* ==========================================================================
   Upsell Banner (Step 2/3)
   ========================================================================== */
.tnm-upsell-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #fff8e1;
    /* Amarelo bem claro */
    border: 1px solid #ffecb3;
    border-left: 4px solid #ffc107;
    /* Amarelo destaque */
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.5s ease;
}

.tnm-upsell-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.tnm-upsell-icon {
    font-size: 24px;
}

.tnm-upsell-text strong {
    display: block;
    color: #856404;
    font-size: 14px;
    margin-bottom: 4px;
}

.tnm-upsell-text p {
    margin: 0;
    color: #664d03;
    font-size: 13px;
    line-height: 1.4;
}

.tnm-btn--upsell {
    background: #0e5944;
    /* Verde da marca */
    color: #fff;
    font-size: 13px;
    padding: 8px 16px;
    height: auto;
    white-space: nowrap;
}

.tnm-btn--upsell:hover {
    background: #0b4534;
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .tnm-upsell-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .tnm-btn--upsell {
        width: 100%;
        margin-top: 8px;
    }
}

/* ==========================================================================
   Fixes gerais do Checkout (migrado do Elementor)
   ========================================================================== */

/* Previne scroll horizontal no checkout */
.woocommerce-checkout {
    overflow-x: hidden;
}

/* Ocultar campos adicionais de endereço desnecessários */
.woocommerce-additional-fields:has(#shipping_postcode_field):not(:has(.form-row:not(#shipping_postcode_field))) {
    display: none !important;
}

/* Select2 / SelectWoo — fixes de layout */
.select2-container,
.select2-container * {
    box-sizing: border-box;
}

.select2-dropdown {
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

.select2-results,
.select2-results__options {
    overflow-x: hidden !important;
}

/* Campos de select com fundo branco */
#billing_persontype,
#billing_state,
#shipping_state,
select.state_select {
    background: #ffffff !important;
}

.select2-container--default .select2-selection--single {
    background: #ffffff !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 12px;
    padding-right: 32px;
}

#billing_persontype_field .woocommerce-input-wrapper,
#billing_state_field .woocommerce-input-wrapper,
#shipping_state_field .woocommerce-input-wrapper {
    width: 100%;
}

/* ============================================================
   TNM Payment Overlay — Loading durante processamento
   ============================================================ */
#tnm-payment-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 30, 20, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tnm-payment-overlay__box {
    background: #fff;
    border-radius: 16px;
    padding: 40px 48px;
    text-align: center;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    animation: tnm-overlay-pop 0.25s ease;
}

@keyframes tnm-overlay-pop {
    from {
        transform: scale(0.92);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.tnm-payment-overlay__spinner {
    width: 52px;
    height: 52px;
    margin: 0 auto 24px;
    border: 5px solid #e0ede8;
    border-top-color: #0e5944;
    border-radius: 50%;
    animation: tnm-overlay-spin 0.8s linear infinite;
}

@keyframes tnm-overlay-spin {
    to {
        transform: rotate(360deg);
    }
}

.tnm-payment-overlay__title {
    font-size: 18px;
    font-weight: 700;
    color: #0e5944;
    margin: 0 0 8px;
    line-height: 1.3;
}

.tnm-payment-overlay__subtitle {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}