/* TopHelpers Customer Registration — style.css */

:root {
  --thcust-primary:      #8F3985;
  --thcust-secondary:    #0D3659;
  --thcust-field-bg:     #F5F5F9;
  --thcust-placeholder:  #AEAEAE;
  --thcust-error:        #DC2626;
  --thcust-radius:       12px;
  --thcust-transition:   150ms ease;
}

/* ── Wrapper ─────────────────────────────────────────────────────── */

#thcust-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 15px;
  font-family: Inter, sans-serif;
  color: var(--thcust-secondary);
}

/* ── Card ────────────────────────────────────────────────────────── */

.thcust-card {
  background: #fff;
  border-radius: 24px;
  padding: 50px;
  box-shadow: 0 20px 60px rgba(13, 54, 89, 0.07);
}

/* ── Title / subtitle ────────────────────────────────────────────── */

.thcust-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--thcust-secondary);
  margin: 0 0 8px;
  line-height: 1.2;
}

.thcust-subtitle {
  font-size: 15px;
  color: #6B7280;
  margin: 0 0 30px;
}

/* ── Grid ────────────────────────────────────────────────────────── */

.thcust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 30px;
}

.thcust-field--full {
  grid-column: 1 / -1;
}

/* ── Fields ──────────────────────────────────────────────────────── */

.thcust-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.thcust-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--thcust-secondary);
  margin-bottom: 10px;
  line-height: 1.3;
}

.thcust-optional {
  color: var(--thcust-placeholder);
  font-weight: 500;
}

/* ── Inputs ──────────────────────────────────────────────────────── */

.thcust-input {
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--thcust-radius);
  background: var(--thcust-field-bg);
  font-size: 15px;
  font-weight: 500;
  color: var(--thcust-secondary);
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: box-shadow var(--thcust-transition);
}

.thcust-input::placeholder { color: var(--thcust-placeholder); font-weight: 500; }
.thcust-input:focus        { box-shadow: 0 0 0 2px rgba(143, 57, 133, 0.25); }
.thcust-input--error       { box-shadow: inset 0 0 0 1.5px var(--thcust-error) !important; }

/* ── Password wrapper (input + toggle button) ────────────────────── */

.thcust-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.thcust-pw-wrap .thcust-input {
  padding-right: 48px;
}

.thcust-pw-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--thcust-placeholder);
  display: flex;
  align-items: center;
  transition: color var(--thcust-transition);
}

.thcust-pw-toggle:hover { color: var(--thcust-secondary); }

/* ── Error & hint ────────────────────────────────────────────────── */

.thcust-error {
  font-size: 12px;
  color: var(--thcust-error);
  margin-top: 5px;
  min-height: 14px;
}

.thcust-error:empty { min-height: 0; }

.thcust-hint {
  font-size: 12px;
  color: #6B7280;
  margin-top: 5px;
}

/* ── API error banner ────────────────────────────────────────────── */

.thcust-api-error {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: var(--thcust-radius);
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--thcust-error);
  font-size: 14px;
  line-height: 1.5;
}

.thcust-api-error[hidden] { display: none; }

/* ── Navigation / submit ─────────────────────────────────────────── */

.thcust-nav {
  display: flex;
  justify-content: flex-end;
  margin-top: 35px;
}

.thcust-btn--full {
  width: 100%;
  justify-content: center;
}

.thcust-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 34px;
  border: none;
  border-radius: var(--thcust-radius);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--thcust-transition), color var(--thcust-transition);
}

.thcust-btn--submit            { background: var(--thcust-primary); color: #fff; }
.thcust-btn--submit:hover      { background: var(--thcust-secondary); }
.thcust-btn--submit:disabled   { background: #D1D5DB; cursor: not-allowed; }

/* ── Login link ──────────────────────────────────────────────────── */

.thcust-login-link {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: #6B7280;
}

.thcust-link {
  color: var(--thcust-primary);
  text-decoration: underline;
  font-weight: 600;
}

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .thcust-card              { padding: 28px 20px; border-radius: 18px; }
  .thcust-grid              { grid-template-columns: 1fr; }
  .thcust-field--full       { grid-column: 1; }
  .thcust-nav               { justify-content: stretch; }
  .thcust-btn               { flex: 1; justify-content: center; }
}
