/* =====================================================================
   Login biometrico (WebAuthn / Passkeys) - Portal do Cliente
   ---------------------------------------------------------------------
   1) Bottom-sheet de oferta pos-login ("Ativar Face ID?") - mobile.
   2) Botao "Entrar com Face ID" na tela de acesso.
   ===================================================================== */

/* ---------------- Bottom-sheet de oferta ---------------- */
.pcbio-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(15, 23, 42, 0);
    transition: background 0.28s ease;
}

.pcbio-sheet-backdrop.aberto {
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.pcbio-sheet {
    width: 100%;
    max-width: 480px;
    box-sizing: border-box;
    padding: 14px 22px calc(22px + env(safe-area-inset-bottom, 0px));
    border-radius: 26px 26px 0 0;
    background: #ffffff;
    box-shadow: 0 -18px 60px rgba(15, 23, 42, 0.30);
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.30s cubic-bezier(0.32, 0.72, 0.2, 1);
}

.pcbio-sheet-backdrop.aberto .pcbio-sheet {
    transform: translateY(0);
}

.pcbio-sheet-handle {
    width: 46px;
    height: 5px;
    margin: 0 auto 16px;
    border-radius: 999px;
    background: #cbd5e1;
}

.pcbio-sheet-icon {
    width: 72px;
    height: 72px;
    margin: 2px auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(var(--pc-primary-rgb, 120, 173, 54), 0.14), rgba(var(--pc-primary-rgb, 120, 173, 54), 0.05));
    color: var(--pc-primary, #78AD36);
}

.pcbio-sheet-icon svg {
    width: 40px;
    height: 40px;
}

.pcbio-sheet-icon.pcbio-ok {
    background: linear-gradient(135deg, var(--pc-primary, #78AD36), var(--pc-primary-dark, #4c7321));
    color: #fff;
    box-shadow: 0 14px 30px rgba(var(--pc-primary-rgb, 120, 173, 54), 0.35);
}

.pcbio-sheet-title {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.pcbio-sheet-text {
    margin: 0 0 18px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.pcbio-sheet-erro,
.pcbio-login-erro {
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 13px;
    line-height: 1.4;
}

.pcbio-sheet-nota {
    margin: 14px 0 0;
    color: #94a3b8;
    font-size: 12px;
}

/* ---------------- Botoes ---------------- */
.pcbio-btn {
    width: 100%;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 14px;
    font-size: 15.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.pcbio-btn:active {
    transform: scale(0.98);
}

.pcbio-btn:disabled {
    opacity: 0.65;
    cursor: default;
}

.pcbio-btn-ico {
    display: inline-flex;
}

.pcbio-btn-ico svg {
    width: 22px;
    height: 22px;
}

.pcbio-btn-primary {
    background: linear-gradient(135deg, var(--pc-primary, #78AD36), var(--pc-primary-dark, #4c7321));
    color: #fff;
    box-shadow: 0 12px 26px rgba(var(--pc-primary-rgb, 120, 173, 54), 0.35);
}

.pcbio-btn-ghost {
    margin-top: 10px;
    background: transparent;
    color: #64748b;
    font-weight: 600;
}

/* spinner de carregamento (substitui o icone) */
.pcbio-btn.carregando .pcbio-btn-ico svg {
    display: none;
}

.pcbio-btn.carregando .pcbio-btn-ico::after {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: pcbioGirar 0.7s linear infinite;
}

@keyframes pcbioGirar {
    to { transform: rotate(360deg); }
}

/* ---------------- Tela de login ---------------- */
.pcbio-login-sep {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: #94a3b8;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pcbio-login-sep::before,
.pcbio-login-sep::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.pcbio-btn-login {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}

.pcbio-btn-login .pcbio-btn-ico {
    color: var(--pc-primary, #78AD36);
}

.pcbio-btn-login.carregando .pcbio-btn-ico::after {
    border-color: rgba(15, 23, 42, 0.20);
    border-top-color: #0f172a;
}

.pcbio-login-erro {
    margin-top: 12px;
    text-align: center;
}

/* ---------------- Dark mode (portal logado) ---------------- */
body.dark-mode .pcbio-sheet,
[data-theme="dark"] .pcbio-sheet {
    background: #1e293b;
}

body.dark-mode .pcbio-sheet-title,
[data-theme="dark"] .pcbio-sheet-title {
    color: #f8fafc;
}

body.dark-mode .pcbio-sheet-text,
[data-theme="dark"] .pcbio-sheet-text {
    color: #94a3b8;
}

body.dark-mode .pcbio-sheet-handle,
[data-theme="dark"] .pcbio-sheet-handle {
    background: #475569;
}

body.dark-mode .pcbio-btn-ghost,
[data-theme="dark"] .pcbio-btn-ghost {
    color: #94a3b8;
}
