/* ============================================================
   FundrayzerGlobal Bank — register.css v2
   Google Translate widget in bank header
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #0a2e6e;
  --primary-mid:   #1040a0;
  --primary-light: #1a55c8;
  --accent:        #f5a623;
  --accent-light:  #ffc94a;
  --teal:          #1a7fd4;
  --white:         #ffffff;
  --off-white:     #f4f7fc;
  --text:          #1a1e2e;
  --text-muted:    #5a6480;
  --border:        #d4daea;
  --danger:        #d93535;
  --success:       #1a7a45;
  --font:          'Poppins', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--off-white);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
}

a { text-decoration: none; color: inherit; }

/* ── Bank header ── */
.bank-header { text-align: center; margin-bottom: 1.8rem; }

.bank-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
  text-decoration: none;
}

.bank-logo-mark {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.bank-logo-name { font-size: 1.25rem; font-weight: 700; color: var(--primary); letter-spacing: -0.01em; }
.bank-logo-name span { color: var(--accent); }
.bank-logo-sub { font-size: 0.6rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }

.bank-header h1 { font-size: clamp(1.15rem, 3vw, 1.55rem); font-weight: 700; color: var(--primary); line-height: 1.25; margin-bottom: 0.35rem; }
.bank-header p { font-size: 0.87rem; color: var(--text-muted); line-height: 1.65; }

/* ══════════════════════════════════════
   GOOGLE TRANSLATE — HIDE BAR
   ══════════════════════════════════════ */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate {
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  border: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Cancel body top shift Google injects */
body { top: 0 !important; }
body.translated-ltr,
body.translated-rtl { top: 0 !important; margin-top: 0 !important; }

/* Hide "Powered by Google" text */
.goog-te-gadget > span,
.goog-te-gadget > a { display: none !important; }

/* Widget wrapper — centred below the subheading */
.register-gt-wrap {
  margin-top: 0.9rem;
  display: flex;
  justify-content: center;
}
.register-gt-wrap .goog-te-gadget,
.register-gt-wrap .goog-te-gadget-simple {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-size: 0 !important;
}
.register-gt-wrap select,
.register-gt-wrap .goog-te-combo {
  font-family: var(--font) !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: var(--primary) !important;
  background-color: var(--white) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 0.45rem 2.2rem 0.45rem 0.85rem !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer !important;
  outline: none !important;
  min-width: 160px !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%230a2e6e' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.55rem center !important;
  background-size: 16px !important;
}
.register-gt-wrap select:hover,
.register-gt-wrap .goog-te-combo:hover {
  border-color: var(--primary-light) !important;
  box-shadow: 0 0 0 3px rgba(26,85,200,0.1) !important;
}
.register-gt-wrap select:focus,
.register-gt-wrap .goog-te-combo:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(26,127,212,0.15) !important;
}
.register-gt-wrap select option,
.register-gt-wrap .goog-te-combo option {
  background: var(--white) !important;
  color: var(--text) !important;
}

/* ── Form card ── */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.2rem 2rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 4px 20px rgba(10,46,110,0.07);
}

form ul { list-style: none; padding: 0; margin: 0; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; margin-bottom: 0; }

.field-group { display: flex; flex-direction: column; margin-bottom: 1.1rem; }

.field-group label { font-size: 0.8rem; font-weight: 600; color: var(--text); margin-bottom: 0.38rem; }

.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="password"] {
  width: 100%;
  padding: 0.76rem 1rem;
  font-family: var(--font);
  font-size: 0.875rem;
  color: var(--text);
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.22s, box-shadow 0.22s, background 0.22s;
}

.field-group input::placeholder { color: #aab2c8; }

.field-group input:focus {
  border-color: var(--primary-light);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,85,200,0.12);
}

.field-group input.input-error  { border-color: var(--danger);  box-shadow: 0 0 0 3px rgba(217,53,53,0.1); }
.field-group input.input-success { border-color: var(--success); box-shadow: 0 0 0 3px rgba(26,122,69,0.1); }

.field-error {
  font-size: 0.74rem;
  color: var(--danger);
  margin-top: 0.28rem;
  display: none;
  align-items: center;
  gap: 0.25rem;
}
.field-error.visible { display: flex; }

/* ── Password toggle ── */
.input-wrapper { position: relative; display: flex; align-items: center; }
.input-wrapper input { padding-right: 2.7rem; }

