.eb-form-label {
  display: block;
  margin-bottom: var(--eb-space-2);
  color: var(--eb-text-primary);
  font-family: var(--eb-font-base);
  font-size: var(--eb-type-label-size-mobile);
  font-weight: var(--eb-type-label-weight);
  line-height: var(--eb-type-label-line-height);
  letter-spacing: var(--eb-type-label-tracking);
}

.eb-required-indicator {
  color: var(--eb-danger-600);
  font-weight: var(--eb-font-weight-bold);
}

.eb-form-control,
.eb-form-select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--eb-border-default);
  /*border-radius: var(--eb-radius-md);*/
  background: var(--eb-bg-card);
  color: var(--eb-text-primary);
  font-family: var(--eb-font-base);
  font-size: var(--eb-type-input-size-mobile);
  font-weight: var(--eb-type-input-weight);
  line-height: var(--eb-type-input-line-height);
  letter-spacing: var(--eb-type-input-tracking);
  box-shadow: none;
  transition:
    border-color var(--eb-duration-base) var(--eb-ease-standard),
    box-shadow var(--eb-duration-base) var(--eb-ease-standard),
    background-color var(--eb-duration-base) var(--eb-ease-standard),
    color var(--eb-duration-base) var(--eb-ease-standard);
}

.eb-form-control::placeholder {
  color: var(--eb-text-muted);
  opacity: 1;
}

.eb-form-control:hover,
.eb-form-select:hover {
  border-color: var(--eb-border-strong);
}

.eb-form-control:focus,
.eb-form-select:focus {
  outline: none;
  border-color: var(--eb-border-focus);
  box-shadow: 0 0 0 4px var(--eb-primary-700-08);
}

.eb-form-control[readonly] {
  background: var(--eb-surface-subtle);
}

.eb-form-control:disabled,
.eb-form-select:disabled,
.eb-form-control.is-preview-disabled,
.eb-form-select.is-preview-disabled {
  background: var(--eb-surface-subtle);
  color: var(--eb-text-muted);
  cursor: not-allowed;
  opacity: 1;
}

.eb-form-control.is-invalid,
.eb-form-select.is-invalid,
.eb-form-control[aria-invalid="true"],
.eb-form-select[aria-invalid="true"] {
  border-color: var(--eb-danger-600);
  background: var(--eb-danger-50);
}

.eb-form-control.is-invalid:focus,
.eb-form-select.is-invalid:focus,
.eb-form-control[aria-invalid="true"]:focus,
.eb-form-select[aria-invalid="true"]:focus {
  border-color: var(--eb-danger-600);
  box-shadow: 0 0 0 4px var(--eb-danger-600-06);
}

.eb-form-control--sm,
.eb-form-select--sm {
  min-height: 2.375rem;
  padding: 0.5rem 0.75rem;
  font-size: var(--eb-type-body-small-size-mobile);
  line-height: var(--eb-type-body-small-line-height);
}

textarea.eb-form-control {
  min-height: 7rem;
  resize: vertical;
}

textarea.eb-form-control.eb-form-control--sm {
  min-height: 5.5rem;
}

.eb-form-select {
  appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3.5 5.25L7 8.75L10.5 5.25' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 0.875rem center;
  background-repeat: no-repeat;
  background-size: 0.875rem;
}

.eb-form-control[type="file"] {
  padding: 0.375rem;
}

.eb-form-control[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: var(--eb-radius-0);
  background: var(--eb-surface-subtle);
  color: var(--eb-text-primary);
  font-family: var(--eb-font-base);
  font-size: var(--eb-type-body-small-size-mobile);
  font-weight: var(--eb-type-button-weight);
  line-height: 1;
  cursor: pointer;
  transition:
    background-color var(--eb-duration-base) var(--eb-ease-standard),
    color var(--eb-duration-base) var(--eb-ease-standard);
}

.eb-form-control[type="file"]::file-selector-button:hover {
  background: var(--eb-bg-hover);
}

.input-group > .eb-form-control,
.input-group > .eb-form-select {
  position: relative;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

.input-group > .eb-form-control:not(:first-child),
.input-group > .eb-form-select:not(:first-child) {
  margin-left: -1px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.input-group > .eb-form-control:not(:last-child),
.input-group > .eb-form-select:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group > .input-group-text {
  border-color: var(--eb-border-default);
  background: var(--eb-surface-subtle);
  color: var(--eb-text-secondary);
}

.input-group:focus-within > .input-group-text {
  border-color: var(--eb-border-focus);
}

.eb-field-hint,
.eb-field-error {
  display: block;
  margin-top: var(--eb-space-2);
  font-size: var(--eb-type-meta-size-mobile);
  line-height: var(--eb-type-meta-line-height);
}

.eb-field-hint {
  color: var(--eb-text-muted);
}

.eb-field-error {
  color: var(--eb-danger-700);
}

.eb-field-error.d-none {
  display: none !important;
}

@keyframes otp-shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}
.otp-shake { animation: otp-shake 0.4s ease; }

/* Phones: fields and selects are 44px tall. */
@media (max-width: 767.98px) {
  .eb-form-control, .eb-form-select, select.form-select, select.eb-form-control { min-height: 44px; }
}
