@layer components {
    .field {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        flex-grow: 1;
    }

    .control {
        cursor: pointer;
        align-items: center;
        background-color: transparent;
        border-color: transparent;
        border-radius: 1.5rem;
        border-width: 0px;
        display: flex;
        flex-direction: row;
        min-height: 3rem;
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .control input,
    .control select,
    .control textarea {
        background-color: transparent;
        border: none;
        color: inherit;
        flex-grow: 1;
        font: inherit;
        height: 1.5rem;
        line-height: 1.5rem;
        margin-block: 0.25rem;
        outline: none;
        padding-inline: 0.5rem;
        transform: translateZ(0);
    }

    .control .leading,
    .control .trailing {
        display: grid;
        color: light-dark(oklch(20% 0% 0deg), oklch(80% 0% 0deg));
        line-height: 1;
        place-content: end;
        align-self: end;
        height: 2rem;
        width: 2rem;
        place-content: center;
    }

    .field__label {
        color: light-dark(oklch(0% 0% 0deg), oklch(100% 0% 0deg));
        font-size: 1rem;
        font-weight: 600;
    }

    .help-text {
        color: light-dark(oklch(20% 0% 0deg), oklch(80% 0% 0deg));
        font-size: 0.875rem;
        font-style: italic;
    }

    .error-text {
        color: oklch(60% 50% 45deg);
        font-size: 0.875rem;
    }
}
