/**
 * Jobpuri Login — auth.css
 * Styles for login, register, OTP, password-strength, and Google button.
 */

/* ── Page wrapper ─────────────────────────────────────────────────────────── */
.jpauth-wrap {
  min-height: calc(100vh - 128px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--jp-bg-light, #f3f2f1);
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.jpauth-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,.09);
  padding: 36px 40px 28px;
  width: 100%;
  max-width: 460px;
}
.jpauth-card--wide { max-width: 520px; }

.jpauth-card__logo {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.jpauth-card__logo img { height: 40px; width: auto; }
.jpauth-card__logo .jp-logo-text { font-size: 26px; font-weight: 700; color: var(--jp-blue,#2557a7); }

.jpauth-card__title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--jp-text,#2d2d2d);
  margin: 0 0 24px;
  line-height: 1.3;
}

.jpauth-card__footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--jp-text-muted,#595959);
  border-top: 1px solid var(--jp-border,#e0e0e0);
  padding-top: 16px;
}
.jpauth-sep { margin: 0 8px; color: var(--jp-border,#e0e0e0); }

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.jpauth-tabs {
  display: flex;
  border: 1px solid var(--jp-border,#e0e0e0);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}
.jpauth-tab {
  flex: 1;
  padding: 10px 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--jp-text-muted,#595959);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background .15s, color .15s;
  border-right: 1px solid var(--jp-border,#e0e0e0);
}
.jpauth-tab:last-child { border-right: none; }
.jpauth-tab:hover { background: var(--jp-bg-light,#f3f2f1); }
.jpauth-tab.is-active {
  background: var(--jp-blue,#2557a7);
  color: #fff;
}

/* ── Panels ──────────────────────────────────────────────────────────────── */
.jpauth-panel { display: none; }
.jpauth-panel.is-active { display: block; }

/* ── Fields ──────────────────────────────────────────────────────────────── */
.jpauth-field { margin-bottom: 18px; }
.jpauth-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.jpauth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--jp-text,#2d2d2d);
  margin-bottom: 6px;
}
.jpauth-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.jpauth-label-link { font-size: 12px; font-weight: 400; }
.req { color: #c83636; }

.jpauth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.jpauth-input-icon {
  position: absolute;
  left: 12px;
  color: var(--jp-text-muted,#595959);
  font-size: 14px;
  pointer-events: none;
}
.jpauth-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--jp-border,#e0e0e0);
  border-radius: 6px;
  font-size: 14px;
  color: var(--jp-text,#2d2d2d);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.jpauth-input:focus {
  border-color: var(--jp-blue,#2557a7);
  box-shadow: 0 0 0 3px rgba(37,87,167,.12);
}
.jpauth-input--icon  { padding-left: 38px; }
.jpauth-input--prefix { padding-left: 44px; border-radius: 0 6px 6px 0; }
.jpauth-prefix {
  background: var(--jp-bg-light,#f3f2f1);
  border: 1.5px solid var(--jp-border,#e0e0e0);
  border-right: none;
  border-radius: 6px 0 0 6px;
  padding: 10px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--jp-text,#2d2d2d);
  white-space: nowrap;
  flex-shrink: 0;
}
.jpauth-eye {
  position: absolute; right: 12px;
  background: none; border: none; cursor: pointer;
  color: var(--jp-text-muted,#595959); font-size: 14px; padding: 4px;
}

.jpauth-hint { font-size: 12px; color: var(--jp-text-muted,#595959); margin-top: 4px; }

.jpauth-domain-note {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--jp-text-muted,#595959);
  line-height: 1.5;
}
.jpauth-domain-note i { color: var(--jp-blue,#2557a7); margin-right: 3px; }

.jpauth-field--row { display: flex; align-items: center; }
.jpauth-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--jp-text,#2d2d2d);
}
.jpauth-check input { margin-top: 2px; flex-shrink: 0; }

/* Field error */
.jpauth-field-error {
  display: block; font-size: 12px; color: #c83636; margin-top: 4px;
}
.jpauth-input.has-error { border-color: #c83636; }

/* ── Password strength ───────────────────────────────────────────────────── */
.jpauth-strength-bar {
  height: 4px;
  background: var(--jp-border,#e0e0e0);
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}
.jpauth-strength-bar__fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width .3s, background .3s;
}
.jpauth-rules {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}
.jpauth-rules li {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.rule-fail { color: #c83636; }
.rule-pass { color: #197a56; }
.rule-pass i::before { content: '\f058'; } /* fa-check-circle */
.rule-fail i::before { content: '\f057'; } /* fa-times-circle */

/* ── OTP boxes ───────────────────────────────────────────────────────────── */
.jpauth-otp-boxes {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.jpauth-otp-box {
  width: 44px; height: 52px;
  border: 1.5px solid var(--jp-border,#e0e0e0);
  border-radius: 8px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: var(--jp-text,#2d2d2d);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.jpauth-otp-box:focus {
  border-color: var(--jp-blue,#2557a7);
  box-shadow: 0 0 0 3px rgba(37,87,167,.12);
}

.jpauth-otp-sent-msg { text-align: center; }

/* ── Mobile row (register) ───────────────────────────────────────────────── */
.jpauth-mob-row { display: flex; gap: 10px; align-items: flex-end; }
.jpauth-mob-status { font-size: 13px; }
.jpauth-mob-status.verified { color: #197a56; font-weight: 600; }
.jpauth-mob-status.error    { color: #c83636; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.jpauth-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 11px 20px; border-radius: 6px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: all .15s;
  white-space: nowrap; text-decoration: none;
}
.jpauth-btn--primary {
  background: var(--jp-blue,#2557a7); color: #fff;
  border-color: var(--jp-blue,#2557a7);
}
.jpauth-btn--primary:hover { background: #1d4186; border-color: #1d4186; color: #fff; }
.jpauth-btn--outline {
  background: transparent;
  color: var(--jp-blue,#2557a7);
  border-color: var(--jp-blue,#2557a7);
}
.jpauth-btn--outline:hover { background: #e8f0fe; }
.jpauth-btn--full { width: 100%; }
.jpauth-btn--sm   { padding: 7px 14px; font-size: 13px; }
.jpauth-btn:disabled { opacity: .55; cursor: not-allowed; }

.jpauth-btn--google {
  background: #fff; color: #3c4043;
  border: 1.5px solid #dadce0;
  font-weight: 500;
}
.jpauth-btn--google:hover { background: #f8f8f8; box-shadow: 0 1px 4px rgba(0,0,0,.12); }

.jpauth-text-btn {
  background: none; border: none; cursor: pointer;
  color: var(--jp-blue,#2557a7); font-size: 13px; padding: 0;
  text-decoration: underline;
}

/* ── Divider ─────────────────────────────────────────────────────────────── */
.jpauth-divider {
  display: flex; align-items: center;
  gap: 12px; margin: 20px 0;
  color: var(--jp-text-muted,#595959); font-size: 12px;
}
.jpauth-divider::before,
.jpauth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--jp-border,#e0e0e0);
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
#jpauth-alerts:not(:empty) { margin-bottom: 16px; }
.jpauth-alert {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}
.jpauth-alert--error   { background: #fef2f2; border: 1px solid #fecaca; color: #c83636; }
.jpauth-alert--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #197a56; }
.jpauth-alert--info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ── Mobile-verification gate (post-job page) ────────────────────────────── */
.jpauth-mobile-gate {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.jpauth-mobile-gate i { font-size: 24px; color: #d97706; flex-shrink: 0; }
.jpauth-mobile-gate__text h3 { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.jpauth-mobile-gate__text p  { font-size: 13px; color: #595959; margin: 0; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .jpauth-card { padding: 28px 20px 20px; }
  .jpauth-row { grid-template-columns: 1fr; }
  .jpauth-rules { grid-template-columns: 1fr; }
  .jpauth-otp-box { width: 38px; height: 46px; font-size: 18px; }
}
/* Google tab — unconfigured state styling */
.jpauth-google-unconfigured {
  text-align: center;
  padding: 24px 16px;
}
.jpauth-google-icon-wrap {
  margin-bottom: 16px;
  opacity: 0.45;
}
.jpauth-google-coming-soon {
  font-size: 17px;
  font-weight: 600;
  color: #1d2d3e;
  margin: 0 0 8px;
}
.jpauth-google-coming-desc {
  font-size: 13px;
  color: #595959;
  line-height: 1.6;
  margin: 0 0 16px;
}
.jpauth-admin-note {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  color: #5d4037;
  text-align: left;
}
.jpauth-admin-note .fa {
  margin-right: 6px;
  color: #f9a825;
}
