/* ══════════════════════════════════════════════════════════════════
   AUTH MODAL v5 — sign-up fields (Gmail, +63 mobile, structured
   address), the "Verify your email" screen, and the illustrated side
   panel. Loaded after landing.css / validation-page.css.
══════════════════════════════════════════════════════════════════ */

/* ── Field messages: in the normal flow and wrapping, so long plain-language
      messages are never cut off (overrides the older one-line overlay). ── */
.auth-view .form-group { position: relative; }
.auth-view .form-group > .field-error-msg,
.auth-view .terms-row ~ .field-error-msg,
.auth-view .addr-fieldset > .field-error-msg {
  position: static;
  width: auto;
  max-width: none;
  white-space: normal;
  pointer-events: auto;
  margin-top: 5px;
  min-height: 0;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
}
.auth-view .form-row .form-group:last-child > .field-error-msg { text-align: left; }
.auth-view .form-group > .field-error-msg:not(.show),
.auth-view .addr-fieldset > .field-error-msg:not(.show),
#regTermsError:not(.show) { display: none; }
#regTermsError.show { display: flex; margin: -18px 0 16px; }
.auth-view form .form-group { margin-bottom: 14px; }

.req { color: #dc2626; font-weight: 700; }
.opt { color: var(--text3, #94a3b8); font-weight: 500; text-transform: none; letter-spacing: 0; }
.field-hint { margin: 5px 2px 0; font-size: 11.5px; line-height: 1.4; color: var(--text2, #475569); }
.form-group:has(.field-error-msg.show) > .field-hint { display: none; }

/* ── +63 9 mobile number ── */
.phone-wrap { position: relative; display: flex; align-items: stretch; }
.phone-prefix {
  display: inline-flex; align-items: center; padding: 0 10px 0 12px; border: 1.5px solid #cbd5e1; border-right: 0;
  border-radius: 10px 0 0 10px; background: #f1f5f9; color: #0f172a; font-weight: 700; font-size: 14.5px; white-space: nowrap;
}
.phone-wrap .phone-input { border-radius: 0 10px 10px 0; min-width: 0; letter-spacing: 0.06em; }

/* ── Structured address: a clean section, two even columns ── */
.addr-fieldset { border: 0; padding: 18px 0 0; margin: 6px 0 16px; min-width: 0; border-top: 1px solid #e2e8f0; }
.addr-head {
  display: flex; align-items: center; gap: 10px; padding: 0; margin: 0 0 14px; float: left; width: 100%;
  font: 700 15px/1.2 var(--font-head, sans-serif); color: var(--text, #1e293b);
}
.addr-head + * { clear: both; }
.addr-head-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #e0f2f1; color: var(--accent, #00897b); flex: none; }
.addr-head-ic svg { width: 17px; height: 17px; }
.addr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
.addr-grid .span-2 { grid-column: 1 / -1; }
.addr-grid .form-group { min-width: 0; }
.opt-tag {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 99px; background: #f1f5f9; color: #64748b;
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px;
}
.addr-fieldset .form-select { appearance: auto; background-color: #fff; width: 100%; }
.addr-fieldset .form-select:disabled { background: #f8fafc; color: #94a3b8; cursor: not-allowed; }
.brgy-filter { margin-bottom: 6px; padding-top: 9px !important; padding-bottom: 9px !important; font-size: 13.5px !important; }
.brgy-other { margin-top: 6px; }
.addr-preview-row {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 2px; padding: 11px 14px; border-radius: 12px;
  background: #f0fdfa; border: 1px solid #ccfbf1;
}
.addr-preview-label { flex: none; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #0f766e; padding-top: 2px; }
.addr-preview { margin: 0; color: #0f172a; font-size: 13px; line-height: 1.45; word-break: break-word; }
@media (max-width: 400px) { .addr-grid { grid-template-columns: 1fr; } .addr-preview-row { flex-direction: column; gap: 4px; } }
.keep-pw { margin: 0 0 12px !important; }

/* ── Verify your email ── */
.otp-view { text-align: center; }
.otp-icon {
  width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  background: #e0f2f1; color: var(--accent, #00897b); font: 700 26px/1 var(--font-head, sans-serif);
  box-shadow: inset 0 0 0 1px rgba(0, 137, 123, 0.18);
}
.otp-view h3.auth-title { color: #00695c; margin-bottom: 10px; }
.otp-lead { margin: 0; color: var(--text2, #475569); font-size: 14px; }
.otp-email { margin: 4px 0 14px; font-weight: 700; font-size: 15px; color: #0f172a; letter-spacing: 0.02em; word-break: break-all; }
.otp-sent {
  margin: 0 0 16px; padding: 11px 14px; border-radius: 12px; background: #ecfdf5; border: 1px solid #bbf7d0;
  color: #166534; font-size: 13px; line-height: 1.45;
}
.otp-view .otp-inputs { margin: 0 0 6px; }
.otp-view .otp-box { border-radius: 12px; background: #f8fafc; }
.otp-view .otp-box:focus { background: #fff; }
.otp-view .btn-auth { margin-top: 10px; border-radius: 999px; box-shadow: 0 10px 22px -10px rgba(0, 137, 123, 0.7); }
.otp-help { margin: 16px auto 10px; max-width: 360px; font-size: 12.5px; line-height: 1.5; color: var(--text2, #475569); }
.otp-links { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; font-size: 13.5px; font-weight: 700; }
.otp-links a { color: var(--accent, #00897b); text-decoration: none; }
.otp-links a:hover { text-decoration: underline; }
.otp-dot { color: var(--text3, #94a3b8); }
.otp-expiry { margin: 12px 0 0; font-size: 12px; color: var(--text3, #94a3b8); }
#authViewOtp .field-error-msg.show { display: flex; justify-content: center; }
#authViewOtp .field-error-msg:not(.show) { display: none; }

/* ══════════════════════════════════════════════════════════════════
   Photo side panel (img/auth-fiber.jpg — glowing fiber-optic strands)
══════════════════════════════════════════════════════════════════ */
.auth-photo-side { position: relative; overflow: hidden; background: #022c27; color: #fff; }
.auth-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 30%; display: block;
  transform: scale(1.04); animation: authPhotoDrift 18s ease-in-out infinite alternate; }
@keyframes authPhotoDrift { to { transform: scale(1.1) translate(-1.5%, 1%); } }
.auth-photo-shade { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(2, 30, 27, .55) 0%, rgba(2, 30, 27, 0) 22%, rgba(2, 30, 27, 0) 45%, rgba(2, 26, 24, .82) 78%, rgba(1, 20, 18, .95) 100%); }
.auth-photo-badge {
  position: absolute; top: 24px; left: 24px; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 99px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .25); }
.auth-photo-copy { position: absolute; left: 30px; right: 30px; bottom: 30px; }
.auth-photo-copy h4 { margin: 0 0 14px; font: 700 22px/1.28 var(--font-head, sans-serif); letter-spacing: -.01em; text-shadow: 0 2px 14px rgba(0, 0, 0, .35); }
.auth-photo-copy ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.auth-photo-copy li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: #dff7f2; }
.auth-photo-copy li::before {
  content: "✓"; flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(52, 211, 153, .18); color: #6ee7b7; font-size: 11px; font-weight: 800;
}
@media (prefers-reduced-motion: reduce) { .auth-photo { animation: none; } }

/* Long forms (sign-up): start at the top instead of centring, so the first
   fields can always be scrolled to. Short views stay vertically centred. */
.auth-modal-form-side,
.auth-modal-form-side:has(#authViewRegister:not([hidden])) { justify-content: flex-start !important; }
.auth-modal-form-side > .auth-view:not([hidden]) { margin-top: auto; margin-bottom: auto; }
.otp-sent:empty { display: none; }
.addr-grid .form-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.addr-grid .opt-tag { font-size: 9px; padding: 1px 6px; vertical-align: 1px; }

/* v6.2: show / hide password on every password field (js/form-helpers.js) */
.pass-wrap { display: block; position: relative; }
.pass-toggle { top: 50%; transform: translateY(-50%); transition: background-color 150ms ease, color 150ms ease; }
.pass-toggle:active { transform: translateY(-50%) scale(.94); }
.pass-toggle:focus-visible { outline: 2px solid var(--accent, #00897b); outline-offset: 1px; }
input::-ms-reveal, input::-ms-clear { display: none; }
