/*
  Input 05 — Amount Input — standalone HTML/CSS/JS implementation.
  No build step, no framework, no external dependency: copy index.html,
  this file, and script.js into any project as-is.
*/

:root {
  --input-accent: #39ff14;
  --input-fg: oklch(0.145 0 0);
  --input-border: oklch(0.87 0 0);
  --input-muted: oklch(0.5 0 0);
  --input-error: oklch(0.58 0.19 20);
}

.amount-field {
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

.amount-field__label {
  display: block;
  margin-bottom: 0.375rem;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--input-fg);
}

.amount-field__shell {
  display: flex;
  height: 3rem;
  align-items: stretch;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--input-border);
  background-color: #ffffff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.amount-field__shell:focus-within {
  border-color: var(--input-fg);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--input-accent) 40%, transparent);
}

.amount-field--error .amount-field__shell {
  border-color: var(--input-error);
}

.amount-field--error .amount-field__shell:focus-within {
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--input-error) 30%, transparent);
}

.amount-field__addon {
  display: flex;
  align-items: center;
  background-color: oklch(0.97 0 0);
  padding: 0 0.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--input-muted);
}

.amount-field__addon--prefix {
  border-right: 1px solid var(--input-border);
}

.amount-field__addon--suffix {
  border-left: 1px solid var(--input-border);
}

.amount-field__control {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0 0.75rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--input-fg);
  outline: none;
}

.amount-field__message {
  margin: 0.375rem 0 0;
  font-size: 0.875rem;
  color: var(--input-muted);
}

.amount-field--error .amount-field__message {
  color: var(--input-error);
}

/*
  Page layout — the canvas this resource is presented on. Adjust or drop it
  when placing the resource inside your own layout.
*/

body {
  margin: 0;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(to bottom, #fafafa, #f4f4f5);
}
.input05-layout {
  display: flex;
  min-height: 20rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.input05-layout__panel {
  display: flex;
  width: 100%;
  max-width: 350px;
  flex-direction: column;
  gap: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #ffffff;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 16px 40px -16px rgba(0, 0, 0, 0.14);
}
