/* =====================================================================
   auth.css  -  the small extras the account pages need:
   inline messages (instead of alert popups), toasts, hints.
   Uses the site colours (orange / navy). Loaded AFTER don.css / home.css.
   ===================================================================== */
.form-msg {
  margin: 0 0 16px; padding: 12px 14px; border-radius: 6px;
  font-size: 14px; line-height: 1.45; border: 1px solid transparent;
}
.form-msg[hidden] { display: none; }
.form-msg.error   { background: #fdecea; color: #8a1c13; border-color: #f5c2bd; }
.form-msg.success { background: #e8f6ee; color: #11602f; border-color: #b9e3c8; }
.form-msg.info    { background: #eaf1fb; color: #0b3a75; border-color: #bcd3f0; }

.field-hint { display: block; margin-top: 6px; font-size: 12px; color: #666; }
input[aria-invalid="true"] { border-color: #c62828 !important; outline-color: #c62828; }

.btn[disabled] { opacity: .65; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: #FF6600; font: inherit; cursor: pointer; text-decoration: underline; }
.link-btn[disabled] { color: #999; cursor: not-allowed; text-decoration: none; }

.code-input { letter-spacing: 6px; font-size: 20px; text-align: center; }

.auth-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.auth-toast { background: #0B1F3F; color: #fff; padding: 12px 16px; border-radius: 6px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.auth-toast.success { background: #11602f; }
.auth-toast.error   { background: #8a1c13; }

@media (max-width: 480px) { .form-msg { font-size: 13px; } .code-input { letter-spacing: 4px; } }

/* =====================================================================
   PHONE FIELD with country flag + code  (built by auth-ui.js: MmExAuth.phoneField)
   [ 🇳🇬 +234 ▾ | 801 234 5678 ]   The list opens under the field, with a search box.
   ===================================================================== */
.phone-field { position: relative; display: flex; align-items: stretch; border: 1px solid #ccc; border-radius: 6px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.phone-field:focus-within { border-color: #1A3A6B; box-shadow: 0 0 0 3px rgba(26,58,107,.12); }
.phone-field[aria-invalid="true"] { border-color: #c62828; }
/* the real text box inside: no border of its own (the wrapper draws it) */
.login-section .phone-field input.pf-input,
.signup-section .phone-field input.pf-input { border: 0; box-shadow: none; border-radius: 0 6px 6px 0; flex: 1; min-width: 0; background: transparent; }
.phone-field.is-smart:not(.is-phone) input.pf-input { border-radius: 6px; }

.cc-btn { display: flex; align-items: center; gap: 6px; padding: 0 10px 0 12px; background: #f7f7f9; border: 0; border-right: 1px solid #ddd; border-radius: 6px 0 0 6px; cursor: pointer; font: inherit; font-size: 14px; color: #333; white-space: nowrap; }
.cc-btn:hover { background: #efeff3; }
.cc-btn:focus-visible { outline: 2px solid #1A3A6B; outline-offset: -2px; }
.cc-flag { width: 24px; height: 18px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); display: block; }
.cc-flagwrap { display: inline-flex; min-width: 24px; }
.cc-caret { font-size: 11px; color: #777; }
/* Instagram-style single box: the country button only appears once the person starts typing a number */
.phone-field.is-smart:not(.is-phone) .cc-btn { display: none; }

.cc-menu { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; width: min(340px, 100%); background: #fff; border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 12px 32px rgba(0,0,0,.18); overflow: hidden; }
.cc-menu[hidden] { display: none; }
.login-section .cc-menu input.cc-search, .signup-section .cc-menu input.cc-search { border: 0; border-bottom: 1px solid #eee; border-radius: 0; padding: 12px 14px; }
.cc-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.cc-list li { display: flex; align-items: center; gap: 10px; padding: 9px 14px; cursor: pointer; font-size: 14px; color: #333; }
.cc-list li:hover, .cc-list li.active { background: #f1ecf8; }
.cc-list li[aria-selected="true"] { font-weight: 600; }
.cc-list .cc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-list .cc-d { color: #777; font-size: 13px; }
.cc-empty { padding: 14px; font-size: 13px; color: #777; }

/* ---------- Email | Phone switch (sign-up) ---------- */
.method-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #f1f1f4; border-radius: 8px; padding: 4px; margin-bottom: 16px; }
.method-tabs button { border: 0; background: transparent; padding: 10px; border-radius: 6px; font: inherit; font-size: 14px; font-weight: 600; color: #666; cursor: pointer; }
.method-tabs button[aria-selected="true"] { background: #fff; color: #0B1F3F; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.method-tabs button:focus-visible { outline: 2px solid #1A3A6B; }

/* ---------- username check ---------- */
.field-status { display: block; margin-top: 6px; font-size: 12px; min-height: 16px; }
.field-status.ok { color: #11602f; }
.field-status.no { color: #8a1c13; }
.field-status.wait { color: #666; }

/* ---------- Continue with Google ---------- */
.google-slot { display: flex; justify-content: center; min-height: 44px; }
.google-slot[hidden], .or-line[hidden] { display: none; }
.or-line { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 12px; color: #999; text-transform: uppercase; letter-spacing: .5px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: #e0e0e0; }

.terms-row { display: flex; align-items: flex-start; gap: 10px; }
.terms-row input { margin-top: 3px; }
.login-section .terms-row label, .signup-section .terms-row label { margin: 0; font-weight: 400; }

@media (max-width: 480px) {
  .cc-menu { width: 100%; }
  .cc-btn { padding: 0 8px 0 10px; gap: 5px; }
}

/* Our own "Continue with Google" button (shown until Google's official one loads, or when Google is not set up yet) */
.google-fallback { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 400px; height: 44px; background: #fff; border: 1px solid #dadce0; border-radius: 6px; font: 500 14px 'Roboto', Arial, sans-serif; color: #3c4043; cursor: pointer; transition: background .15s, box-shadow .15s; }
.google-fallback:hover { background: #f8f9fa; box-shadow: 0 1px 3px rgba(60,64,67,.25); }
.google-fallback:focus-visible { outline: 2px solid #1A3A6B; outline-offset: 2px; }

/* ---------- "Was this you?" page ---------- */
.signin-details { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 22px; padding: 14px 16px; background: #f7f7f9; border-radius: 8px; font-size: 14px; }
.signin-details[hidden], #actions[hidden] { display: none; }
.signin-details dt { color: #666; }
.signin-details dd { margin: 0; font-weight: 600; color: #222; word-break: break-word; }
.btn-ghost { width: 100%; margin-top: 10px; padding: 12px; background: #fff; color: #0B1F3F; border: 1px solid #ccc; border-radius: 6px; font: 600 15px 'Roboto', Arial, sans-serif; cursor: pointer; }
.btn-ghost:hover { background: #f4f4f6; }
