/* Phone codes: "Verify by text or WhatsApp" (signed in), "Sign in with a code by text or WhatsApp"
   (login) and the "Add a phone so you can always sign in" card. Brand tokens only. */

.phone-page { padding: 6rem 1rem 4rem; min-height: 70vh; }
.phone-card {
    max-width: 460px;
    margin: 0 auto;
    background: var(--bg-secondary, #f8f9fa);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 1rem;
    padding: 2rem 1.75rem;
    color: var(--text-primary, #212529);
}
.phone-card h1, .phone-card h2 { font-size: 1.4rem; font-weight: 800; margin: 0 0 .5rem; }
.phone-card p { margin: 0 0 1.25rem; color: var(--text-secondary, #6c757d); line-height: 1.55; }

.phone-form { display: flex; flex-direction: column; gap: 1rem; margin: 0; }
.phone-form label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .35rem; }
.phone-form select,
.phone-form input[type="tel"],
.phone-form input[type="text"] {
    width: 100%;
    padding: .75rem 1rem;
    background: var(--input-bg, #fff);
    border: 1px solid var(--input-border, #ced4da);
    border-radius: .75rem;
    color: var(--text-primary, #212529);
    font-size: 1rem;
}
.phone-form .phone-code-input { letter-spacing: .35em; font-size: 1.35rem; text-align: center; font-weight: 700; }
.phone-hint { font-size: .8rem; color: var(--text-secondary, #6c757d); margin: .35rem 0 0; }

.phone-btn {
    width: 100%;
    padding: .9rem 1rem;
    background: var(--primary-color, #2ba8ff);
    border: 0;
    border-radius: .75rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}
.phone-btn:hover { background: var(--primary-hover, #1a97f0); }
.phone-link-btn {
    background: none;
    border: 0;
    padding: 0;
    color: var(--primary-color, #2ba8ff);
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
    text-decoration: underline;
}
.phone-inline-form { display: inline; margin: 0; }
.phone-links { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; justify-content: center; margin-top: 1.25rem; font-size: .9rem; }
.phone-links a { color: var(--primary-color, #2ba8ff); font-weight: 600; }
.phone-error { color: var(--error-color, #dc3545); font-size: .875rem; margin: 0; }
.phone-status { color: var(--success-color, #28a745); font-size: .9rem; font-weight: 600; margin: 0 0 1rem; }

/* "Can't get our email?" link under the verify-email card and in the email banners. */
.phone-alt-link { color: var(--primary-color, #2ba8ff); font-weight: 600; font-size: .9rem; }

/* Backup-phone card on the dashboard and the account page. */
.phone-backup-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    margin: 0 0 1rem;
    padding: .9rem 1.1rem;
    border-radius: 14px;
    background: color-mix(in srgb, var(--primary-color, #2ba8ff) 9%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color, #2ba8ff) 28%, transparent);
}
.phone-backup-copy { display: flex; flex-direction: column; gap: .15rem; min-width: 0; font-size: .95rem; line-height: 1.4; }
.phone-backup-copy span { color: var(--text-secondary, #6c757d); font-size: .875rem; }
.phone-backup-actions { display: flex; align-items: center; gap: 1rem; }
.phone-backup-add {
    padding: .55rem 1rem;
    border-radius: .6rem;
    background: var(--primary-color, #2ba8ff);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
}
.phone-backup-dismiss { background: none; border: 0; padding: 0; color: var(--text-secondary, #6c757d); font-size: .85rem; cursor: pointer; text-decoration: underline; }
.phone-backup-actions { flex-wrap: wrap; }
.phone-backup-link { color: var(--primary-color, #2ba8ff); font-weight: 600; font-size: .9rem; }

/* Site-wide "We can't reach your email" bar (layouts/app, signed in, email bouncing, no backup yet). */
.email-bounce-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .35rem 1rem;
    padding: .6rem 1rem;
    background: color-mix(in srgb, var(--warning-color, #ffc107) 18%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--warning-color, #ffc107) 40%, transparent);
    color: var(--text-primary, #212529);
    font-size: .9rem;
    text-align: center;
}
.email-bounce-bar a { color: var(--primary-color, #2ba8ff); font-weight: 700; }

/* "Still can't get in? Contact support" */
.phone-honeypot { position: absolute; left: -9999px; top: -9999px; opacity: 0; pointer-events: none; }
.locked-out-link { display: block; margin-top: 1rem; text-align: center; font-size: .9rem; }
button.phone-backup-add { border: 0; cursor: pointer; font-family: inherit; }
