/* ── Field — design tokens ─────────────────────────────────────────────── */
:root {
    --field-border:          #d1d5db;
    --field-border-hover:    #9ca3af;
    --field-border-focus:    #6366f1;
    --field-border-invalid:  #ef4444;
    --field-border-valid:    #22c55e;
    --field-shadow-focus:    rgba(99, 102, 241, 0.12);
    --field-shadow-invalid:  rgba(239, 68, 68, 0.10);
    --field-radius:          10px;
    --field-padding:         20px 14px 14px;
    --field-bg:              #fff;
    --field-color:           #111827;
    --field-label-color:     #6b7280;
    --field-label-filled:    #374151;
    --field-label-size:      0.72rem;
    --field-placeholder:     #9ca3af;
    --field-font-size:       1rem;
}

/* ── Field — container ───────────────────────────────────────────────────── */
.field {
    position: relative;
    border: 1.5px solid var(--field-border);
    border-radius: var(--field-radius);
    padding: var(--field-padding);
    background: var(--field-bg);
    transition: border-color 150ms ease, box-shadow 150ms ease;
    margin-bottom: 1rem;
}

.field:last-child {
    margin-bottom: 0;
}

/* ── Field — label on the border ─────────────────────────────────────────── */
.field__label {
    position: absolute;
    top: 0;
    left: 12px;
    transform: translateY(-50%);
    background: var(--field-bg);
    padding: 0 4px;
    font-size: var(--field-label-size);
    font-weight: 500;
    color: var(--field-label-color);
    line-height: 1;
    pointer-events: none;
    white-space: nowrap;
    transition: color 150ms ease;
}

/* ── Field — body flex row ───────────────────────────────────────────────── */
.field__body {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Field — content slot ────────────────────────────────────────────────── */
.field__content {
    flex: 1;
    min-width: 0;
}

/* ── Field — inline action button ───────────────────────────────────────── */
.field__action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--field-label-color);
    cursor: pointer;
    border-radius: 6px;
    transition: background 120ms ease, color 120ms ease;
}

.field__action:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--field-color);
}

/* ── Field — input placeholder ──────────────────────────────────────────── */
.field input::placeholder {
    color: var(--field-placeholder);
}

/* ── Field — feedback ────────────────────────────────────────────────────── */
.field__feedback {
    font-size: 0.72rem;
    line-height: 1.4;
    margin-top: 6px;
    display: none;
}
