/* Shared Figma auth textbox styles (login / register) */
:root {
  --auth-textbox-bg: #faf9ff;
  --auth-textbox-border: #e7e0f7;
  --auth-textbox-placeholder: #757575;
  --auth-textbox-ink: #14213d;
  --auth-textbox-radius: 15px;
  --auth-textbox-height: 52px;
  --auth-textbox-padding: 16px;
}

.auth-textbox,
.auth-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="file"]),
.auth-form select,
.auth-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--auth-textbox-height);
  height: var(--auth-textbox-height);
  padding: var(--auth-textbox-padding);
  border: 1px solid var(--auth-textbox-border);
  border-radius: var(--auth-textbox-radius);
  color: var(--auth-textbox-ink);
  background: var(--auth-textbox-bg);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.auth-form textarea {
  height: auto;
  min-height: 120px;
  resize: vertical;
  line-height: 1.45;
}

.auth-textbox::placeholder,
.auth-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="file"])::placeholder,
.auth-form textarea::placeholder {
  color: var(--auth-textbox-placeholder);
  opacity: 1;
}

.auth-textbox:focus,
.auth-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="file"]):focus,
.auth-form select:focus,
.auth-form textarea:focus {
  border-color: var(--auth-textbox-border);
  box-shadow: 0 0 0 3px rgba(231, 224, 247, 0.65);
  background: var(--auth-textbox-bg);
}

.auth-textbox.error,
.auth-textbox.invalid,
.auth-form input:not([type="checkbox"]).error,
.auth-form input:not([type="checkbox"]).invalid,
.auth-form select.invalid,
.auth-form textarea.error,
.auth-form textarea.invalid,
.auth-form .field.invalid input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="file"]),
.auth-form .field.invalid select,
.auth-form .field.invalid textarea {
  border-color: #fca5a5;
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(252, 165, 165, 0.18);
}

.auth-form .input-wrap {
  position: relative;
  display: grid;
  min-width: 0;
}

.auth-form .input-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 2;
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  color: #94a3b8;
  transform: translateY(-50%);
  pointer-events: none;
}

.auth-form .input-icon svg {
  width: 20px;
  height: 20px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Match/exceed base input:not(...) specificity so left padding wins over shorthand padding */
.auth-form .input-wrap:has(.input-icon) > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="file"]),
.auth-form .input-wrap:has(.input-icon) > select {
  padding-left: 46px;
  padding-right: var(--auth-textbox-padding);
}

.auth-form .input-wrap:has(.password-toggle) > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="file"]) {
  padding-right: 72px;
}

.auth-form .input-wrap .mp-select {
  width: 100%;
  min-width: 0;
}

.auth-form .input-wrap .mp-select-button {
  width: 100%;
  min-height: var(--auth-textbox-height);
  height: var(--auth-textbox-height);
  padding: 0 40px 0 44px;
  border: 1px solid var(--auth-textbox-border);
  border-radius: var(--auth-textbox-radius);
  color: var(--auth-textbox-ink);
  background: var(--auth-textbox-bg);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: none;
  text-align: left;
}

.auth-form .input-wrap .mp-select-button:hover {
  border-color: var(--auth-textbox-border);
  background: var(--auth-textbox-bg);
}

.auth-form .input-wrap .mp-select.open .mp-select-button {
  border-color: var(--auth-textbox-border);
  background: var(--auth-textbox-bg);
  box-shadow: 0 0 0 3px rgba(231, 224, 247, 0.65);
}

.auth-form .input-wrap .mp-select-button.invalid,
.auth-form .field.invalid .mp-select-button {
  border-color: #fca5a5;
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(252, 165, 165, 0.18);
}
