/*
 * A verb that lives INSIDE a field's surface, FILLED on a field that is white:
 * the contrast is the whole affordance, and it is a RELATIONSHIP rather than a
 * colour — it takes the tint the field does not, borrowing `Button secondary`'s
 * own ground.
 *
 * NO BORDER and NO SHADOW: the fill alone separates it, and depth belongs to the
 * primary action alone.
 *
 * The corner is TWO PIXELS SOFTER than the field's, written as an offset from
 * that radius so a theme that rounds the field rounds this with it.
 */
@layer theme, base, lotics, components, utilities;
@layer lotics.tokens, lotics.reset, lotics.components;

@layer lotics.components {
  .lotics-inline-button {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: var(--lotics-control-content-height);
    padding-inline: var(--lotics-space-10);
    margin: 0;
    border: 0 solid var(--border);
    border-radius: calc(var(--lotics-radius-control) - var(--lotics-space-2));
    background-color: var(--secondary);
    box-shadow: none;
    appearance: none;
    /* A verb ACTS. */
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color var(--lotics-duration-fast) var(--lotics-ease-standard);
  }

  .lotics-inline-button:not([data-disabled]):hover {
    background-color: var(--lotics-wash-control-hover);
  }

  .lotics-inline-button[data-disabled] {
    opacity: var(--lotics-disabled-opacity);
    cursor: default;
  }

  .lotics-inline-button:focus-visible {
    outline: var(--lotics-ring-width) solid var(--ring);
    outline-offset: 0;
  }

  .lotics-inline-button__label {
    font-family: var(--font-sans);
    font-size: var(--lotics-text-xs);
    line-height: var(--lotics-leading-xs);
    letter-spacing: var(--lotics-tracking-xs);
    font-weight: var(--lotics-weight-medium);
    font-feature-settings: var(--lotics-font-features);
    color: var(--lotics-ink-default);
    white-space: nowrap;
    /* The control it sits in is a `<button>`, whose UA rule centres every string
       inside it — invisible while the verb is content-sized. */
    text-align: start;
  }

  .lotics-inline-button[data-disabled] .lotics-inline-button__label {
    color: var(--lotics-ink-muted);
  }
}
