/*
 * A verb INSIDE a field's surface, filled against the white field: it takes the tint the field does
 * not (`Button secondary`'s ground). No border or shadow; depth is the primary's alone. Two pixels
 * softer than the field's corner, as an offset.
 */
@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;
    /* Its host is a `<button>`, whose UA rule centres strings. */
    text-align: start;
  }

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