.toggle-pw {
  position: absolute;
  right: 0.85rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}
.toggle-pw:hover { color: var(--primary); }

/* ── Strength meter ── */
.strength-meter { margin-top: 0.5rem; display: none; flex-direction: column; gap: 0.28rem; }
.strength-meter.visible { display: flex; }
.strength-bars { display: flex; gap: 5px; }
.strength-bar-seg { flex: 1; height: 5px; border-radius: 99px; background: var(--border); transition: background 0.3s ease; }
.strength-bar-seg.filled-weak   { background: var(--danger); }
.strength-bar-seg.filled-fair   { background: var(--accent); }
.strength-bar-seg.filled-good   { background: var(--teal); }
.strength-bar-seg.filled-strong { background: var(--success); }
.strength-text { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); transition: color 0.3s; }

/* ── Checkbox ── */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 1.3rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  cursor: pointer;
  flex-wrap: wrap;
}
.checkbox-group input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
.checkbox-group a { color: var(--primary-light); text-decoration: underline; transition: color 0.2s; }
.checkbox-group a:hover { color: var(--accent); }

/* ── Submit button ── */
.btn-submit {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.88rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  margin-bottom: 1.2rem;
}
.btn-submit:hover { background: var(--primary-light); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(10,46,110,0.22); }
.btn-submit:active { transform: translateY(0); box-shadow: none; }
.btn-submit.loading { background: var(--primary-mid); pointer-events: none; opacity: 0.8; }

.spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-submit.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Sign in link ── */
.signin-link { text-align: center; font-size: 0.84rem; color: var(--text-muted); }
.signin-link a { color: var(--primary-light); font-weight: 600; text-decoration: underline; transition: color 0.2s; }
.signin-link a:hover { color: var(--accent); }

/* ── Toast ── */
.toast {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--success);
  color: var(--white);
  padding: 0.85rem 1.4rem;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(0,0,0,0.14);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  z-index: 9999;
  transform: translateX(130%);
  transition: transform 0.35s ease;
}
.toast.show { transform: translateX(0); }

/* ══════════════════════════════════════
   RTL SUPPORT
   ══════════════════════════════════════ */
[dir="rtl"] body               { direction: rtl; }
[dir="rtl"] .bank-logo         { flex-direction: row-reverse; }
[dir="rtl"] .bank-header       { text-align: right; }
[dir="rtl"] .register-gt-wrap  { justify-content: flex-end; }
[dir="rtl"] .field-group label { text-align: right; }
[dir="rtl"] .field-group input { text-align: right; direction: rtl; }
[dir="rtl"] .input-wrapper     { flex-direction: row-reverse; }
[dir="rtl"] .input-wrapper input { padding-right: 1rem; padding-left: 2.7rem; }
[dir="rtl"] .toggle-pw         { right: auto; left: 0.85rem; }
[dir="rtl"] .checkbox-group    { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .signin-link       { text-align: right; }
[dir="rtl"] .toast             { right: auto; left: 1.5rem; transform: translateX(-130%); }
[dir="rtl"] .toast.show        { transform: translateX(0); }

/* ── Script fonts ── */
[lang="ar"],[lang="ur"],[lang="fa"] { font-family:'Segoe UI','Arabic Typesetting',Tahoma,sans-serif;line-height:1.8; }
[lang="zh"],[lang="zh-tw"],[lang="ja"],[lang="ko"] { font-family:'Segoe UI','Noto Sans CJK','Microsoft YaHei',sans-serif; }
[lang="hi"],[lang="bn"] { font-family:'Segoe UI','Noto Sans Devanagari',sans-serif;line-height:1.8; }
[lang="th"] { font-family:'Segoe UI','Noto Sans Thai',Tahoma,sans-serif;line-height:2; }
[lang="am"] { font-family:'Segoe UI','Nyala','Ebrima',sans-serif;line-height:1.9; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-card { padding: 1.8rem 1.3rem; }
  .bank-header h1 { font-size: 1.1rem; }
  .register-gt-wrap select,
  .register-gt-wrap .goog-te-combo { min-width: 100% !important; }
}
@media (max-width: 380px) {
  body { padding: 1.5rem 0.75rem; }
  .form-card { padding: 1.5rem 1rem; }
  .bank-logo-name { font-size: 1.05rem; }
  .bank-header h1 { font-size: 1rem; }
  .toast { right: 0.5rem; left: 0.5rem; max-width: none; }
}