/* ── Minha Conta (Convert) — Estado visitante ────────────────────────────── */

.cdaf-mcc-guest-wrap {
    width: 100%;
    font-family: inherit;
}

/* ── Tabs de navegação ───────────────────────────────────────────────────── */
.cdaf-mcc-guest-tabs {
    display: flex;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-bottom: none;
}

.cdaf-mcc-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
    background: #f9fafb;
    color: #6b7280;
    position: relative;
}

.cdaf-mcc-tab-btn + .cdaf-mcc-tab-btn {
    border-left: 1px solid #e5e7eb;
}

.cdaf-mcc-tab-btn:hover:not(.active) {
    background: #f3f4f6;
    color: #374151;
}

.cdaf-mcc-tab-btn.active {
    background: #fff;
    color: #111827;
    font-weight: 600;
}

/* Linha indicadora na tab ativa */
.cdaf-mcc-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--cdaf-mcc-tab-accent, #111827);
}

/* ── Painel único ────────────────────────────────────────────────────────── */
.cdaf-mcc-guest-panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

/* ── Panes (formulários) ─────────────────────────────────────────────────── */
.cdaf-mcc-tab-pane {
    display: none;
}

.cdaf-mcc-tab-pane.active {
    display: block;
    animation: cdaf-fade-in .2s ease;
}

@keyframes cdaf-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Body do formulário ──────────────────────────────────────────────────── */
.cdaf-mcc-guest-panel-body {
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
}

/* ── Login com Google ────────────────────────────────────────────────────── */
.cdaf-mcc-google-btn-wrap {
    display: flex;
    justify-content: center;
    transition: opacity .2s ease;
}
.cdaf-mcc-google-btn-wrap > div { width: 100%; }

.cdaf-mcc-guest-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
    margin: 16px 0 14px;
}
.cdaf-mcc-guest-divider::before,
.cdaf-mcc-guest-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}
.cdaf-mcc-guest-divider span { padding: 0 10px; }

/* ── Ícones nos labels ───────────────────────────────────────────────────── */
.cdaf-mcc-field-icon {
    color: #9ca3af;
    flex-shrink: 0;
    margin-right: 2px;
}

/* ── Campos ──────────────────────────────────────────────────────────────── */
.cdaf-mcc-guest-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Espaço padrão entre campos (sobrescrito pelo controle Elementor) */
.cdaf-mcc-guest-field + .cdaf-mcc-guest-field    { margin-top: 14px; }
.cdaf-mcc-recaptcha-wrap                         { margin-top: 14px; }
.cdaf-mcc-guest-footer-row                       { margin-top: 14px; }
.cdaf-mcc-guest-privacy                          { margin-top: 14px; }
.cdaf-mcc-guest-panel-body button[type="submit"] { margin-top: 14px; }

.cdaf-mcc-guest-label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 3px;
}

