﻿/* ── Checkout Step 1 ──────────────────────────────────────── */

.checkout-event-banner-wrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-card, #fff);
    border: 0.5px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.checkout-stepper-card {
    border-left: 0.5px solid var(--border) !important;
    padding-left: 1rem !important;
}

.checkout-event-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm, 8px);
    overflow: hidden;
    background: var(--bg, #f9fafb);
    border: 0.5px solid var(--border, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .checkout-event-logo img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

.checkout-event-info {
    flex: 1;
    min-width: 0;
}

.checkout-event-name {
    font-family: var(--font);
    font-size: .95rem;
    font-weight: 700;
    color: var(--text, #1a1a2e);
    margin: 0 0 .2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-event-meta {
    font-size: .78rem;
    color: var(--text-muted, #6b7280);
    font-family: var(--font);
    line-height: 1.5;
}

.checkout-lote-tag {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: rgba(192, 23, 42, .07);
    border: 1px solid rgba(192, 23, 42, .2);
    border-radius: 20px;
    padding: .2rem .65rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--primary, #c0172a);
    font-family: var(--font);
    white-space: nowrap;
    margin-top: .35rem;
    width: fit-content;
}

/* ── CPF input area ── */
.cpf-search-row {
    display: flex;
    gap: .5rem;
    align-items: flex-end;
}

    .cpf-search-row .cpf-input-wrap {
        flex: 1;
    }

.btn-buscar-cpf {
    height: 42px;
    padding: 0 1.25rem;
    background: var(--primary, #c0172a);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm, 8px);
    font-family: var(--font);
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: filter .15s;
    white-space: nowrap;
    flex-shrink: 0;
}

    .btn-buscar-cpf:hover {
        filter: brightness(1.1);
    }

    .btn-buscar-cpf:active {
        filter: brightness(.95);
    }

    .btn-buscar-cpf:disabled {
        opacity: .6;
        cursor: not-allowed;
    }

/* ── Resultado: usuário encontrado ── */
.checkout-user-found {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: .875rem 1rem;
    background: var(--bg, #f9fafb);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--radius-sm, 8px);
    margin-top: 1rem;
    animation: fadeSlideIn .2s ease;
}

.checkout-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary, #c0172a);
    color: #fff;
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}

.checkout-user-name {
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 700;
    color: var(--text, #1a1a2e);
    margin: 0 0 .15rem;
}

.checkout-user-email {
    font-size: .78rem;
    color: var(--text-muted, #6b7280);
    font-family: var(--font);
    margin: 0;
    word-break: break-all;
}

/* badge "já inscrito" */
.badge-ja-inscrito {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
    padding: .2rem .6rem;
    font-family: var(--font);
    margin-top: .35rem;
    width: fit-content;
}

/* ── Senha ── */
.checkout-senha-block {
    margin-top: .875rem;
    padding: .875rem 1rem;
    background: var(--bg, #f9fafb);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--radius-sm, 8px);
    animation: fadeSlideIn .2s ease;
}

.checkout-senha-title {
    font-family: var(--font);
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-muted, #6b7280);
    margin-bottom: .5rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.checkout-senha-row {
    display: flex;
    gap: .5rem;
    align-items: flex-end;
}

    .checkout-senha-row .input-wrap {
        flex: 1;
    }

.link-esqueci {
    font-size: .78rem;
    color: var(--primary, #c0172a);
    font-family: var(--font);
    text-decoration: none;
    display: block;
    margin-top: .4rem;
    width: fit-content;
}

    .link-esqueci:hover {
        text-decoration: underline;
    }

/* ── Novo usuário ── */
.checkout-novo-usuario {
    margin-top: 1rem;
    animation: fadeSlideIn .2s ease;
}

.checkout-novo-aviso {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .65rem .875rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-sm, 8px);
    margin-bottom: 1rem;
    font-size: .8rem;
    color: #1e40af;
    font-family: var(--font);
}

    .checkout-novo-aviso i {
        margin-top: .1rem;
        flex-shrink: 0;
    }

.checkout-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-bottom: .75rem;
}

@media (max-width: 576px) {
    .checkout-fields-row {
        grid-template-columns: 1fr;
    }

    .cpf-search-row {
        flex-wrap: wrap;
    }

    .btn-buscar-cpf {
        width: 100%;
        justify-content: center;
    }

    .checkout-event-name {
        white-space: normal;
    }
}

.checkout-field-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted, #6b7280);
    font-family: var(--font);
    margin-bottom: .3rem;
    display: block;
}

/* ── Spinner inline ── */
.cpf-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(192,23,42,.2);
    border-top-color: var(--primary, #c0172a);
    border-radius: 50%;
    animation: spin .65s linear infinite;
    flex-shrink: 0;
}

/* ── Feedback de erro CPF ── */
.cpf-feedback {
    font-size: .78rem;
    color: #dc2626;
    font-family: var(--font);
    margin-top: .35rem;
    display: none;
}

/* ── Botão continuar ── */
.checkout-step-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border, #e5e7eb);
}

.btn-checkout-continuar {
    padding: .6rem 1.75rem;
    background: var(--primary, #c0172a);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm, 8px);
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: filter .15s;
}

    .btn-checkout-continuar:hover {
        filter: brightness(1.1);
    }

    .btn-checkout-continuar:disabled {
        opacity: .55;
        cursor: not-allowed;
    }

/* ── Animação ── */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.step-item svg {
    display: none;
}

.step-item.complete svg {
    display: block;
}

@media (max-width: 768px) {
    .checkout-event-banner-wrap {
        grid-template-columns: auto 1fr;
    }

    .checkout-stepper-card {
        grid-column: 1 / -1;
        border-left: none !important;
        border-top: 0.5px solid var(--border) !important;
        padding-left: 0 !important;
        padding-top: 1rem !important;
    }
}