/* =============================================
   register/register.css — SwipeWork
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --primary:        #3b82f6;
  --primary-dark:   #2563eb;
  --primary-light:  #dbeafe;
  --danger:         #ef4444;
  --danger-light:   #fef2f2;
  --danger-border:  #fecaca;
  --success:        #22c55e;
  --text-dark:      #1e293b;
  --text-mid:       #475569;
  --text-light:     #94a3b8;
  --border:         #e2e8f0;
  --bg-input:       #f8fafc;
  --white:          #ffffff;
  --facebook-blue:  #1877f2;
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.18);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.12);
  --radius:         12px;
  --radius-sm:      8px;
}

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

body {
  font-family: 'Nunito', sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

h3 {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-align: center;
  margin-bottom: 14px;
}

.footer-note {
  color: rgba(255,255,255,0.45);
  font-size: 12px;
  text-align: center;
  margin-top: 14px;
}

/* ---- Card ---- */
.overlay-container { width: 100%; max-width: 420px; }

.overlay-content {
  background: var(--white);
  border-radius: 20px;
  padding: 26px 24px 22px;
  box-shadow: var(--shadow-lg);
}

/* ---- Social Buttons ---- */
.social-login {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 18px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  border: 2px solid transparent;
}

.btn-social:hover  { transform: translateY(-1px); box-shadow: var(--shadow-md); opacity: 0.93; }
.btn-social:active { transform: translateY(0); }

.btn-google { background: var(--white); color: var(--text-dark); border-color: var(--border); }
.btn-google img { width: 18px; height: 18px; }
.btn-facebook { background: var(--facebook-blue); color: var(--white); }
.btn-facebook i { font-size: 16px; }

/* ---- Divider ---- */
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--text-light);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---- Input Groups ---- */
.input-group {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  margin-bottom: 4px; /* reduced — field-error sits right below */
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
  background: var(--white);
}

.input-group.error-state {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
  background: var(--danger-light);
}

.input-group i {
  color: var(--text-light);
  font-size: 13px;
  width: 18px;
  flex-shrink: 0;
  transition: color 0.2s;
}
.input-group:focus-within i { color: var(--primary); }
.input-group.error-state i  { color: var(--danger); }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"] {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  padding: 10px 8px;
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  color: var(--text-dark);
}

input::placeholder { color: var(--text-light); }

/* ---- Select ---- */
.input-group select {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  padding: 10px 8px;
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  color: var(--text-dark);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

/* ---- Field Error (inline, per field) ---- */
.field-error {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--danger);
  padding: 3px 4px 8px 4px;
  display: none; /* shown via JS */
  animation: fadeInDown 0.2s ease;
}

.field-error::before {
  content: '⚠ ';
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Old error-inline (kept for repeat-password fallback) ---- */
.error-inline {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--danger);
  padding: 3px 4px 8px 4px;
  display: none;
}

/* ---- Per-field inline errors (created by JS) ---- */
.field-error {
  font-size: 12px;
  color: var(--danger);
  background: #fef2f2;
  border-left: 3px solid var(--danger);
  padding: 5px 10px;
  margin-top: -6px;
  margin-bottom: 8px;
  border-radius: 0 4px 4px 0;
  display: none;
  font-weight: 600;
  animation: slideDown 0.15s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Radio Cards ---- */
.field-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 8px;
  margin-top: 4px;
}

.radio-group {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.radio-card { flex: 1; cursor: pointer; }
.radio-card input[type="radio"] { display: none; }

.radio-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-mid);
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.radio-card-inner i {
  font-size: 20px;
  color: var(--text-light);
  transition: color 0.2s;
}

.radio-card:hover .radio-card-inner {
  border-color: var(--primary);
  background: var(--primary-light);
}

.radio-card input[type="radio"]:checked + .radio-card-inner {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.radio-card input[type="radio"]:checked + .radio-card-inner i { color: var(--primary); }

/* ---- Checkbox ---- */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  margin-top: 4px;
}

.checkbox-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-group label { font-size: 13px; color: var(--text-mid); cursor: pointer; }
.checkbox-group label a { color: var(--primary); font-weight: 700; text-decoration: none; }
.checkbox-group label a:hover { text-decoration: underline; }

/* ---- reCAPTCHA ---- */
.captcha-group {
  margin-bottom: 14px;
  display: flex;
  justify-content: center;
}

/* ---- Submit Button ---- */
button[type="submit"] {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

button[type="submit"]:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}
button[type="submit"]:active:not(:disabled) { transform: translateY(0); }
button[type="submit"]:disabled { background: #93c5fd; cursor: not-allowed; opacity: 0.7; }

/* ---- Global Popups ---- */
.popup {
  padding: 10px 14px;
  margin-top: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  display: none;
}

.error-popup   { background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger-border); }
.success-popup { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ---- Login link ---- */
.login-link { text-align: center; font-size: 13px; color: var(--text-mid); margin-top: 14px; }
.login-link a { color: var(--primary); font-weight: 700; text-decoration: none; }
.login-link a:hover { text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .overlay-content { padding: 20px 14px 18px; }
  .captcha-group .g-recaptcha { transform: scale(0.87); transform-origin: center; margin-left: -12px; }
}

@media (min-width: 768px) {
  .overlay-content { padding: 32px 30px 26px; }
  input[type="text"], input[type="email"],
  input[type="tel"], input[type="password"] { font-size: 15px; padding: 12px 8px; }
}
