/**
 * Swaraj247 /signup R3 — route form styles (shell: swaraj-auth-shell.css)
 */

.swaraj-su-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.swaraj-su-banner.is-error {
  background: rgba(127, 29, 29, 0.85);
  color: #fff;
}

.swaraj-su-banner.is-ok {
  background: rgba(20, 83, 45, 0.85);
  color: #fff;
}

.swaraj-su-form {
  margin: 0;
}

.swaraj-su-field {
  margin-bottom: 0;
  padding-bottom: 22px;
  position: relative;
}

.swaraj-su-field + .swaraj-su-field {
  margin-top: var(--auth-row-gap);
}

.swaraj-su-field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.swaraj-su-input-wrap {
  height: var(--auth-control-height);
  min-height: var(--auth-control-height);
  border-radius: var(--auth-radius);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: stretch;
  box-sizing: border-box;
}

.swaraj-su-input-wrap:focus-within {
  border-color: #ffcc2f;
  box-shadow: 0 0 0 2px rgba(255, 204, 47, 0.25);
}

.swaraj-su-input-wrap input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  margin: 0;
  padding: 0 14px;
  font-size: 16px;
  font-family: inherit;
  color: #111;
  background: transparent;
  box-sizing: border-box;
}

.swaraj-su-input-wrap input::placeholder {
  color: #9ca3af;
}

.swaraj-su-input-wrap input:focus {
  outline: none;
}

.swaraj-su-input-wrap input:read-only {
  background: #f3f4f6;
}

.swaraj-su-pw-toggle {
  width: 44px;
  min-width: 44px;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.swaraj-su-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--auth-gap);
  margin-bottom: var(--auth-row-gap);
}

.swaraj-su-row-2 .swaraj-su-field {
  margin-top: 0;
  padding-bottom: 22px;
}

.swaraj-su-row-2 + .swaraj-su-field {
  margin-top: 0;
}

/* India mobile composed field */
.swaraj-su-mobile-composed {
  display: flex;
  align-items: stretch;
  height: var(--auth-control-height);
  min-height: var(--auth-control-height);
  border-radius: var(--auth-radius);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #fff;
  overflow: hidden;
  box-sizing: border-box;
  flex: 1;
  min-width: 0;
}

.swaraj-su-mobile-composed:focus-within {
  border-color: #ffcc2f;
  box-shadow: 0 0 0 2px rgba(255, 204, 47, 0.25);
}

.swaraj-su-mobile-composed.is-readonly {
  background: #f3f4f6;
}

.swaraj-su-mobile-prefix {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #111;
  white-space: nowrap;
  flex-shrink: 0;
  border-right: 1px solid rgba(0, 0, 0, 0.12);
}

.swaraj-su-mobile-prefix .flag {
  font-size: 16px;
  line-height: 1;
}

.swaraj-su-mobile-composed input {
  flex: 1;
  min-width: 0;
  border: 0;
  height: 100%;
  padding: 0 10px;
  font-size: 16px;
  color: #111;
  background: transparent;
}

.swaraj-su-mobile-composed input:focus {
  outline: none;
}

.swaraj-su-mobile-composed input::placeholder {
  color: #9ca3af;
}

.swaraj-su-mobile-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  color: #16a34a;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.swaraj-su-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--auth-gap);
  align-items: stretch;
}

.swaraj-su-action-row .swaraj-su-btn {
  min-width: clamp(72px, 28vw, 108px);
  padding-left: 8px;
  padding-right: 8px;
}

.swaraj-su-action-row .swaraj-su-input-wrap {
  width: 100%;
}

.swaraj-su-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  height: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.15;
  white-space: normal;
  text-align: center;
  cursor: pointer;
  background: var(--swaraj-su-btn-bg);
  color: #000;
  touch-action: manipulation;
}

.swaraj-su-btn:hover:not(:disabled) {
  filter: brightness(1.05);
}

.swaraj-su-btn:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.swaraj-su-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.swaraj-su-btn.is-verified {
  opacity: 0.85;
}

.swaraj-su-field-error {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 18px;
  padding-top: 4px;
  font-size: 12px;
  line-height: 1.25;
  color: #fff;
}

.swaraj-su-otp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--auth-gap);
  align-items: stretch;
}

.swaraj-su-otp-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 50px;
  gap: 6px;
}

.swaraj-su-otp-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.9);
}

.swaraj-su-otp-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(3px, 1.2vw, 6px);
  width: 100%;
}

.swaraj-su-otp-box {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  min-height: clamp(32px, 8.5vw, 42px);
  max-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: #fff;
  color: #111;
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 700;
  text-align: center;
  padding: 0;
  box-sizing: border-box;
}

.swaraj-su-otp-box:focus {
  outline: none;
  border-color: #ffcc2f;
  box-shadow: 0 0 0 2px rgba(255, 204, 47, 0.25);
}