.cdaf-mcc-guest-label .required { color: #ef4444; }

.cdaf-mcc-guest-input {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    font-family: inherit;
    appearance: none;
}

.cdaf-mcc-guest-input:focus {
    border-color: var(--cdaf-mcc-focus-color, #6b7280);
    box-shadow: 0 0 0 3px var(--cdaf-mcc-focus-shadow, rgba(107,114,128,.15));
}

.cdaf-mcc-guest-input.is-valid   { }

.cdaf-mcc-guest-input.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}

/* ── Força da senha ──────────────────────────────────────────────────────── */
.cdaf-mcc-pw-strength {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.cdaf-mcc-pw-strength-bar {
    flex: 1;
    height: 4px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.cdaf-mcc-pw-strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width .3s ease, background .3s ease;
}

.cdaf-mcc-pw-strength-label {
    font-size: 11px;
    font-weight: 500;
    min-width: 36px;
    transition: color .3s ease;
}

/* ── Badge de confirmação de senha ───────────────────────────────────────── */
.cdaf-mcc-pw2-wrap { position: relative; display: block; }
.cdaf-mcc-pw2-wrap .cdaf-mcc-guest-input { padding-right: 110px; }

.cdaf-mcc-pw-match-badge {
    position: absolute;
    right: 36px;
    top: 0;
    bottom: 0;
    margin: auto 0;
    height: fit-content;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    display: none;
    pointer-events: none;
    line-height: 1;
    align-items: center;
    gap: 3px;
    animation: cdaf-badge-pop .2s ease;
}

.cdaf-mcc-pw-match-badge.match   { display: inline-flex; background: #dcfce7; color: #15803d; }
.cdaf-mcc-pw-match-badge.no-match { display: inline-flex; background: #fee2e2; color: #b91c1c; }

/* ── Mensagem de campo obrigatório ───────────────────────────────────────── */
.cdaf-mcc-field-error {
    font-size: 11px;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.cdaf-mcc-field-error::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* ── Honeypot ────────────────────────────────────────────────────────────── */
.cdaf-mcc-hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
}

/* ── Input wrap (senha + CNPJ) ───────────────────────────────────────────── */
.cdaf-mcc-guest-input-wrap { position: relative; }
.cdaf-mcc-guest-input-wrap .cdaf-mcc-guest-input { padding-right: 36px; }

.cdaf-mcc-guest-pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #9ca3af;
    line-height: 0;
    transition: color .12s;
}
.cdaf-mcc-guest-pw-toggle:hover { color: #374151; }

/* ── CNPJ badge ──────────────────────────────────────────────────────────── */
.cdaf-mcc-cnpj-wrap { position: relative; }
.cdaf-mcc-cnpj-wrap .cdaf-mcc-guest-input { padding-right: 110px; }

.cdaf-mcc-cnpj-badge {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    display: none;
    pointer-events: none;
    line-height: 1.4;
    animation: cdaf-badge-pop .2s ease;
}

@keyframes cdaf-badge-pop {
    from { transform: translateY(-50%) scale(.8); opacity: 0; }
    to   { transform: translateY(-50%) scale(1);  opacity: 1; }
}

.cdaf-mcc-cnpj-badge.valid    { display: inline-flex; background: #dcfce7; color: #15803d; }
.cdaf-mcc-cnpj-badge.invalid  { display: inline-flex; background: #fee2e2; color: #b91c1c; }
.cdaf-mcc-cnpj-badge.checking { display: inline-flex; background: #f3f4f6; color: #6b7280; }

/* ── Hint CNPJ legado ────────────────────────────────────────────────────── */
.cdaf-mcc-cnpj-hint { font-size: 11px; display: flex; align-items: center; gap: 5px; min-height: 16px; transition: color .15s; }
.cdaf-mcc-cnpj-hint.checking { color: #9ca3af; }
.cdaf-mcc-cnpj-hint.valid    { color: #16a34a; }
.cdaf-mcc-cnpj-hint.invalid  { color: #ef4444; }

/* ── Lembrar-me + Perdeu a senha ─────────────────────────────────────────── */
.cdaf-mcc-guest-footer-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.cdaf-mcc-guest-remember {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}

.cdaf-mcc-guest-remember input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #111827;
    cursor: pointer;
    flex-shrink: 0;
}

.cdaf-mcc-guest-lost-pw { font-size: 12px; color: #6b7280; text-decoration: none; transition: color .12s; }
.cdaf-mcc-guest-lost-pw:hover { color: #111827; text-decoration: underline; }

/* ── reCAPTCHA ───────────────────────────────────────────────────────────── */
.cdaf-mcc-recaptcha-wrap { display: flex; justify-content: flex-start; background: transparent; }
.cdaf-mcc-recaptcha-wrap iframe,
.cdaf-mcc-recaptcha-wrap > div { border: none !important; box-shadow: none !important; background: transparent !important; }

/* ── Botão de submit ─────────────────────────────────────────────────────── */
.cdaf-mcc-guest-btn {
    width: 100%;
    padding: 11px 16px;
    background: #111827;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1;
}
.cdaf-mcc-guest-btn:hover:not(:disabled)  { opacity: .88; }
.cdaf-mcc-guest-btn:active:not(:disabled) { transform: scale(.99); }
.cdaf-mcc-guest-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── Mensagens ───────────────────────────────────────────────────────────── */
.cdaf-mcc-guest-msg { padding: 10px 14px; border-radius: 4px; font-size: 13px; display: none; line-height: 1.5; margin-bottom: 4px; }
.cdaf-mcc-guest-msg.is-error   { background: #fee2e2; color: #b91c1c; display: block; }
.cdaf-mcc-guest-msg.is-success { background: #dcfce7; color: #15803d; display: block; }
.cdaf-mcc-guest-msg--below { border-radius: 4px; margin-bottom: 0; }
.cdaf-mcc-guest-msg--below.is-error,
.cdaf-mcc-guest-msg--below.is-success { margin-top: 14px; }

/* ── Política de privacidade ─────────────────────────────────────────────── */
.cdaf-mcc-guest-privacy { font-size: 11px; color: #9ca3af; line-height: 1.5; }
.cdaf-mcc-guest-privacy a { color: #6b7280; text-decoration: underline; }
