/* ══════════════════════════════════════════════════════════════════════════
   Artist registration (artist.html)
   - compact multi-column field rows
   - password strength meter
   - client-side validation alert
   - post-submit result cards (success / error)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Compact field rows ──────────────────────────────────────────────────── */
/* Puts several fields side by side so a block such as email / password /
   account type costs one row instead of three. Collapses to a single column
   below 576px, where stacking is the only readable option. */
.ar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 11px;
}
.ar-row > .ar-field {
  flex: 1 1 190px;
  /* min-width:0 stops long placeholders from forcing the flex item wider */
  min-width: 0;
  margin-bottom: 0;
}
/* Email carries the longest value of the login row, so it gets the extra width */
.ar-row > .ar-field-email {
  flex: 1.6 1 240px;
}
/* The strength meter sits under the password field and must not push the row taller */
.ar-row .ar-pwd-meter {
  margin-top: 5px;
}
@media (max-width: 575px) {
  .ar-row > .ar-field,
  .ar-row > .ar-field-email {
    flex: 1 1 100%;
  }
}

/* ── Password strength meter ─────────────────────────────────────────────── */
.ar-pwd-meter {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.ar-pwd-meter.is-visible {
  display: flex;
}
.ar-pwd-meter-track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #e5e7eb;
  overflow: hidden;
}
.ar-pwd-meter-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  transition: width .25s ease, background-color .25s ease;
}
.ar-pwd-meter-label {
  font-size: 12px;
  font-weight: 600;
  min-width: 52px;
  text-align: right;
  color: #6b7280;
}
/* Strength levels: 1 weak → 4 strong */
.ar-pwd-meter[data-level="1"] .ar-pwd-meter-fill { width: 25%;  background: #dc2626; }
.ar-pwd-meter[data-level="2"] .ar-pwd-meter-fill { width: 50%;  background: #f59e0b; }
.ar-pwd-meter[data-level="3"] .ar-pwd-meter-fill { width: 75%;  background: #84cc16; }
.ar-pwd-meter[data-level="4"] .ar-pwd-meter-fill { width: 100%; background: #16a34a; }
.ar-pwd-meter[data-level="1"] .ar-pwd-meter-label { color: #dc2626; }
.ar-pwd-meter[data-level="2"] .ar-pwd-meter-label { color: #f59e0b; }
.ar-pwd-meter[data-level="3"] .ar-pwd-meter-label { color: #84cc16; }
.ar-pwd-meter[data-level="4"] .ar-pwd-meter-label { color: #16a34a; }

/* ── Client-side validation alert (shown above the submit button) ────────── */
.ar-form-alert {
  display: none;
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
  color: #7f1d1d;
}
.ar-form-alert.is-visible {
  display: block;
}
.ar-form-alert-title {
  font-size: 14px;
  font-weight: 700;
  color: #dc2626;
  margin: 0 0 8px 0;
}
.ar-form-alert ul {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.8;
}
/* Highlight of the invalid inputs */
.ar-input-error,
.ar-input.ar-input-error {
  border-color: #dc2626;
}
.ar-input.ar-input-error:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

/* ── "You already have an account" info box (email field, ajax injected) ──── */
.ar-exists {
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  border-left: 4px solid #2563eb;
  border-radius: 10px;
  padding: 16px 18px;
  margin: 10px 0 4px;
  color: #1e3a5f;
}
.ar-exists-title {
  font-size: 15px;
  font-weight: 700;
  color: #1d4ed8;
  margin-bottom: 8px;
}
.ar-exists-title i {
  margin-right: 6px;
}
.ar-exists-text {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 8px 0;
}
.ar-exists-text strong {
  color: #111;
  word-break: break-all;
}
.ar-exists-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 12px;
}
.ar-exists-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  background: #de256d;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}
.ar-exists-btn:hover,
.ar-exists-btn:focus {
  background: #c21e60;
  color: #fff;
  text-decoration: none;
}
.ar-exists-link {
  font-size: 13px;
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: underline;
}

/* Small screens: stack the actions full width */
@media (max-width: 480px) {
  .ar-exists-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .ar-exists-btn {
    justify-content: center;
  }
  .ar-exists-link {
    text-align: center;
  }
}

/* ── reCAPTCHA row (compact, no card) ────────────────────────────────────── */
.ar-captcha {
  display: flex;
  justify-content: center;
  margin: 0 0 16px;
}

/* ── Post-submit result cards ────────────────────────────────────────────── */
.ar-result-wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 30px 15px 60px;
}
.ar-result-card {
  background: #fff;
  border-radius: 12px;
  padding: 34px 32px 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.11);
}
.ar-result-card--error   { border-top: 4px solid #dc2626; }
.ar-result-card--success { border-top: 4px solid #16a34a; }
.ar-result-icon {
  font-size: 34px;
  line-height: 1;
  margin-bottom: 14px;
}
.ar-result-title {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  margin: 0 0 14px 0;
}
.ar-result-card--error .ar-result-title   { color: #b91c1c; }
.ar-result-card--success .ar-result-title { color: #15803d; }
.ar-result-list {
  margin: 0 0 20px 0;
  padding-left: 20px;
  font-size: 15px;
  line-height: 2;
  color: #374151;
}
.ar-result-text {
  font-size: 15px;
  line-height: 1.7;
  color: #374151;
}
.ar-result-text strong { color: #111; }
.ar-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 26px;
  background: #de256d;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  text-decoration: none;
}
.ar-back-btn:hover,
.ar-back-btn:focus {
  background: #c21e60;
  color: #fff;
  text-decoration: none;
}

/* Small screens: tighter card padding */
@media (max-width: 480px) {
  .ar-result-card {
    padding: 24px 18px 22px;
  }
}