.swaraj-su-otp-box:disabled {
  background: #f3f4f6;
  color: #374151;
}

.swaraj-su-resend-hint {
  margin: -8px 0 14px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

/* R2.2 — duplicate mobile action panel */
.swaraj-su-dup-mobile {
  margin: -6px 0 14px;
  padding: 12px 12px 10px;
  border-radius: var(--auth-radius, 7px);
  background: rgba(127, 29, 29, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.swaraj-su-dup-mobile-msg {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.4;
  color: #fff;
  text-align: center;
}

.swaraj-su-dup-mobile-actions {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: var(--auth-gap, 8px);
  align-items: stretch;
}

.swaraj-su-dup-mobile-actions .swaraj-su-btn {
  min-height: 44px;
  font-size: 13px;
  text-decoration: none;
}

.swaraj-su-dup-login {
  width: 100%;
}

@media (max-width: 360px) {
  .swaraj-su-dup-mobile-actions {
    grid-template-columns: 1fr 1fr;
  }

  .swaraj-su-dup-mobile-actions .swaraj-su-btn {
    font-size: 12px;
    padding: 6px 4px;
  }
}

/* R2.4 / R3 — username validation + availability (visual parity preserved) */
.swaraj-su-field-username {
  padding-bottom: 8px;
}

.swaraj-su-username-feedback {
  min-height: 28px;
  margin: 6px 0 10px;
}

.swaraj-su-username-checking {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.swaraj-su-username-ok {
  font-size: 13px;
  font-weight: 600;
  color: #86efac;
}

.swaraj-su-username-warn {
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 6px;
}

.swaraj-su-username-invalid {
  font-size: 13px;
  line-height: 1.35;
  color: #fca5a5;
}

.swaraj-su-username-error {
  font-size: 13px;
  line-height: 1.35;
  color: #fca5a5;
}

.swaraj-su-username-rate {
  font-size: 13px;
  line-height: 1.35;
  color: #fcd34d;
}

.swaraj-su-username-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.swaraj-su-username-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 204, 47, 0.55);
  border-radius: 6px;
  background: rgba(255, 204, 47, 0.12);
  color: #ffcc2f;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 6px 10px;
  cursor: pointer;
  line-height: 1.2;
}

.swaraj-su-username-chip:hover {
  background: rgba(255, 204, 47, 0.22);
}

.swaraj-su-username-chip:focus-visible {
  outline: 2px solid #ffcc2f;
  outline-offset: 2px;
}

.swaraj-su-verified-hint {
  display: none;
}

.swaraj-su-pw-hint {
  margin: -12px 0 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.swaraj-su-pw-hint li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.swaraj-su-pw-hint li.is-met {
  color: #86efac;
}

.swaraj-su-pw-hint li.is-unmet {
  color: rgba(255, 255, 255, 0.65);
}

.swaraj-su-confirm-feedback {
  min-height: 20px;
  margin-top: 6px;
  padding-bottom: 4px;
  font-size: 13px;
  line-height: 1.35;
}

.swaraj-su-confirm-feedback.is-reserved {
  visibility: hidden;
}

.swaraj-su-confirm-feedback.is-match {
  visibility: visible;
  color: #4ade80;
}

.swaraj-su-confirm-feedback.is-mismatch {
  visibility: visible;
  color: #f87171;
}

.swaraj-su-submit-wrap {
  margin-top: 18px;
}

.swaraj-su-submit-wrap .swaraj-su-btn {
  width: 100%;
  font-size: 16px;
}

.swaraj-su-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
}

.swaraj-su-footer a {
  color: #ffcc2f;
  font-weight: 700;
  text-decoration: none;
}

.swaraj-su-footer a:hover {
  text-decoration: underline;
}

.swaraj-su-success {
  text-align: center;
  padding: 24px 0;
}

.swaraj-su-success h1 {
  font-size: 18px;
  margin: 0 0 12px;
}

.swaraj-su-success p {
  margin: 0 0 20px;
  font-size: 14px;
  opacity: 0.9;
}

.swaraj-su-loading {
  text-align: center;
  padding: 40px 0;
  font-size: 14px;
  opacity: 0.8;
}

@media (max-width: 360px) {
  .swaraj-su-card {
    width: min(92vw, 360px);
  }

  .swaraj-su-row-2.is-cramped {
    grid-template-columns: 1fr;
  }

  .swaraj-su-btn {
    font-size: 12px;
    padding: 6px 4px;
  }
}

/* R1 keyboard flicker: confirm always mounted; show/hide without reconstruct */
.swaraj-su-confirm-wrap:not(.is-visible),
.swaraj-su-confirm-wrap[hidden] {
  display: none !important;
}
[data-pw-hint-slot][hidden] {
  display: none !important;
}
