/* ── Reset scoped to our wrapper only (avoids breaking theme header/footer) ── */
.pfl-wrap *, .pfl-wrap *::before, .pfl-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Standalone page (wp-login.php) — body controls full-viewport centering ── */
.pfl-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
}

.pfl-body .pfl-wrap {
    padding: 16px;
}

/* ── Embedded in WP page (team login URL) — wrap provides vertical breathing room ── */
.pfl-wrap {
    width: 100%;
    padding: 32px 16px 40px;
    display: flex;
    justify-content: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
}

/* ── Card ──────────────────────────────────────────────────────────────── */

.pfl-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
}

.pfl-card--callback {
    text-align: center;
    padding: 48px 36px;
}

/* ── Brand ─────────────────────────────────────────────────────────────── */

.pfl-brand {
    margin-bottom: 28px;
    text-align: center;
}

.pfl-brand-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #1a1a1a;
}

/* ── Titles ─────────────────────────────────────────────────────────────── */

.pfl-card .pfl-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
    color: #1a1a1a;
    line-height: 1.3;
}

.pfl-card .pfl-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ── Fields ─────────────────────────────────────────────────────────────── */

.pfl-card .pfl-field {
    margin-bottom: 16px;
}

.pfl-card .pfl-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #444;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pfl-card .pfl-field input {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    outline: none;
    transition: border-color 0.15s;
    background: #fafafa !important;
    color: #1a1a1a !important;
    box-shadow: none !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    height: auto !important;
    line-height: normal !important;
}

.pfl-card .pfl-field input:focus {
    border-color: #555 !important;
    background: #fff !important;
    box-shadow: none !important;
    outline: none !important;
}

.pfl-card .pfl-field input::placeholder { color: #bbb; }

/* OTP input — larger, centered */
.pfl-card #pfl-otp {
    font-size: 22px !important;
    letter-spacing: 8px;
    text-align: center;
    font-weight: 600;
    padding: 14px !important;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.pfl-card .pfl-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600;
    cursor: pointer;
    border: none !important;
    transition: background 0.15s, opacity 0.15s;
    text-align: center;
    text-decoration: none !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    line-height: 1.4 !important;
    height: auto !important;
}

.pfl-card .pfl-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.pfl-card .pfl-btn--primary {
    background: #D90000 !important;
    color: #fff !important;
}

.pfl-card .pfl-btn--primary .pfl-btn-label,
.pfl-card .pfl-btn--primary span {
    color: #fff !important;
}

.pfl-card .pfl-btn--primary:not(:disabled):hover { background: #b80000 !important; }

.pfl-card .pfl-btn--google {
    background: #fff !important;
    color: #1a1a1a !important;
    border: 1.5px solid #ddd !important;
    font-weight: 500;
}

.pfl-card .pfl-btn--google:not(:disabled):hover { background: #f5f5f5 !important; }

.pfl-google-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */

.pfl-spinner,
.pfl-callback-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pfl-spin 0.7s linear infinite;
}

.pfl-callback-spinner {
    width: 32px;
    height: 32px;
    border-color: rgba(0,0,0,0.1);
    border-top-color: #1a1a1a;
    margin: 16px auto;
}

@keyframes pfl-spin { to { transform: rotate(360deg); } }

/* ── Divider ─────────────────────────────────────────────────────────────── */

.pfl-card .pfl-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #bbb;
    font-size: 13px;
}

.pfl-card .pfl-divider::before,
.pfl-card .pfl-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #eee;
}

/* ── Error ─────────────────────────────────────────────────────────────── */

.pfl-card .pfl-error {
    background: #fff5f5;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.pfl-card .pfl-error a { color: #dc2626; }

/* ── Back button ─────────────────────────────────────────────────────────── */

.pfl-card .pfl-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none !important;
    border: none !important;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    margin-bottom: 20px;
    transition: color 0.15s;
    box-shadow: none !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pfl-card .pfl-back-btn:hover { color: #1a1a1a !important; }

/* ── Resend ─────────────────────────────────────────────────────────────── */

.pfl-card .pfl-resend {
    text-align: center;
    margin-top: 16px;
}

.pfl-card .pfl-resend-btn {
    background: none !important;
    border: none !important;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
    box-shadow: none !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pfl-card .pfl-resend-btn:not(:disabled):hover { color: #1a1a1a !important; text-decoration: underline; }
.pfl-card .pfl-resend-btn:disabled { cursor: default; opacity: 0.6; }

/* ── Callback page ─────────────────────────────────────────────────────── */

.pfl-card .pfl-callback-message {
    font-size: 16px;
    color: #444;
    margin-bottom: 8px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 440px) {
    .pfl-card { padding: 32px 24px; }
    .pfl-wrap { padding: 20px 16px 32px; }
}
