/* Generated by packages/loseta/scripts/generate-docs-css.mjs. Do not edit. */
/* Style: Nova (nova) */
@layer loseta.tokens, loseta.reset, loseta.base, loseta.components, loseta.style, loseta.utilities, docs;

/* Dialog shell */
@layer loseta.style {
  .dialog::backdrop,
  .alert-dialog::backdrop {
    background-color: color-mix(in oklab, #000 10%, transparent);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition-duration: 100ms;
  }

  :is(.dialog, .alert-dialog) > * > footer {
    margin-inline: -1rem;
    margin-bottom: -1rem;
    gap: 0.5rem;
    border-bottom-right-radius: var(--radius-xl);
    border-bottom-left-radius: var(--radius-xl);
    border-top-style: solid;
    border-top-width: 1px;
    border-top-color: var(--border);
    background-color: color-mix(in oklab, var(--muted) 50%, transparent);
    padding: 1rem;
  }
}
/* Menu primitive */
@layer loseta.style {
  [data-popover]:has(> [role='menu']) {
    gap: 0;

    overflow-x: hidden;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    background-color: var(--popover);
    padding: 0.25rem;
    color: var(--popover-foreground);
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent), var(--shadow-md);
    transition-duration: 100ms;
  }

  [data-popover]:has(> [role='menu']):has([role='none'] > [data-popover]) {
    overflow: visible;
  }

  [role='menu'] {
    & :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']) {
      gap: 0.375rem;
      border-radius: var(--radius-md);
      padding-inline: 0.375rem;
      padding-block: 0.25rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);

      &:is(:focus-visible, [aria-expanded='true']) {
        background-color: var(--accent);
        color: var(--accent-foreground);
      }

      & svg {
        width: var(--icon-size, 1rem);
        height: var(--icon-size, 1rem);
      }
    }

    & :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is([data-highlighted], [aria-expanded='true']) {
      background-color: var(--accent);
      color: var(--accent-foreground);
    }

    & :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])[data-variant='destructive'] {
      color: var(--destructive);
    }

    & :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])[data-variant='destructive']:is(:focus-visible, [data-highlighted], [aria-expanded='true']) {
      background-color: light-dark(
        color-mix(in oklab, var(--destructive) 10%, transparent),
        color-mix(in oklab, var(--destructive) 20%, transparent)
      );
      color: var(--destructive);
    }

    & :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])[data-variant='destructive'] svg {
      color: var(--destructive);
    }

    & :is([role='menuitemcheckbox'], [role='menuitemradio']) {
      padding-block: 0.25rem;
      padding-inline-start: 0.375rem;
      padding-inline-end: 2rem;
    }

    & :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'])[data-inset],
    & [role='heading'][data-inset] {
      padding-inline-start: 1.75rem;
    }

    & [data-slot='indicator'] {
      position: absolute;
      inset-inline-end: 0.5rem;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    & [role='heading'] {
      padding-inline: 0.375rem;
      padding-block: 0.25rem;
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);
      font-weight: 500;
      color: var(--muted-foreground);
    }

    & [role='separator'] {
      margin-inline: -0.25rem;
      margin-block: 0.25rem;
      height: 1px;
      background-color: var(--border);
    }

    & :is([data-slot='shortcut'], kbd:last-child, .kbd:last-child) {
      font-family: inherit;
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);
      letter-spacing: 0.1em;
      color: var(--muted-foreground);
    }

    & :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']):is(:focus-visible, [data-highlighted], [aria-expanded='true']) :is([data-slot='shortcut'], kbd:last-child, .kbd:last-child) {
      color: var(--accent-foreground);
    }
  }
}
/* Listbox primitive */
@layer loseta.style {
  [data-popover]:has(> [role='listbox']) {
    gap: 0;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    background-color: var(--popover);
    padding: 0.25rem;
    color: var(--popover-foreground);
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent), var(--shadow-md);
    transition-duration: 100ms;
  }

  [role='listbox'] {
    & [role='option'] {
      gap: 0.375rem;
      border-radius: var(--radius-md);
      padding-inline: 0.375rem;
      padding-inline-end: 1.75rem;
      padding-block: 0.25rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);

      & svg {
        width: 1rem;
        height: 1rem;
      }

      &[aria-selected='true'] {
        font-weight: 500;
      }

      &:hover:not([aria-disabled='true']):not(:disabled),
      &[data-highlighted] {
        background-color: var(--accent);
        color: var(--accent-foreground);
      }

      &[aria-disabled='true'] {
        color: var(--muted-foreground);
      }
    }

    & [data-slot='indicator'] {
      position: absolute;
      inset-inline-end: 0.5rem;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    & [data-slot='label'] {
      padding-inline: 0.375rem;
      padding-block: 0.25rem;
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);
      font-weight: 500;
      color: var(--muted-foreground);
    }

    & [data-slot='empty'] {
      padding-inline: 0.375rem;
      padding-block: 0.5rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      color: var(--muted-foreground);
    }
  }
}
/* Popover primitive */
@layer loseta.style {
  [data-popover] {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    border-radius: var(--radius-lg);
    background-color: var(--popover);
    padding: 0.625rem;
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
    color: var(--popover-foreground);
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent), var(--shadow-md);
    transition-duration: 100ms;
  }
}
/* Alert */
@layer loseta.style {
  .alert {
    background-color: var(--card);
    color: var(--card-foreground);
    display: grid;
    gap: 0.125rem;
    border-radius: var(--radius-lg);
    border-style: solid;
    border-width: 1px;
    border-color: var(--border);
    padding-inline: 0.625rem;
    padding-block: 0.5rem;
    text-align: start;
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);

    &:has(> footer) {
      padding-inline-end: 4.5rem;
    }

    &:has(> svg) {
      grid-template-columns: auto 1fr;
      column-gap: 0.5rem;
    }

    > svg {
      grid-row: span 2 / span 2;
      width: var(--icon-size, 1rem);
      height: var(--icon-size, 1rem);
      translate: 0 0.125rem;
    }

    &[data-variant='destructive'] {
      background-color: var(--card);
      color: var(--destructive);
    }

    > :is(h2, h3, h4, h5, h6, strong, [data-slot='title']),
    &[data-variant='destructive'] > :is(h2, h3, h4, h5, h6, strong, [data-slot='title']) {
      font-weight: 500;
    }

    &:has(> svg) > :is(h2, h3, h4, h5, h6, strong, [data-slot='title']) {
      grid-column-start: 2;
    }

    > section {
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      text-wrap: balance;
      color: var(--muted-foreground);

      @media (width >= 48rem) {
        text-wrap: pretty;
      }
    }

    > [data-slot='description'] {
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      text-wrap: balance;
      color: var(--muted-foreground);

      @media (width >= 48rem) {
        text-wrap: pretty;
      }
    }

    &[data-variant='destructive'] > section {
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      text-wrap: balance;
      color: color-mix(in oklab, var(--destructive) 90%, transparent);

      @media (width >= 48rem) {
        text-wrap: pretty;
      }
    }

    &[data-variant='destructive'] > [data-slot='description'] {
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      text-wrap: balance;
      color: color-mix(in oklab, var(--destructive) 90%, transparent);

      @media (width >= 48rem) {
        text-wrap: pretty;
      }
    }

    > footer,
    &[data-variant='destructive'] > footer {
      inset-inline-end: 0.5rem;
      top: 0.5rem;
    }
  }
}
/* Alert Dialog */
@layer loseta.style {
  .alert-dialog > * {
    display: grid;
    max-width: 20rem;
    gap: 1rem;
    border-radius: var(--radius-xl);
    background-color: var(--popover);
    padding: 1rem;
    color: var(--popover-foreground);
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent);
    transition-duration: 100ms;

    @media (width >= 40rem) {
      max-width: 24rem;
    }
  }

  .alert-dialog:is([data-size='sm']) > *,
  .alert-dialog > [data-size='sm'] {
    @media (width >= 40rem) {
      max-width: 20rem;
    }
  }

  .alert-dialog > * > header {
    column-gap: 1rem;
    row-gap: 0.375rem;
  }

  .alert-dialog > * > header > figure {
    margin-bottom: 0.5rem;
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background-color: var(--muted);

    > svg {
      width: var(--icon-size, 1.5rem);
      height: var(--icon-size, 1.5rem);
    }
  }

  .alert-dialog > * > header > figure[data-variant='destructive'] {
    background-color: light-dark(
      color-mix(in oklab, var(--destructive) 10%, transparent),
      color-mix(in oklab, var(--destructive) 20%, transparent)
    );
    color: var(--destructive);
  }

  .alert-dialog > * > header > h2,
  .alert-dialog > * > [data-slot='title'] {
    font-size: var(--text-base);
    line-height: 1.5;
    font-weight: 500;
  }

  .alert-dialog > * > header > p,
  .alert-dialog > * > [data-slot='description'] {
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
    text-wrap: balance;
    color: var(--muted-foreground);

    @media (width >= 48rem) {
      text-wrap: pretty;
    }

    & a {
      text-decoration-line: underline;
      text-underline-offset: 3px;
    }

    & a:hover {
      color: var(--foreground);
    }
  }
}
/* Badge */
@layer loseta.style {
  .badge {
    height: 1.25rem;
    gap: 0.25rem;
    border-radius: var(--radius-4xl);
    border-style: solid;
    border-width: 1px;
    border-color: transparent;
    padding-inline: 0.5rem;
    padding-block: 0.125rem;
    font-size: var(--text-xs);
    line-height: var(--text-xs--line-height);
    font-weight: 500;
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;

    > svg {
      width: var(--icon-size, 0.75rem);
      height: var(--icon-size, 0.75rem);
    }

    &:not([data-variant]),
    &[data-variant='primary'] {
      background-color: var(--primary);
      color: var(--primary-foreground);

      &:is(a):hover {
        background-color: color-mix(in oklab, var(--primary) 80%, transparent);
      }
    }

    &[data-variant='secondary'] {
      background-color: var(--secondary);
      color: var(--secondary-foreground);

      &:is(a):hover {
        background-color: color-mix(in oklab, var(--secondary) 80%, transparent);
      }
    }

    &[data-variant='outline'] {
      border-color: var(--border);
      color: var(--foreground);

      &:is(a):hover {
        background-color: var(--muted);
        color: var(--muted-foreground);
      }
    }

    &[data-variant='destructive'] {
      background-color: light-dark(
        color-mix(in oklab, var(--destructive) 10%, transparent),
        color-mix(in oklab, var(--destructive) 20%, transparent)
      );
      color: var(--destructive);

      &:is(a):hover {
        background-color: color-mix(in oklab, var(--destructive) 20%, transparent);
      }
    }

    &[data-variant='ghost'] {
      &:hover {
        background-color: light-dark(
          var(--muted),
          color-mix(in oklab, var(--muted) 50%, transparent)
        );
        color: var(--muted-foreground);
      }
    }

    &[data-variant='link'] {
      color: var(--primary);
      text-underline-offset: 4px;

      &:hover {
        text-decoration-line: underline;
      }
    }
  }
}
/* Button */
@layer loseta.style {
  .btn {
    border-radius: var(--radius-lg);
    border-style: solid;
    border-width: 1px;
    border-color: transparent;
    background-clip: padding-box;
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
    font-weight: 500;

    &:focus-visible {
      border-color: var(--ring);
      box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
    }

    &:active:not([aria-haspopup]) {
      translate: 0 1px;
    }

    &[aria-invalid='true'] {
      border-color: light-dark(
        var(--destructive),
        color-mix(in oklab, var(--destructive) 50%, transparent)
      );
      box-shadow: 0 0 0 3px light-dark(
        color-mix(in oklab, var(--destructive) 20%, transparent),
        color-mix(in oklab, var(--destructive) 40%, transparent)
      );
    }

    & svg {
      width: var(--icon-size, 1rem);
      height: var(--icon-size, 1rem);
    }

    &:not([data-size]),
    &[data-size='default'] {
      height: 2rem;
      gap: 0.375rem;
      padding-inline: 0.625rem;

      &:has(*:is([data-icon='inline-end'])) {
        padding-inline-end: 0.5rem;
      }

      &:has(*:is([data-icon='inline-start'])) {
        padding-inline-start: 0.5rem;
      }
    }

    &[data-size='xs'] {
      --icon-size: 0.75rem;

      height: 1.5rem;
      gap: 0.25rem;
      border-radius: min(var(--radius-md), 10px);
      padding-inline: 0.5rem;
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);

      &:has(*:is([data-icon='inline-end'])) {
        padding-inline-end: 0.375rem;
      }

      &:has(*:is([data-icon='inline-start'])) {
        padding-inline-start: 0.375rem;
      }
    }

    &[data-size='sm'] {
      --icon-size: 0.875rem;

      height: 1.75rem;
      gap: 0.25rem;
      border-radius: min(var(--radius-md), 12px);
      padding-inline: 0.625rem;
      font-size: 0.8rem;
      line-height: inherit;

      &:has(*:is([data-icon='inline-end'])) {
        padding-inline-end: 0.375rem;
      }

      &:has(*:is([data-icon='inline-start'])) {
        padding-inline-start: 0.375rem;
      }
    }

    &[data-size='lg'] {
      height: 2.25rem;
      gap: 0.375rem;
      padding-inline: 0.625rem;

      &:has(*:is([data-icon='inline-end'])) {
        padding-inline-end: 0.5rem;
      }

      &:has(*:is([data-icon='inline-start'])) {
        padding-inline-start: 0.5rem;
      }
    }

    &[data-size='icon'] {
      width: 2rem;
      height: 2rem;
    }

    &[data-size='icon-xs'] {
      --icon-size: 0.75rem;

      width: 1.5rem;
      height: 1.5rem;
      border-radius: min(var(--radius-md), 10px);
    }

    &[data-size='icon-sm'] {
      width: 1.75rem;
      height: 1.75rem;
      border-radius: min(var(--radius-md), 12px);
    }

    &[data-size='icon-lg'] {
      width: 2.25rem;
      height: 2.25rem;
    }

    &:not([data-variant]),
    &[data-variant='primary'],
    &[data-variant='default'] {
      background-color: var(--primary);
      color: var(--primary-foreground);

      &:hover {
        background-color: color-mix(in oklab, var(--primary) 80%, transparent);
      }
    }

    &[data-variant='secondary'] {
      background-color: var(--secondary);
      color: var(--secondary-foreground);

      &:hover {
        background-color: color-mix(in oklch, var(--secondary), var(--foreground) 5%);
      }

      &[aria-expanded='true'] {
        background-color: var(--secondary);
        color: var(--secondary-foreground);
      }
    }

    &[data-variant='outline'] {
      border-color: light-dark(var(--border), var(--input));
      background-color: light-dark(
        var(--background),
        color-mix(in oklab, var(--input) 30%, transparent)
      );

      &[aria-expanded='true'] {
        background-color: light-dark(
          var(--muted),
          color-mix(in oklab, var(--input) 30%, transparent)
        );
        color: var(--foreground);
      }

      &:hover {
        background-color: light-dark(
          var(--muted),
          color-mix(in oklab, var(--input) 50%, transparent)
        );
        color: var(--foreground);
      }
    }

    &[data-variant='ghost'] {
      &[aria-expanded='true'] {
        background-color: var(--muted);
        color: var(--foreground);
      }

      &:hover {
        background-color: light-dark(
          var(--muted),
          color-mix(in oklab, var(--muted) 50%, transparent)
        );
        color: var(--foreground);
      }
    }

    &[data-variant='link'] {
      color: var(--primary);
      text-underline-offset: 4px;

      &:hover {
        text-decoration-line: underline;
      }
    }

    &[data-variant='destructive'] {
      background-color: light-dark(
        color-mix(in oklab, var(--destructive) 10%, transparent),
        color-mix(in oklab, var(--destructive) 20%, transparent)
      );
      color: var(--destructive);

      &:hover {
        background-color: light-dark(
          color-mix(in oklab, var(--destructive) 20%, transparent),
          color-mix(in oklab, var(--destructive) 30%, transparent)
        );
      }

      &:focus-visible {
        border-color: color-mix(in oklab, var(--destructive) 40%, transparent);
      }
    }
  }
}
/* Button Group */
@layer loseta.style {
  .btn-group {
    &:has(>.btn-group) {
      gap: 0.5rem;
    }

    /* .btn defines its radius and border in this layer, so the group has to
       merge its children here as well; component-layer rules would lose. */
    &:not([data-orientation='vertical']) {
      > :not(:first-child),
      > :is(.dropdown-menu, .popover, .select):not(:first-child) > button {
        border-start-start-radius: 0;
        border-end-start-radius: 0;
        border-inline-start-width: 0;
      }

      > :not(:last-child),
      > :is(.dropdown-menu, .popover, .select):not(:last-child) > button {
        border-start-end-radius: 0;
        border-end-end-radius: 0;
      }
    }

    &[data-orientation='vertical'] {
      > :not(:first-child),
      > :is(.dropdown-menu, .popover, .select):not(:first-child) > button {
        border-start-start-radius: 0;
        border-start-end-radius: 0;
        border-block-start-width: 0;
      }

      > :not(:last-child),
      > :is(.dropdown-menu, .popover, .select):not(:last-child) > button {
        border-end-end-radius: 0;
        border-end-start-radius: 0;
      }
    }

    > :is(span, label, output) {
      gap: 0.5rem;
      border-radius: var(--radius-lg);
      border-style: solid;
      border-width: 1px;
      border-color: var(--border);
      background-color: var(--muted);
      padding-inline: 0.625rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      font-weight: 500;

      & svg {
        width: var(--icon-size, 1rem);
        height: var(--icon-size, 1rem);
      }
    }

    > hr[role='separator'] {
      background-color: var(--input);
    }
  }
}
/* Card */
@layer loseta.style {
  .card {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background-color: var(--card);
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
    color: var(--card-foreground);
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent);

    > img:first-child {
      border-top-left-radius: var(--radius-xl);
      border-top-right-radius: var(--radius-xl);
    }

    > img:last-child {
      border-bottom-right-radius: var(--radius-xl);
      border-bottom-left-radius: var(--radius-xl);
    }

    &:not([data-size]),
    &[data-size='default'] {
      gap: 1rem;
      padding-block: 1rem;
    }

    &[data-size='sm'] {
      gap: 0.75rem;
      padding-block: 0.75rem;
    }

    &:is(:not([data-size]), [data-size]):has(> footer) {
      padding-bottom: 0;
    }

    &:is(:not([data-size]), [data-size]):has(> img:first-child) {
      padding-top: 0;
    }

    > header {
      gap: 0.25rem;
      border-top-left-radius: var(--radius-xl);
      border-top-right-radius: var(--radius-xl);
      padding-inline: 1rem;

      &[data-separator='bottom'] {
        border-bottom-style: solid;
        border-bottom-width: 1px;
        border-bottom-color: var(--border);
        padding-bottom: 1rem;
      }
    }

    &[data-size='sm'] > header {
      padding-inline: 0.75rem;

      &[data-separator='bottom'] {
        padding-bottom: 0.75rem;
      }
    }

    > header > :is(h2, h3, [data-slot='title'], .card-title) {
      font-size: var(--text-base);
      line-height: 1.375;
      font-weight: 500;
    }

    &[data-size='sm'] > header > :is(h2, h3, [data-slot='title'], .card-title) {
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
    }

    > header > :is(p, [data-slot='description'], .card-description) {
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      color: var(--muted-foreground);
    }

    > section {
      padding-inline: 1rem;
    }

    &[data-size='sm'] > section {
      padding-inline: 0.75rem;
    }

    > footer {
      border-bottom-right-radius: var(--radius-xl);
      border-bottom-left-radius: var(--radius-xl);
      border-top-style: solid;
      border-top-width: 1px;
      border-top-color: var(--border);
      background-color: color-mix(in oklab, var(--muted) 50%, transparent);
      padding: 1rem;
    }

    &[data-size='sm'] > footer {
      padding: 0.75rem;
    }
  }
}
/* Checkbox */
@layer loseta.style {
  .checkbox:not([role='switch']) {
    display: flex;
    width: 1rem;
    height: 1rem;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border-style: solid;
    border-width: 1px;
    border-color: var(--input);
    background-color: light-dark(
      transparent,
      color-mix(in oklab, var(--input) 30%, transparent)
    );
    transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;

    &:checked {
      border-color: var(--primary);
      background-color: var(--primary);
      color: var(--primary-foreground);
    }

    &:focus-visible {
      border-color: var(--ring);
      box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
    }

    &[aria-invalid='true'] {
      border-color: light-dark(
        var(--destructive),
        color-mix(in oklab, var(--destructive) 50%, transparent)
      );
      box-shadow: 0 0 0 3px light-dark(
        color-mix(in oklab, var(--destructive) 20%, transparent),
        color-mix(in oklab, var(--destructive) 40%, transparent)
      );

      &:checked {
        border-color: var(--primary);
      }
    }
  }

  .checkbox:not([role='switch']):checked::after {
    width: 0.875rem;
    height: 0.875rem;
  }

  .checkbox:not([role='switch']):indeterminate::after {
    width: 0.5rem;
    height: 2px;
    border-radius: var(--radius-full);
  }
}
/* Code Block */
@layer loseta.style {
  .code-block {
    border-radius: var(--radius-xl);
    background-color: var(--muted);
    color: var(--foreground);
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
    box-shadow: 0 0 0 1px light-dark(
      color-mix(in oklab, var(--foreground) 5%, transparent),
      color-mix(in oklab, var(--foreground) 10%, transparent)
    );

    &[data-size='sm'] {
      border-radius: var(--radius-lg);
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);
    }

    &[data-variant='destructive'] {
      background-color: light-dark(
        color-mix(in oklab, var(--destructive) 5%, transparent),
        color-mix(in oklab, var(--destructive) 10%, transparent)
      );
      color: var(--destructive);
      box-shadow: 0 0 0 1px light-dark(
        color-mix(in oklab, var(--destructive) 15%, transparent),
        color-mix(in oklab, var(--destructive) 20%, transparent)
      );
    }

    &:has(> pre:focus-visible) {
      outline-style: solid;
      outline-width: 1px;
      outline-color: var(--ring);
      outline-offset: 0;
      box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
    }

    > header {
      padding: 1rem 1rem 0;
      color: var(--muted-foreground);

      > [data-slot='title'] {
        font-size: var(--text-sm);
        line-height: var(--text-sm--line-height);
        font-weight: 500;
        color: var(--foreground);

        > svg {
          display: inline-block;
          width: var(--icon-size, 1rem);
          height: var(--icon-size, 1rem);
          margin-inline-end: 0.375rem;
          vertical-align: -0.125rem;
        }
      }
    }

    &[data-size='sm'] > header {
      padding: 0.75rem 0.75rem 0;

      > [data-slot='title'] {
        font-size: var(--text-xs);
        line-height: var(--text-xs--line-height);
      }
    }

    &[data-variant='destructive'] > header {
      color: var(--destructive);

      > [data-slot='title'] {
        color: var(--destructive);
      }
    }

    > header > [data-slot='actions'] > .btn:hover {
      background-color: light-dark(
        color-mix(in oklab, var(--foreground) 5%, transparent),
        color-mix(in oklab, var(--foreground) 10%, transparent)
      );
    }

    > [data-slot='actions'] {
      inset-block-start: 0.75rem;
      inset-inline-end: 0.75rem;

      > .btn {
        background-color: var(--background);
        color: var(--muted-foreground);
        box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent);

        &:hover {
          background-color: var(--background);
          color: var(--foreground);
        }

        &:focus-visible {
          box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
        }
      }
    }

    &[data-size='sm'] > [data-slot='actions'] {
      inset-block-start: 0.5rem;
      inset-inline-end: 0.5rem;
    }

    > pre {
      padding: 1rem;
      font-family:
        var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace);
      font-size: inherit;
      line-height: 1.6;
      font-variant-ligatures: none;
      tab-size: 2;
    }

    > header + pre {
      padding-block-start: 0.5rem;
    }

    &:has(> footer) > pre {
      padding-block-end: 0.5rem;
    }

    &[data-size='sm'] > pre {
      padding: 0.75rem;
    }

    &[data-size='sm'] > header + pre {
      padding-block-start: 0.375rem;
    }

    &[data-size='sm']:has(> footer) > pre {
      padding-block-end: 0.375rem;
    }

    > pre > code > [data-slot='line'] {
      margin-inline: -1rem;
      padding-inline: 1rem;
    }

    &[data-size='sm'] > pre > code > [data-slot='line'] {
      margin-inline: -0.75rem;
      padding-inline: 0.75rem;
    }

    > pre[data-line-numbers] > code > [data-slot='line']::before {
      color: var(--muted-foreground);
      font-variant-numeric: tabular-nums;
    }

    > pre > code > [data-slot='line'][data-variant='added'],
    > pre > code > [data-slot='line'][data-variant='highlighted'] {
      background-color: light-dark(
        color-mix(in oklab, var(--foreground) 5%, transparent),
        color-mix(in oklab, var(--foreground) 10%, transparent)
      );
    }

    > pre > code > [data-slot='line'][data-variant='removed'] {
      background-color: light-dark(
        color-mix(in oklab, var(--destructive) 10%, transparent),
        color-mix(in oklab, var(--destructive) 15%, transparent)
      );
    }

    > pre > code > [data-slot='line'][data-variant='added'] > [data-slot='line-content']::before {
      color: var(--muted-foreground);
    }

    > pre > code > [data-slot='line'][data-variant='removed'] > [data-slot='line-content']::before {
      color: var(--destructive);
    }

    > footer {
      padding: 0 1rem 1rem;
      color: var(--muted-foreground);
    }

    &[data-size='sm'] > footer {
      padding: 0 0.75rem 0.75rem;
    }
  }
}
/* Dialog */
@layer loseta.style {
  .dialog > * {
    max-width: calc(100% - 2rem);
    gap: 1rem;
    border-radius: var(--radius-xl);
    background-color: var(--popover);
    padding: 1rem;
    display: grid;
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
    color: var(--popover-foreground);
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent);
    transition-duration: 100ms;

    @media (width >= 40rem) {
      max-width: 24rem;
    }
  }

  .dialog > * > :is(button, form[method='dialog']) {
    inset-inline-end: 0.5rem;
    top: 0.5rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: min(var(--radius-md), 12px);
    border-style: solid;
    border-width: 1px;
    border-color: transparent;
    opacity: 100%;

    &:hover {
      background-color: var(--muted);
      color: var(--foreground);
    }
  }

  .dialog > * > header {
    gap: 0.5rem;
  }

  .dialog > * > header > h2,
  .dialog > * > [data-slot='title'] {
    font-size: var(--text-base);
    line-height: 1;
    font-weight: 500;
  }

  .dialog > * > header > p,
  .dialog > * > [data-slot='description'] {
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
    color: var(--muted-foreground);

    & a {
      text-decoration-line: underline;
      text-underline-offset: 3px;
    }

    & a:hover {
      color: var(--foreground);
    }
  }
}
/* Dropdown Menu */
@layer loseta.style {
  .dropdown-menu {
    > [data-popover] {
      width: max(8rem, 100%);
    }
  }
}
/* Empty */
@layer loseta.style {
  .empty {
    gap: 1rem;
    border-radius: var(--radius-xl);
    border-style: dashed;
    border-color: var(--border);
    border-width: 1px;
    padding: 1.5rem;

    > header {
      gap: 0.5rem;
    }

    figure:has(> svg:only-child) {
      display: flex;
      width: 2rem;
      height: 2rem;
      margin-block-end: 0.5rem;
      flex-shrink: 0;
      align-items: center;
      justify-content: center;
      border-radius: var(--radius-lg);
      background-color: var(--muted);
      color: var(--foreground);

      & svg {
        width: var(--icon-size, 1rem);
        height: var(--icon-size, 1rem);
      }
    }

    :is(h2, h3, h4) {
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      font-weight: 500;
      letter-spacing: -0.025em;
    }

    > header > p {
      font-size: var(--text-sm);
      line-height: 1.625;
      color: var(--muted-foreground);
    }

    > :is(section, footer) {
      gap: 0.625rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
    }
  }
}
/* Field */
@layer loseta.style {
  .fieldset {
    gap: 1rem;

    &:has(> [data-slot='checkbox-group']) {
      gap: 0.75rem;
    }

    &:has(> [data-slot='radio-group']) {
      gap: 0.75rem;
    }
  }

  .fieldset > legend {
    margin-bottom: 0.375rem;
    font-weight: 500;

    &[data-variant='label'] {
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
    }

    &[data-variant='legend'] {
      font-size: var(--text-base);
      line-height: 1.5;
    }
  }

  .fieldset > :is([role='group'], [role='radiogroup']):not(.field),
  .field > :is(fieldset, [role='group'], [role='radiogroup']):not(.field) {
    gap: 1.25rem;

    &[role='radiogroup'],
    &:has(> .field > .checkbox),
    &:has(> .field > .radio),
    &[data-slot='checkbox-group'],
    &[data-slot='radio-group'] {
      gap: 0.75rem;
    }
  }

  :is(.fieldset, .field) > :is([role='group'], [role='radiogroup']):not(.field) > :is([role='group'], [role='radiogroup']):not(.field),
  .field > fieldset:not(.field) > :is([role='group'], [role='radiogroup']):not(.field) {
    gap: 1rem;
  }

  .field {
    gap: 0.5rem;

    &[aria-invalid='true'],
    &:has([aria-invalid='true']) {
      color: var(--destructive);
    }
  }

  .field > section {
    gap: 0.125rem;
  }

  .field h2,
  .field h3 {
    gap: 0.5rem;
    font-size: var(--text-sm);
    line-height: 1.375;
    font-weight: 500;

    :where([aria-disabled='true']) & {
      opacity: 50%;
    }
  }

  .fieldset legend + p,
  .field > p,
  .field section > p {
    text-align: start;
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--muted-foreground);

    [data-variant='legend'] + & {
      margin-top: -0.375rem;
    }
  }

  .fieldset > legend[data-variant='label'] {
    margin-bottom: 0;
  }

  .fieldset > legend:not([data-variant]) + p,
  .fieldset > legend[data-variant='legend'] + p {
    margin-top: -0.375rem;
  }

  .field-separator {
    margin-block: -0.5rem;
    height: 1.25rem;
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);

    :where(*[data-variant='outline']) & {
      margin-bottom: -0.5rem;
    }

    > hr {
      border-color: var(--border);
    }
  }

  .field-separator > span {
    padding-inline: 0.5rem;
    color: var(--muted-foreground);
  }

  .field [role='alert']:not(.alert) {
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
    color: var(--destructive);
  }
}
/* Input */
@layer loseta.style {
  .input {
    height: 2rem;
    border-radius: var(--radius-lg);
    border-style: solid;
    border-width: 1px;
    border-color: var(--input);
    background-color: light-dark(
      transparent,
      color-mix(in oklab, var(--input) 30%, transparent)
    );
    padding-inline: 0.625rem;
    padding-block: 0.25rem;
    font-size: var(--text-base);
    line-height: 1.5;
    transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;

    &::selection {
      background-color: var(--primary);
      color: var(--primary-foreground);
    }

    &::file-selector-button {
      height: 1.5rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      font-weight: 500;
    }

    &:focus-visible {
      border-color: var(--ring);
      box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
    }

    &:disabled {
      background-color: light-dark(
        color-mix(in oklab, var(--input) 50%, transparent),
        color-mix(in oklab, var(--input) 80%, transparent)
      );
    }

    &[aria-invalid='true'] {
      border-color: light-dark(
        var(--destructive),
        color-mix(in oklab, var(--destructive) 50%, transparent)
      );
      box-shadow: 0 0 0 3px light-dark(
        color-mix(in oklab, var(--destructive) 20%, transparent),
        color-mix(in oklab, var(--destructive) 40%, transparent)
      );
    }

    @media (width >= 48rem) {
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
    }
  }
}
/* Item */
@layer loseta.style {
  .item {
    border-radius: var(--radius-lg);
    border-style: solid;
    border-width: 1px;
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);

    &:focus-visible {
      border-color: var(--ring);
      box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
    }

    &:is(a):hover {
      background-color: var(--muted);
    }

    &:not([data-variant]),
    &[data-variant='default'] {
      border-color: transparent;
    }

    &[data-variant='outline'] {
      border-color: var(--border);
    }

    &[data-variant='muted'] {
      border-color: transparent;
      background-color: color-mix(in oklab, var(--muted) 50%, transparent);
    }

    &:not([data-size]),
    &[data-size='default'] {
      gap: 0.625rem;
      padding-inline: 0.75rem;
      padding-block: 0.625rem;
    }

    &[data-size='sm'] {
      gap: 0.625rem;
      padding-inline: 0.75rem;
      padding-block: 0.625rem;
    }

    &[data-size='xs'] {
      gap: 0.5rem;
      padding-inline: 0.625rem;
      padding-block: 0.5rem;
    }

    > figure {
      gap: 0.5rem;
    }

    &:has(p) > figure {
      translate: 0 0.125rem;
      align-self: flex-start;
    }

    > figure:has(> svg:only-child) {
      & svg {
        width: var(--icon-size, 1rem);
        height: var(--icon-size, 1rem);
      }
    }

    > figure:has(> img) {
      width: 2.5rem;
      height: 2.5rem;
      overflow: hidden;
      border-radius: var(--radius-sm);
    }

    &[data-size='sm'] > figure:has(> img) {
      width: 2rem;
      height: 2rem;
    }

    &[data-size='xs'] > figure:has(> img) {
      width: 1.5rem;
      height: 1.5rem;
    }

    > section {
      gap: 0.25rem;
    }

    &[data-size='xs'] > section {
      gap: 0;
    }

    :is(h2, h3, h4) {
      gap: 0.5rem;
      font-size: var(--text-sm);
      line-height: 1.375;
      font-weight: 500;
      text-underline-offset: 4px;
    }

    p {
      font-size: var(--text-sm);
      line-height: 1.5;
    }

    &[data-size='xs'] p {
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);
    }

    > aside,
    > :is(header, footer) {
      gap: 0.5rem;
    }
  }

  .item-group {
    gap: 1rem;

    &:has(> .item[data-size='sm']) {
      gap: 0.625rem;
    }

    &:has(> .item[data-size='xs']) {
      gap: 0.5rem;
    }

    > hr {
      margin-block: 0.5rem;
      border-color: var(--border);
    }
  }
}
/* Kbd */
@layer loseta.style {
  .kbd {
    height: 1.25rem;
    width: fit-content;
    min-width: 1.25rem;
    gap: 0.25rem;
    border-radius: var(--radius-sm);
    background-color: var(--muted);
    padding-inline: 0.25rem;
    font-family: inherit;
    font-size: var(--text-xs);
    line-height: var(--text-xs--line-height);
    font-weight: 500;
    color: var(--foreground);

    & svg {
      width: var(--icon-size, 0.75rem);
      height: var(--icon-size, 0.75rem);
    }
  }
}
/* Label */
@layer loseta.style {
  :is(.field > label, .field > section > label, label:has(> .field), .label) {
    gap: 0.5rem;
    font-size: var(--text-sm);
    font-weight: 500;

    &:has(> :disabled),
    &:has(+ :disabled),
    &:has(~ :disabled),
    :where([aria-disabled='true']) & {
      opacity: 50%;
    }
  }

  :is(.field > label, .field > section > label, label:has(> .field)) {
    line-height: 1.375;
  }

  .label {
    line-height: 1;
  }

  :is(.field > label, label:has(> .field)):has(> .field) {
    border-radius: var(--radius-lg);
    border-style: solid;
    border-width: 1px;
    border-color: var(--border);

    &:has(*:is(:checked)) {
      border-color: light-dark(
        color-mix(in oklab, var(--primary) 30%, transparent),
        color-mix(in oklab, var(--primary) 20%, transparent)
      );
      background-color: light-dark(
        color-mix(in oklab, var(--primary) 5%, transparent),
        color-mix(in oklab, var(--primary) 10%, transparent)
      );

      p:not([role='alert']) {
        color: var(--foreground);
      }
    }

    &:has(:focus-visible) {
      border-color: var(--ring);
      box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
    }

    &:not(:has(:disabled, [aria-disabled='true'])):hover {
      background-color: color-mix(in oklab, var(--muted) 50%, transparent);
    }
  }

  :is(.field > label, label:has(> .field)) > .field {
    padding: 0.625rem;
  }

  :is(.field > label, label:has(> .field)):has(> .field) :is(.checkbox, .radio, .switch):focus-visible {
    box-shadow: none;
  }

  :is(.field > label, label:has(> .field)):has(> .field) :is(.checkbox, .radio):focus-visible:not(:checked) {
    border-color: var(--input);
  }

  :is(.field > label, label:has(> .field)):has(> .field) :is(.checkbox, .radio):focus-visible:checked {
    border-color: var(--primary);
  }

  :is(.field > label, label:has(> .field)):has(> .field) .switch:focus-visible {
    border-color: transparent;
  }
}
/* Native Select */
@layer loseta.style {
  .native-select {
    height: 2rem;
    width: fit-content;
    border-radius: var(--radius-lg);
    border-style: solid;
    border-width: 1px;
    border-color: var(--input);
    background-color: light-dark(
      transparent,
      color-mix(in oklab, var(--input) 30%, transparent)
    );
    padding-block: 0.25rem;
    padding-inline-start: 0.625rem;
    padding-inline-end: 2rem;
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
    transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;

    & *::selection {
      background-color: var(--primary);
      color: var(--primary-foreground);
    }

    &::selection {
      background-color: var(--primary);
      color: var(--primary-foreground);
    }

    &::placeholder {
      color: var(--muted-foreground);
    }

    &:focus-visible {
      border-color: var(--ring);
      box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
    }

    &[aria-invalid='true'] {
      border-color: light-dark(
        var(--destructive),
        color-mix(in oklab, var(--destructive) 50%, transparent)
      );
      box-shadow: 0 0 0 3px light-dark(
        color-mix(in oklab, var(--destructive) 20%, transparent),
        color-mix(in oklab, var(--destructive) 40%, transparent)
      );
    }

    &:hover {
      background-color: light-dark(
        transparent,
        color-mix(in oklab, var(--input) 50%, transparent)
      );
    }

    &[data-size='sm'] {
      height: 1.75rem;
      border-radius: min(var(--radius-md), 10px);
      padding-block: 0.125rem;
    }

    background-image: var(--chevron-down-icon);
    background-size: 1rem;
    background-position: center right 0.625rem;
    background-repeat: no-repeat;
  }

  .native-select:dir(rtl) {
    background-position: center left 0.625rem;
  }
}
/* Popover */
@layer loseta.style {
  .popover > [data-popover] {
    width: 18rem;
  }

  .popover > [data-popover] > header,
  .popover > [data-popover] > [data-slot='header'] {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
  }

  .popover > [data-popover] > header > :is(h1, h2, h3, h4, h5, h6),
  .popover > [data-popover] > :is(h1, h2, h3, h4, h5, h6, [data-slot='title']) {
    font-weight: 500;
  }

  .popover > [data-popover] > header > p,
  .popover > [data-popover] > [data-slot='description'] {
    color: var(--muted-foreground);
  }
}
/* Radio */
@layer loseta.style {
  .radio {
    display: flex;
    width: 1rem;
    height: 1rem;
    border-radius: var(--radius-full);
    border-color: var(--input);
    background-color: light-dark(
      transparent,
      color-mix(in oklab, var(--input) 30%, transparent)
    );
    transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;

    &:checked {
      border-color: var(--primary);
      background-color: var(--primary);
      color: var(--primary-foreground);
    }

    &:focus-visible {
      border-color: var(--ring);
      box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
    }

    &[aria-invalid='true'] {
      border-color: light-dark(
        var(--destructive),
        color-mix(in oklab, var(--destructive) 50%, transparent)
      );
      box-shadow: 0 0 0 3px light-dark(
        color-mix(in oklab, var(--destructive) 20%, transparent),
        color-mix(in oklab, var(--destructive) 40%, transparent)
      );

      &:checked {
        border-color: var(--primary);
      }
    }
  }

  .radio:checked::before {
    width: 0.5rem;
    height: 0.5rem;
  }
}
/* Skeleton */
@layer loseta.style {
  .skeleton {
    border-radius: var(--radius-md);
    background-color: var(--muted);
  }
}
/* Switch */
@layer loseta.style {
  .switch {
    border-radius: var(--radius-full);
    border-style: solid;
    border-width: 1px;
    border-color: transparent;

    &:not(:checked) {
      background-color: light-dark(
        var(--input),
        color-mix(in oklab, var(--input) 80%, transparent)
      );
    }

    &:checked {
      background-color: var(--primary);
    }

    &:focus-visible {
      border-color: var(--ring);
      box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
    }

    &[aria-invalid='true'] {
      border-color: light-dark(
        var(--destructive),
        color-mix(in oklab, var(--destructive) 50%, transparent)
      );
      box-shadow: 0 0 0 3px light-dark(
        color-mix(in oklab, var(--destructive) 20%, transparent),
        color-mix(in oklab, var(--destructive) 40%, transparent)
      );
    }

    &:not([data-size='sm']) {
      height: 18.4px;
      width: 32px;
    }

    &[data-size='sm'] {
      height: 14px;
      width: 24px;
    }

    &::before {
      border-radius: var(--radius-full);
      background-color: light-dark(var(--background), var(--foreground));
    }

    &:checked::before {
      background-color: light-dark(var(--background), var(--primary-foreground));
    }

    &:not([data-size='sm'])::before {
      width: 1rem;
      height: 1rem;
    }

    &[data-size='sm']::before {
      width: 0.75rem;
      height: 0.75rem;
    }

    &:checked:not([data-size='sm'])::before {
      translate: calc(100% - 2px);
    }

    &:checked[data-size='sm']::before {
      translate: calc(100% - 2px);
    }

    &:dir(rtl):checked:not([data-size='sm'])::before {
      translate: calc(calc(100% - 2px) * -1);
    }

    &:dir(rtl):checked[data-size='sm']::before {
      translate: calc(calc(100% - 2px) * -1);
    }

    @media (forced-colors: active) {
      border-color: ButtonText;

      &:not(:checked) {
        background-color: ButtonFace;
      }

      &::before {
        background-color: ButtonText;
      }

      &:checked {
        border-color: Highlight;
        background-color: Highlight;
      }

      &:checked::before {
        background-color: HighlightText;
      }

      &:disabled {
        border-color: GrayText;

        &::before {
          background-color: GrayText;
        }
      }
    }
  }
}
/* Table */
@layer loseta.style {
  .table {
    width: 100%;
    caption-side: bottom;
    color: var(--foreground);
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);

    thead {
      & tr {
        border-bottom-style: solid;
        border-bottom-width: 1px;
      }
    }

    tbody {
      & tr:last-child {
        border-style: solid;
        border-width: 0px;
      }
    }

    tfoot {
      border-top-style: solid;
      border-top-width: 1px;
      border-top-color: var(--border);
      background-color: color-mix(in oklab, var(--muted) 50%, transparent);
      font-weight: 500;

      > tr {
        &:last-child {
          border-bottom-style: solid;
          border-bottom-width: 0px;
        }
      }
    }

    tr {
      border-bottom-style: solid;
      border-bottom-width: 1px;
      border-bottom-color: var(--border);
      transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;

      &:hover {
        background-color: color-mix(in oklab, var(--muted) 50%, transparent);
      }

      &:has([aria-expanded='true']) {
        background-color: color-mix(in oklab, var(--muted) 50%, transparent);
      }

      &[aria-selected='true'] {
        background-color: var(--muted);
      }
    }

    th {
      height: 2.5rem;
      padding: 0 0.5rem;
      text-align: start;
      vertical-align: middle;
      font-weight: 500;
      white-space: nowrap;
      color: var(--foreground);

      &:has(:is([role='checkbox'], input[type='checkbox'])) {
        padding-inline-end: 0;
      }
    }

    td {
      padding: 0.5rem;
      vertical-align: middle;
      white-space: nowrap;

      &:has(:is([role='checkbox'], input[type='checkbox'])) {
        padding-inline-end: 0;
      }
    }

    caption {
      margin-top: 1rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      color: var(--muted-foreground);
    }
  }
}
/* Tabs */
@layer loseta.style {
  .tabs {
    gap: 0.5rem;

    > [role='tablist'] {
      height: 2rem;
      border-radius: var(--radius-lg);
      padding: 3px;

      &:not([data-variant='line']) {
        background-color: var(--muted);
      }

      &[data-variant='line'] {
        gap: 0.25rem;
        border-radius: 0;
        background-color: transparent;
      }

      &[aria-orientation='vertical'] {
        height: fit-content;
      }

      > [role='tab'] {
        height: calc(100% - 1px);
        gap: 0.375rem;
        border-radius: var(--radius-md);
        border-style: solid;
        border-width: 1px;
        border-color: transparent;
        padding-inline: 0.375rem;
        padding-block: 0.125rem;
        font-size: var(--text-sm);
        line-height: var(--text-sm--line-height);
        font-weight: 500;
        color: light-dark(
          color-mix(in oklab, var(--foreground) 60%, transparent),
          var(--muted-foreground)
        );

        &:hover {
          color: var(--foreground);
        }

        &:focus-visible {
          border-color: var(--ring);
          box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
          outline-style: solid;
          outline-width: 1px;
          outline-color: var(--ring);
        }

        & svg {
          width: var(--icon-size, 1rem);
          height: var(--icon-size, 1rem);
        }
        &::after {
          position: absolute;
          background-color: var(--foreground);
          opacity: 0%;
          content: '';
          transition-property: opacity;
          transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
          transition-duration: 150ms;
        }
      }

      &[aria-orientation='vertical'] > [role='tab'] {
        width: 100%;
        justify-content: flex-start;
      }

      &[data-variant='line'][aria-orientation='horizontal'] > [role='tab'] {
        background-color: transparent;
        box-shadow: none;

        &::after {
          inset-inline: 0;
          bottom: -5px;
          content: '';
          height: 0.125rem;
        }
      }

      &[data-variant='line'][aria-orientation='vertical'] > [role='tab'] {
        background-color: transparent;
        box-shadow: none;

        &::after {
          inset-block: 0;
          inset-inline-end: -4px;
          content: '';
          width: 0.125rem;
        }
      }

      &:not([data-variant='line']) > [role='tab'][aria-selected='true'] {
        border-color: light-dark(transparent, var(--input));
        background-color: light-dark(
          var(--background),
          color-mix(in oklab, var(--input) 30%, transparent)
        );
        color: var(--foreground);
        box-shadow: var(--shadow-sm);
      }

      &[data-variant='line'] > [role='tab'][aria-selected='true'] {
        background-color: transparent;
        color: var(--foreground);
        box-shadow: none;

        &::after {
          content: '';
          opacity: 100%;
        }
      }

      > [role='tab']:has(> svg:first-child) {
        padding-inline-start: 0.25rem;
      }

      > [role='tab']:has(> svg:last-child) {
        padding-inline-end: 0.25rem;
      }
    }

    > [role='tabpanel'] {
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
    }
  }
}
/* Textarea */
@layer loseta.style {
  .textarea {
    border-radius: var(--radius-lg);
    border-style: solid;
    border-width: 1px;
    border-color: var(--input);
    background-color: light-dark(
      transparent,
      color-mix(in oklab, var(--input) 30%, transparent)
    );
    padding-inline: 0.625rem;
    padding-block: 0.5rem;
    font-size: var(--text-base);
    line-height: 1.5;
    transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;

    &::selection {
      background-color: var(--primary);
      color: var(--primary-foreground);
    }

    &:focus-visible {
      border-color: var(--ring);
      box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
    }

    &:disabled {
      background-color: light-dark(
        color-mix(in oklab, var(--input) 50%, transparent),
        color-mix(in oklab, var(--input) 80%, transparent)
      );
    }

    &[aria-invalid='true'] {
      border-color: light-dark(
        var(--destructive),
        color-mix(in oklab, var(--destructive) 50%, transparent)
      );
      box-shadow: 0 0 0 3px light-dark(
        color-mix(in oklab, var(--destructive) 20%, transparent),
        color-mix(in oklab, var(--destructive) 40%, transparent)
      );
    }

    @media (width >= 48rem) {
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
    }
  }
}
/* Tooltip */
@layer loseta.style {
  .tooltip[data-tooltip] {
    &::before {
      display: inline-flex;
      align-items: center;
      gap: 0.375rem;
      border-radius: var(--radius-md);
      background-color: var(--foreground);
      padding-inline: 0.75rem;
      padding-block: 0.375rem;
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);
      color: var(--background);
    }

    &[data-arrow]::after {
      border-radius: 2px;
      background-color: var(--foreground);
    }
  }
}
/* Accordion */
@layer loseta.style {
  .accordion > details {
    &:not(:last-child) {
      border-bottom-style: solid;
      border-bottom-width: 1px;
      border-bottom-color: var(--border);
    }

    &::details-content {
      opacity: 0%;
      transition-property: block-size, content-visibility, opacity;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;
      transition-behavior: allow-discrete;
    }

    &[open]::details-content {
      opacity: 100%;
    }

    > summary {
      border-style: solid;
      border-width: 1px;
      border-color: transparent;
      border-radius: var(--radius-lg);
      padding-block: 0.625rem;
      text-align: start;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      font-weight: 500;
      transition-property: border-color, box-shadow, text-decoration-color;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;

      &:hover {
        text-decoration-line: underline;
      }

      &:focus-visible {
        border-color: var(--ring);
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
      }

      > svg:last-child {
        margin-inline-start: auto;
        width: 1rem;
        height: 1rem;
        color: var(--muted-foreground);
      }
    }

    > :not(summary) {
      padding-block-end: 0.625rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
    }
  }
}
/* Aspect Ratio */
@layer loseta.style {
  .aspect-ratio {
    background-color: var(--muted);
  }
}
/* Avatar */
@layer loseta.style {
  .avatar {
    border-radius: var(--radius-full);
    background-color: var(--muted);

    &::after {
      position: absolute;
      inset: 0;
      border-style: solid;
      border-width: 1px;
      border-color: var(--border);
      border-radius: inherit;
      content: '';
      pointer-events: none;
    }

    &:not([data-size]),
    &[data-size='default'] {
      width: 2rem;
      height: 2rem;
    }

    &[data-size='sm'] {
      width: 1.5rem;
      height: 1.5rem;
    }

    &[data-size='lg'] {
      width: 2.5rem;
      height: 2.5rem;
    }

    > img {
      border-radius: inherit;
    }

    > [data-slot='fallback'] {
      border-radius: inherit;
      background-color: var(--muted);
      color: light-dark(var(--foreground), var(--muted-foreground));
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      font-weight: 500;
    }

    &[data-size='sm'] > [data-slot='fallback'] {
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);
    }

    &[data-size='lg'] > [data-slot='fallback'] {
      font-size: var(--text-base);
      line-height: var(--text-base--line-height);
    }

    > [data-slot='badge'] {
      width: 0.625rem;
      height: 0.625rem;
      border-radius: var(--radius-full);
      background-color: var(--primary);
      color: var(--primary-foreground);
      box-shadow: 0 0 0 2px var(--background);

      > svg {
        width: 0.5rem;
        height: 0.5rem;
      }
    }

    &[data-size='sm'] > [data-slot='badge'] {
      width: 0.5rem;
      height: 0.5rem;

      > svg {
        display: none;
      }
    }

    &[data-size='lg'] > [data-slot='badge'] {
      width: 0.75rem;
      height: 0.75rem;
    }
  }

  .avatar-group > [data-slot='count'] {
    width: 2rem;
    height: 2rem;
    border-style: solid;
    border-width: 1px;
    border-color: var(--border);
    border-radius: var(--radius-full);
    background-color: var(--muted);
    color: light-dark(var(--foreground), var(--muted-foreground));
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
    font-weight: 500;

    > svg {
      width: 1rem;
      height: 1rem;
    }
  }

  .avatar-group:has(> .avatar[data-size='sm']) > [data-slot='count'] {
    width: 1.5rem;
    height: 1.5rem;
    font-size: var(--text-xs);
    line-height: var(--text-xs--line-height);

    > svg {
      width: 0.75rem;
      height: 0.75rem;
    }
  }

  .avatar-group:has(> .avatar[data-size='lg']) > [data-slot='count'] {
    width: 2.5rem;
    height: 2.5rem;
    font-size: var(--text-base);
    line-height: var(--text-base--line-height);

    > svg {
      width: 1.25rem;
      height: 1.25rem;
    }
  }

  .avatar-group > :is(.avatar, [data-slot='count']) {
    box-shadow: 0 0 0 2px var(--background);
  }
}
/* Breadcrumb */
@layer loseta.style {
  .breadcrumb {
    > ol {
      gap: 0.375rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      color: var(--muted-foreground);
    }

    li {
      gap: 0.25rem;
    }

    :is(a, button) {
      border-radius: var(--radius-sm);
      transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;

      &:hover {
        color: var(--foreground);
      }

      &:focus-visible {
        border-color: var(--ring);
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
      }
    }

    [aria-current='page'] {
      font-weight: 400;
      color: var(--foreground);
    }

    li[aria-hidden='true'] > svg {
      width: 0.875rem;
      height: 0.875rem;
    }

    li > span[aria-hidden='true'] {
      width: 1.25rem;
      height: 1.25rem;

      > svg {
        width: 1rem;
        height: 1rem;
      }
    }

    [data-slot='ellipsis'] {
      width: 1.25rem;
      height: 1.25rem;

      > svg {
        width: 1rem;
        height: 1rem;
      }
    }
  }
}
/* Pagination */
@layer loseta.style {
  .pagination {
    > ul {
      gap: 0.25rem;
    }

    > ul > li > :is(a, button) {
      transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;

      &:focus-visible {
        border-color: var(--ring);
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
      }
    }

    > ul > li > :is(a, button)[aria-current='page'] {
      border-style: solid;
      border-width: 1px;
      border-color: var(--border);
      background-color: var(--background);
      color: var(--foreground);
    }

    [data-slot='ellipsis'] {
      width: 2rem;
      height: 2rem;
      color: var(--muted-foreground);

      > svg {
        width: 1rem;
        height: 1rem;
      }
    }

    [data-slot='label'] {
      display: none;

      @media (width >= 40rem) {
        display: inline;
      }
    }
  }
}
/* Progress */
@layer loseta.style {
  .progress {
    block-size: 0.25rem;
    border-radius: var(--radius-full);
    background-color: color-mix(in oklab, var(--primary) 20%, transparent);

    &::-webkit-progress-bar {
      border-radius: inherit;
      background-color: transparent;
    }

    &::-webkit-progress-value {
      border-radius: inherit;
      background-color: var(--primary);
      transition-property: inline-size;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;
    }

    &::-moz-progress-bar {
      border-radius: inherit;
      background-color: var(--primary);
    }

    &:indeterminate {
      background-image: linear-gradient(
        90deg,
        transparent,
        var(--primary),
        transparent
      );
      background-size: 50% 100%;
      background-repeat: no-repeat;
      animation: loseta-progress-indeterminate 1.5s
        cubic-bezier(0.4, 0, 0.2, 1) infinite;

      &::-webkit-progress-bar {
        background-color: transparent;
      }

      &::-webkit-progress-value {
        background-color: transparent;
      }

      &::-moz-progress-bar {
        background-color: transparent;
      }
    }

    &:dir(rtl):indeterminate {
      animation-direction: reverse;
    }

    @media (prefers-reduced-motion: reduce) {
      &:indeterminate {
        animation-duration: 3s;
      }
    }

    /* Keep the system-color track and sweep visible in forced-colors mode. */
    @media (forced-colors: active) {
      forced-color-adjust: none;
      outline: 1px solid CanvasText;
      background-color: Canvas;

      &::-webkit-progress-value,
      &::-moz-progress-bar {
        background-color: Highlight;
      }

      &:indeterminate {
        background-image: linear-gradient(
          90deg,
          transparent,
          Highlight,
          transparent
        );
      }
    }
  }

  @keyframes loseta-progress-indeterminate {
    from {
      background-position: -100% 0;
    }

    to {
      background-position: 200% 0;
    }
  }
}
/* Separator */
@layer loseta.style {
  .separator {
    block-size: 1px;
    inline-size: 100%;
    background-color: var(--border);

    &:is([data-orientation='vertical'], [aria-orientation='vertical']) {
      block-size: auto;
      inline-size: 1px;
      align-self: stretch;
    }
  }
}
/* Spinner */
@layer loseta.style {
  .spinner {
    width: 1rem;
    height: 1rem;
    border-style: solid;
    border-width: 2px;
    border-color: color-mix(in oklab, currentColor 25%, transparent);
    border-block-start-color: currentColor;
    border-radius: var(--radius-full);
    animation: loseta-spin 0.75s linear infinite;

    @media (prefers-reduced-motion: reduce) {
      animation-duration: 1.5s;
    }

    &[data-size='sm'] {
      width: 0.75rem;
      height: 0.75rem;
      border-width: 1.5px;
    }

    &[data-size='lg'] {
      width: 1.5rem;
      height: 1.5rem;
      border-width: 2.5px;
    }
  }

  @keyframes loseta-spin {
    to {
      rotate: 360deg;
    }
  }
}
/* Toggle */
@layer loseta.style {
  .toggle {
    block-size: 2rem;
    min-inline-size: 2rem;
    gap: 0.375rem;
    border-style: solid;
    border-width: 1px;
    border-color: transparent;
    border-radius: var(--radius-lg);
    background-color: transparent;
    padding-inline: 0.5rem;
    color: inherit;
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
    font-weight: 500;

    > svg {
      width: 1rem;
      height: 1rem;
    }

    &:hover {
      background-color: var(--muted);
      color: var(--muted-foreground);
    }

    &[aria-pressed='true'] {
      background-color: var(--accent);
      color: var(--accent-foreground);
    }

    &[aria-pressed='true']:hover {
      background-color: var(--accent);
      color: var(--accent-foreground);
    }

    &:focus-visible {
      border-color: var(--ring);
      box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
    }

    &[aria-invalid='true'] {
      border-color: light-dark(
        var(--destructive),
        color-mix(in oklab, var(--destructive) 50%, transparent)
      );
      box-shadow: 0 0 0 3px light-dark(
        color-mix(in oklab, var(--destructive) 20%, transparent),
        color-mix(in oklab, var(--destructive) 40%, transparent)
      );
    }

    &[data-size='sm'] {
      block-size: 1.75rem;
      min-inline-size: 1.75rem;
      border-radius: min(var(--radius-md), 12px);
      padding-inline: 0.375rem;
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);
    }

    &[data-size='lg'] {
      block-size: 2.25rem;
      min-inline-size: 2.25rem;
      padding-inline: 0.625rem;
    }

    &[data-variant='outline'] {
      border-color: light-dark(var(--border), var(--input));
      background-color: light-dark(
        var(--background),
        color-mix(in oklab, var(--input) 30%, transparent)
      );

      &:hover {
        background-color: var(--accent);
        color: var(--accent-foreground);
      }
    }

    &[data-variant='outline'][aria-pressed='true'] {
      background-color: var(--accent);
      color: var(--accent-foreground);
    }
  }

  .toggle:where(.toggle-group[data-size='sm'] > .toggle:not([data-size])) {
    block-size: 1.75rem;
    min-inline-size: 1.75rem;
    border-radius: min(var(--radius-md), 12px);
    padding-inline: 0.375rem;
    font-size: var(--text-xs);
    line-height: var(--text-xs--line-height);
  }

  .toggle:where(.toggle-group[data-size='lg'] > .toggle:not([data-size])) {
    block-size: 2.25rem;
    min-inline-size: 2.25rem;
    padding-inline: 0.625rem;
  }

  .toggle:where(.toggle-group[data-variant='outline'] > .toggle:not([data-variant])) {
    border-color: light-dark(var(--border), var(--input));
    background-color: light-dark(
      var(--background),
      color-mix(in oklab, var(--input) 30%, transparent)
    );
  }

  .toggle:where(
      .toggle-group[data-variant='outline'] > .toggle:not([data-variant])
    ):hover {
    background-color: var(--accent);
    color: var(--accent-foreground);
  }

  .toggle:where(
      .toggle-group[data-variant='outline'] > .toggle:not([data-variant])
    )[aria-pressed='true'] {
    background-color: var(--accent);
    color: var(--accent-foreground);
  }
}
/* Toggle Group */
@layer loseta.style {
  .toggle-group {
    gap: 0.25rem;

    &[data-spacing='joined'] {
      gap: 0;

      > .toggle {
        border-radius: 0;
      }
    }
  }

  .toggle-group[data-spacing='joined']:not([data-orientation='vertical'])
    > .toggle:not(:first-child) {
    border-inline-start-width: 0;
  }

  .toggle-group[data-spacing='joined'][data-orientation='vertical']
    > .toggle:not(:first-child) {
    border-block-start-width: 0;
  }

  .toggle-group[data-spacing='joined']:not([data-orientation='vertical'])
    > .toggle:first-child {
    border-start-start-radius: var(--radius-lg);
    border-end-start-radius: var(--radius-lg);
  }

  .toggle-group[data-spacing='joined']:not([data-orientation='vertical'])
    > .toggle:last-child {
    border-start-end-radius: var(--radius-lg);
    border-end-end-radius: var(--radius-lg);
  }

  .toggle-group[data-spacing='joined'][data-orientation='vertical']
    > .toggle:first-child {
    border-start-start-radius: var(--radius-lg);
    border-start-end-radius: var(--radius-lg);
  }

  .toggle-group[data-spacing='joined'][data-orientation='vertical']
    > .toggle:last-child {
    border-end-start-radius: var(--radius-lg);
    border-end-end-radius: var(--radius-lg);
  }
}
/* Context Menu */
@layer loseta.style {
  .context-menu {
    min-width: 8rem;
    max-width: 20rem;
    border-radius: var(--radius-lg);
    background-color: var(--popover);
    padding: 0.25rem;
    color: var(--popover-foreground);
    box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 10%, transparent), var(--shadow-md);
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;

    :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']) {
      white-space: nowrap;
    }
  }
}
/* Drawer */
@layer loseta.style {
  .drawer {
    --drawer-height: 80vh;

    &[data-size='sm'] {
      --drawer-height: 50vh;

      > * {
        block-size: var(--drawer-height);
      }
    }

    &[data-size='lg'] {
      --drawer-height: 90vh;

      > * {
        block-size: var(--drawer-height);
      }
    }

    > * {
      gap: 1rem;
      border-start-start-radius: var(--radius-xl);
      border-start-end-radius: var(--radius-xl);
      background-color: var(--background);
      padding: 1rem;
      color: var(--foreground);
      box-shadow: var(--shadow-lg);
    }

    &[data-side='block-start'] > * {
      border-start-start-radius: 0;
      border-start-end-radius: 0;
      border-end-start-radius: var(--radius-xl);
      border-end-end-radius: var(--radius-xl);
    }

    > * > [data-slot='handle'] {
      width: 2.5rem;
      height: 0.25rem;
      margin-inline: auto;
      border-radius: var(--radius-full);
      background-color: var(--muted);
      cursor: grab;
    }

    > * > header {
      gap: 0.5rem;
    }

    > * > header > [data-slot='title'] {
      font-size: var(--text-base);
      line-height: 1;
      font-weight: 500;
    }

    > * > header > [data-slot='description'] {
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      color: var(--muted-foreground);
    }

    > * > footer {
      gap: 0.5rem;
    }
  }
}
/* Hover Card */
@layer loseta.style {
  .hover-card > [data-popover] {
    width: 18rem;
    gap: 0.5rem;
    transition-delay: 0s;
  }

  .hover-card:hover > [data-popover],
  .hover-card:focus-within > [data-popover] {
    transition-delay: 300ms;
  }

  @media (prefers-reduced-motion: reduce) {
    .hover-card > [data-popover],
    .hover-card:hover > [data-popover],
    .hover-card:focus-within > [data-popover] {
      transition-delay: 0s;
      transition-duration: 0s;
    }
  }
}
/* Menubar */
@layer loseta.style {
  .menubar {
    gap: 0.25rem;
    border-style: solid;
    border-width: 1px;
    border-color: var(--border);
    border-radius: var(--radius-md);
    background-color: var(--background);
    padding: 0.25rem;
    box-shadow: var(--shadow-xs);

    > .menubar-item > [role='menuitem'] {
      height: 1.75rem;
      gap: 0.375rem;
      border-radius: var(--radius-sm);
      padding-inline: 0.5rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      font-weight: 500;

      &:hover,
      &[aria-expanded='true'] {
        background-color: var(--accent);
        color: var(--accent-foreground);
      }

      &:focus-visible {
        background-color: var(--accent);
        color: var(--accent-foreground);
      }

      & svg {
        width: 1rem;
        height: 1rem;
      }
    }

    [data-popover] {
      min-width: 8rem;
      max-width: 20rem;
    }

    [role='menu'] :is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio']) {
      white-space: nowrap;
    }
  }
}
/* Navigation Menu */
@layer loseta.style {
  .navigation-menu {
    > ul {
      gap: 0.25rem;
    }

    > ul > li > :is(a, button) {
      height: 2rem;
      gap: 0.25rem;
      border-radius: var(--radius-md);
      padding-inline: 0.5rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      font-weight: 500;

      &:hover,
      &[aria-expanded='true'] {
        background-color: var(--accent);
        color: var(--accent-foreground);
      }

      &:focus-visible {
        background-color: var(--accent);
        color: var(--accent-foreground);
      }

      & svg {
        width: 0.875rem;
        height: 0.875rem;
      }
    }

    > ul > li > [data-popover] {
      width: 20rem;
      max-width: calc(100vw - 2rem);
      gap: 0.25rem;
      padding: 0.5rem;
    }

    [data-popover] ul {
      margin: 0;
      display: grid;
      list-style-type: none;
      gap: 0.25rem;
      padding: 0;
    }

    [data-popover] a {
      display: grid;
      gap: 0.125rem;
      border-radius: var(--radius-md);
      padding: 0.5rem;

      &:hover,
      &:focus-visible {
        background-color: var(--accent);
        color: var(--accent-foreground);
      }
    }

    [data-popover] a:has(> [data-slot='icon']) {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    [data-popover] [data-slot='icon'] > svg {
      width: 1rem;
      height: 1rem;
    }

    [data-slot='title'] {
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      font-weight: 500;
    }

    [data-slot='description'] {
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);
      color: var(--muted-foreground);
    }

    [data-popover] a:hover [data-slot='description'],
    [data-popover] a:focus-visible [data-slot='description'] {
      color: inherit;
    }
  }
}
/* Sheet */
@layer loseta.style {
  .sheet {
    --sheet-width: 24rem;
    --sheet-height: 80vh;

    &[data-size='sm'] {
      --sheet-width: 20rem;
      --sheet-height: 50vh;
    }

    &[data-size='lg'] {
      --sheet-width: 28rem;
      --sheet-height: 90vh;
    }

    > * {
      gap: 1rem;
      background-color: var(--background);
      padding: 1.5rem;
      color: var(--foreground);
      box-shadow: var(--shadow-lg);
    }

    &[data-side='inline-start'] > * {
      border-inline-end-style: solid;
      border-inline-end-width: 1px;
      border-inline-end-color: var(--border);
    }

    &[data-side='inline-end'] > * {
      border-inline-start-style: solid;
      border-inline-start-width: 1px;
      border-inline-start-color: var(--border);
    }

    &[data-side='block-start'] > *,
    &[data-side='block-end'] > * {
      max-height: var(--sheet-height);
    }

    &[data-side='block-start'] > * {
      border-block-end-style: solid;
      border-block-end-width: 1px;
      border-block-end-color: var(--border);
    }

    &[data-side='block-end'] > * {
      border-block-start-style: solid;
      border-block-start-width: 1px;
      border-block-start-color: var(--border);
    }

    > * > header {
      gap: 0.5rem;
    }

    > * > header > [data-slot='title'] {
      font-size: var(--text-base);
      line-height: 1;
      font-weight: 500;
    }

    > * > header > [data-slot='description'] {
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      color: var(--muted-foreground);
    }

    > * > footer {
      gap: 0.5rem;
    }
  }
}
/* Collapsible */
@layer loseta.style {
  .collapsible {
    > summary {
      gap: 0.5rem;
      border-style: solid;
      border-width: 1px;
      border-color: transparent;
      border-radius: var(--radius-md);
      padding-block: 0.25rem;
      text-align: start;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      font-weight: 500;
      transition-property: border-color, box-shadow;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;

      &:focus-visible {
        border-color: var(--ring);
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
      }

      > svg:last-child {
        margin-inline-start: auto;
        width: 1rem;
        height: 1rem;
        color: var(--muted-foreground);
      }
    }

    > :not(summary) {
      padding-block-start: 0.5rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
    }

    &::details-content {
      opacity: 0%;
      transition-property: block-size, content-visibility, opacity;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;
      transition-behavior: allow-discrete;
    }

    &[open]::details-content {
      opacity: 100%;
    }
  }
}
/* Input Group */
@layer loseta.style {
  .input-group {
    min-height: 2rem;
    gap: 0.25rem;
    border-style: solid;
    border-width: 1px;
    border-color: var(--input);
    border-radius: var(--radius-lg);
    background-color: light-dark(
      transparent,
      color-mix(in oklab, var(--input) 30%, transparent)
    );
    padding: 0.1875rem 0.375rem;
    transition-property: border-color, box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;

    &:has(> :is(input, textarea, [data-slot='input-group-control']):focus-visible) {
      border-color: var(--ring);
      box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
    }

    &:has(> :is(input, textarea, [data-slot='input-group-control']):disabled) {
      background-color: light-dark(
        color-mix(in oklab, var(--input) 50%, transparent),
        color-mix(in oklab, var(--input) 80%, transparent)
      );

      > [data-slot='addon'] {
        opacity: 50%;
      }
    }

    &:has([aria-invalid='true']) {
      border-color: light-dark(
        var(--destructive),
        color-mix(in oklab, var(--destructive) 50%, transparent)
      );
      box-shadow: 0 0 0 3px light-dark(
        color-mix(in oklab, var(--destructive) 20%, transparent),
        color-mix(in oklab, var(--destructive) 40%, transparent)
      );
    }

    &:has(> textarea) {
      align-items: stretch;
      padding-block: 0.5rem;
    }

    > :is(input, textarea, [data-slot='input-group-control']) {
      height: auto;
      border-width: 0;
      border-radius: 0;
      background-color: transparent;
      padding: 0;
      font-size: var(--text-base);
      line-height: 1.5;
      box-shadow: none;

      &:focus-visible {
        border-color: transparent;
        box-shadow: none;
      }

      &[aria-invalid='true'] {
        border-color: transparent;
        box-shadow: none;
      }

      @media (width >= 48rem) {
        font-size: var(--text-sm);
        line-height: var(--text-sm--line-height);
      }
    }

    > [data-slot='addon'] {
      color: var(--muted-foreground);
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      -webkit-user-select: none;
      user-select: none;

      > svg {
        width: 1rem;
        height: 1rem;
      }

      &[data-align='block-start'] {
        padding-block-end: 0.125rem;
      }

      &[data-align='block-end'] {
        padding-block-start: 0.125rem;
      }
    }
  }
}
/* Input OTP */
@layer loseta.style {
  .input-otp {
    height: 2.5rem;
    border-style: solid;
    border-width: 1px;
    border-color: var(--input);
    border-radius: var(--radius-lg);
    background-color: light-dark(
      transparent,
      color-mix(in oklab, var(--input) 30%, transparent)
    );
    padding-inline: 0.5rem;
    font-size: var(--text-lg);
    line-height: var(--text-lg--line-height);
    letter-spacing: 0.5em;
    text-indent: 0.5em;
    transition-property: color, background-color, border-color, box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;

    &::selection {
      background-color: var(--primary);
      color: var(--primary-foreground);
    }

    &:focus-visible {
      border-color: var(--ring);
      box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
    }

    &[aria-invalid='true'] {
      border-color: light-dark(
        var(--destructive),
        color-mix(in oklab, var(--destructive) 50%, transparent)
      );
      box-shadow: 0 0 0 3px light-dark(
        color-mix(in oklab, var(--destructive) 20%, transparent),
        color-mix(in oklab, var(--destructive) 40%, transparent)
      );
    }

    &[data-size='sm'] {
      height: 2rem;
      font-size: var(--text-base);
      line-height: var(--text-base--line-height);
      letter-spacing: 0.35em;
      text-indent: 0.35em;
    }

    &[data-size='lg'] {
      height: 3rem;
      font-size: var(--text-xl);
      line-height: var(--text-xl--line-height);
      letter-spacing: 0.6em;
      text-indent: 0.6em;
    }
  }
}
/* Scroll Area */
@layer loseta.style {
  .scroll-area {
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    scrollbar-width: auto;

    &::-webkit-scrollbar {
      width: var(--scrollbar-width);
      height: var(--scrollbar-width);
    }

    &::-webkit-scrollbar-track {
      background-color: var(--scrollbar-track);
    }

    &::-webkit-scrollbar-thumb {
      border-radius: var(--scrollbar-radius);
      background-color: var(--scrollbar-thumb);
    }

    &[data-size='sm'] {
      scrollbar-width: thin;

      &::-webkit-scrollbar {
        width: var(--scrollbar-sm-width);
        height: var(--scrollbar-sm-width);
      }
    }
  }
}
/* Slider */
@layer loseta.style {
  .slider {
    accent-color: var(--primary);
    block-size: 1.25rem;

    &[data-size='sm'] {
      block-size: 1rem;
    }

    &[data-size='lg'] {
      block-size: 1.5rem;
    }
  }
}
/* Select */
@layer loseta.style {
  .select {
    > button {
      height: 2rem;
      border-style: solid;
      border-width: 1px;
      border-color: var(--input);
      border-radius: var(--radius-lg);
      background-color: light-dark(
        transparent,
        color-mix(in oklab, var(--input) 30%, transparent)
      );
      padding-inline: 0.5rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      font-weight: 400;
      text-align: start;
      transition-property: color, background-color, border-color, box-shadow;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;

      &:hover {
        background-color: light-dark(
          var(--muted),
          color-mix(in oklab, var(--input) 50%, transparent)
        );
      }

      &:focus-visible {
        border-color: var(--ring);
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
      }

      &[aria-invalid='true'] {
        border-color: light-dark(
          var(--destructive),
          color-mix(in oklab, var(--destructive) 50%, transparent)
        );
        box-shadow: 0 0 0 3px light-dark(
          color-mix(in oklab, var(--destructive) 20%, transparent),
          color-mix(in oklab, var(--destructive) 40%, transparent)
        );
      }

      > svg {
        width: 1rem;
        height: 1rem;
        color: var(--muted-foreground);
      }
    }

    &[data-size='sm'] > button {
      height: 1.75rem;
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);
    }

    [data-slot='value'] {
      flex: 1 1 auto;
      overflow: hidden;
      text-align: start;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    [data-slot='value'][data-placeholder] {
      color: var(--muted-foreground);
    }

    &:is(:hover, :focus-visible, [aria-expanded='true']) [data-slot='value'][data-placeholder] {
      color: var(--foreground);
    }
  }
}
/* Combobox */
@layer loseta.style {
  .combobox {
    > input {
      height: 2rem;
      border-style: solid;
      border-width: 1px;
      border-color: var(--input);
      border-radius: var(--radius-lg);
      background-color: light-dark(
        transparent,
        color-mix(in oklab, var(--input) 30%, transparent)
      );
      padding-inline: 0.5rem;
      font-size: var(--text-base);
      line-height: 1.5;
      transition-property: color, background-color, border-color, box-shadow;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;

      &:focus-visible {
        border-color: var(--ring);
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
      }

      &[aria-invalid='true'] {
        border-color: light-dark(
          var(--destructive),
          color-mix(in oklab, var(--destructive) 50%, transparent)
        );
        box-shadow: 0 0 0 3px light-dark(
          color-mix(in oklab, var(--destructive) 20%, transparent),
          color-mix(in oklab, var(--destructive) 40%, transparent)
        );
      }

      @media (width >= 48rem) {
        font-size: var(--text-sm);
        line-height: var(--text-sm--line-height);
      }
    }

    &:has(> [data-slot='clear']) > input {
      padding-inline-end: 2rem;
    }

    > [data-slot='clear'] {
      width: 1.5rem;
      height: 1.5rem;
      border-radius: min(var(--radius-md), 10px);
      color: var(--muted-foreground);

      &:hover {
        background-color: var(--muted);
        color: var(--foreground);
      }
    }
  }
}
/* Command */
@layer loseta.style {
  .command {
    gap: 0.5rem;

    [data-slot='shortcut'] {
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);
      letter-spacing: 0.1em;
      color: var(--muted-foreground);
    }

    [role='listbox'] [role='separator'] {
      block-size: 1px;
      margin-block: 0.25rem;
      background-color: var(--border);
    }

    [role='listbox'] [role='option'] {
      padding-inline-end: 0.375rem;
    }

    [role='listbox'] [role='option']:is(:hover, [data-highlighted]) [data-slot='shortcut'] {
      color: var(--accent-foreground);
    }
  }
}
/* Calendar */
@layer loseta.style {
  .calendar {
    width: 18rem;
    gap: 0.5rem;

    > header {
      gap: 0.5rem;
    }

    > header > button {
      width: 1.75rem;
      height: 1.75rem;
      border-radius: var(--radius-md);
      color: var(--muted-foreground);

      &:hover {
        background-color: var(--muted);
        color: var(--foreground);
      }

      &:focus-visible {
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
      }

      > svg {
        width: 1rem;
        height: 1rem;
      }
    }

    [data-slot='title'] {
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      font-weight: 500;
    }

    th {
      padding-block: 0.25rem;
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);
      color: var(--muted-foreground);
    }

    td > button {
      width: 2rem;
      height: 2rem;
      border-radius: var(--radius-md);
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      transition-property: color, background-color, box-shadow;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;

      &:hover {
        background-color: var(--muted);
      }

      &:focus-visible {
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
      }

      &[aria-disabled='true'] {
        opacity: 50%;
        color: var(--muted-foreground);
      }
    }

    td[aria-selected='true'] > button {
      background-color: var(--primary);
      color: var(--primary-foreground);
    }

    td > button[aria-current='date'] {
      box-shadow: inset 0 0 0 1px var(--ring);
    }
  }
}
/* Carousel */
@layer loseta.style {
  .carousel {
    .carousel-viewport {
      border-radius: var(--radius-lg);
    }

    .carousel-button {
      width: 2rem;
      height: 2rem;
      border-style: solid;
      border-width: 1px;
      border-color: var(--border);
      border-radius: var(--radius-md);
      color: var(--muted-foreground);
      transition-property: color, background-color, border-color, box-shadow;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;

      &:hover {
        background-color: var(--muted);
        color: var(--foreground);
      }

      &:focus-visible {
        border-color: var(--ring);
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
      }

      > svg {
        width: 1rem;
        height: 1rem;
      }
    }

    .carousel-indicator {
      color: var(--muted-foreground);
      transition-property: color;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;

      &:hover {
        color: var(--foreground);
      }

      &:focus-visible {
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
      }

      &[aria-current='true'] {
        color: var(--primary);
      }
    }
  }
}
/* Chart */
@layer loseta.style {
  .chart {
    > [data-slot='plot'] {
      aspect-ratio: 16 / 9;
    }

    > [data-slot='legend'] {
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);
      color: var(--muted-foreground);
    }

    [data-slot='legend-item'] {
      color: var(--muted-foreground);
    }

    [data-slot='tooltip'] {
      display: flex;
      flex-direction: column;
      gap: 0.125rem;
      border-style: solid;
      border-width: 1px;
      border-color: var(--border);
      border-radius: var(--radius-md);
      background-color: var(--popover);
      padding: 0.375rem 0.5rem;
      color: var(--popover-foreground);
      box-shadow: var(--shadow-md);
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);

      [data-slot='title'] {
        font-weight: 500;
      }

      [data-slot='description'] {
        color: var(--muted-foreground);
      }
    }
  }
}
/* Resizable */
@layer loseta.style {
  .resizable {
    border-style: solid;
    border-width: 1px;
    border-color: var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--background);

    > .resizable-panel {
      padding: 1rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
    }

    > [data-slot='handle'] {
      background-color: var(--background);

      &::before {
        background-color: var(--border);
      }

      &:hover::before,
      &:focus-visible::before {
        background-color: var(--ring);
      }

      &:focus-visible {
        box-shadow: inset 0 0 0 1px var(--ring);
      }
    }
  }
}
/* Sidebar */
@layer loseta.style {
  .sidebar {
    border-inline-end-style: solid;
    border-inline-end-width: 1px;
    border-inline-end-color: var(--sidebar-border);
    background-color: var(--sidebar);
    color: var(--sidebar-foreground);

    > header,
    > footer {
      min-height: 3rem;
      padding-inline: 0.75rem;
    }

    > header {
      border-block-end-style: solid;
      border-block-end-width: 1px;
      border-block-end-color: var(--sidebar-border);
    }

    > footer {
      border-block-start-style: solid;
      border-block-start-width: 1px;
      border-block-start-color: var(--sidebar-border);
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);
      color: var(--muted-foreground);
    }

    > section {
      gap: 0.75rem;
      padding: 0.5rem;
    }

    [data-slot='brand'] {
      color: var(--sidebar-foreground);
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      font-weight: 600;

      > svg {
        width: 1rem;
        height: 1rem;
      }
    }

    nav > header {
      min-height: 2rem;
      padding-inline: 0.5rem;
      color: color-mix(in oklab, var(--sidebar-foreground) 70%, transparent);

      > :is(h2, h3, h4, h5, h6, [data-slot='group-label']) {
        margin: 0;
        font-size: var(--text-xs);
        line-height: var(--text-xs--line-height);
        font-weight: 500;
      }
    }

    [data-slot='group-action'] {
      width: 1.5rem;
      height: 1.5rem;
      margin-inline-start: auto;
      border-radius: var(--radius-sm);
      background-color: transparent;
      color: inherit;
      transition-property: color, background-color, box-shadow;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;

      > svg {
        width: 1rem;
        height: 1rem;
      }

      &:hover {
        background-color: var(--sidebar-accent);
        color: var(--sidebar-accent-foreground);
      }

      &:focus-visible {
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--sidebar-ring) 50%, transparent);
      }
    }

    nav a {
      height: 2rem;
      border-radius: var(--radius-md);
      padding-inline: 0.5rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      transition-property: color, background-color, box-shadow;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;

      > svg {
        width: 1rem;
        height: 1rem;
      }

      &:hover {
        background-color: var(--sidebar-accent);
        color: var(--sidebar-accent-foreground);
      }

      &[aria-current='page'] {
        background-color: var(--sidebar-accent);
        color: var(--sidebar-accent-foreground);
        font-weight: 500;
      }

      &:focus-visible {
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--sidebar-ring) 50%, transparent);
      }
    }

    nav li:has(> [data-slot='menu-action'], > [data-slot='menu-badge']) > a {
      padding-inline-end: 2rem;
    }

    [data-slot='menu-action'] {
      inset-inline-end: 0.25rem;
      width: 1.5rem;
      height: 1.5rem;
      border-radius: var(--radius-sm);
      background-color: transparent;
      color: color-mix(in oklab, var(--sidebar-foreground) 70%, transparent);
      transition-property: color, background-color, box-shadow;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;

      > svg {
        width: 1rem;
        height: 1rem;
      }

      &:hover {
        background-color: var(--sidebar-accent);
        color: var(--sidebar-accent-foreground);
      }

      &:focus-visible {
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--sidebar-ring) 50%, transparent);
      }
    }

    [data-slot='menu-badge'] {
      inset-inline-end: 0.5rem;
      min-width: 1.25rem;
      height: 1.25rem;
      padding-inline: 0.25rem;
      border-radius: var(--radius-sm);
      color: color-mix(in oklab, var(--sidebar-foreground) 70%, transparent);
      font-size: var(--text-xs);
      line-height: 1;
      font-variant-numeric: tabular-nums;
    }

    .collapsible > summary {
      height: 2rem;
      border-width: 0;
      border-radius: var(--radius-md);
      padding-inline: 0.5rem;
      padding-block: 0;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);

      &[data-slot='group-label'] {
        font-size: var(--text-xs);
        line-height: var(--text-xs--line-height);
        color: color-mix(in oklab, var(--sidebar-foreground) 70%, transparent);
      }

      &:hover {
        background-color: var(--sidebar-accent);
        color: var(--sidebar-accent-foreground);
        text-decoration-line: none;
      }

      &:focus-visible {
        border-color: transparent;
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--sidebar-ring) 50%, transparent);
      }
    }

    .collapsible > :not(summary) {
      padding-block-start: 0.25rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
    }

    nav ul ul {
      margin-inline-start: 0.5rem;
      border-inline-start-style: solid;
      border-inline-start-width: 1px;
      border-inline-start-color: var(--sidebar-border);
      padding-inline-start: 0.5rem;
    }

    nav ul ul a {
      height: 1.75rem;
      padding-inline: 0.5rem;
      color: color-mix(in oklab, var(--sidebar-foreground) 70%, transparent);

      &:hover {
        color: var(--sidebar-accent-foreground);
      }
    }
  }
}
/* Toast */
@layer loseta.style {
  .toast {
    border-style: solid;
    border-width: 1px;
    border-color: var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--popover);
    padding: 0.75rem 1rem;
    color: var(--popover-foreground);
    box-shadow: var(--shadow-md);
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);

    [data-slot='title'] {
      font-weight: 500;
    }

    [data-slot='description'] {
      color: var(--muted-foreground);
    }

    [data-slot='close'] {
      width: 1.5rem;
      height: 1.5rem;
      border-radius: min(var(--radius-md), 10px);
      color: var(--muted-foreground);

      &:hover {
        background-color: var(--muted);
        color: var(--foreground);
      }

      &:focus-visible {
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
      }
    }

    &[data-variant='destructive'] {
      border-color: light-dark(
        color-mix(in oklab, var(--destructive) 40%, transparent),
        color-mix(in oklab, var(--destructive) 50%, transparent)
      );
      background-color: light-dark(
        color-mix(in oklab, var(--destructive) 10%, transparent),
        color-mix(in oklab, var(--destructive) 20%, transparent)
      );
      color: var(--destructive);

      [data-slot='description'] {
        color: light-dark(
          color-mix(in oklab, var(--destructive) 80%, var(--foreground)),
          var(--destructive)
        );
      }

      [data-slot='close'] {
        color: var(--destructive);
      }
    }
  }
}
/* Attachment */
@layer loseta.style {
  .attachment {
    border-color: var(--border);
    border-radius: var(--radius-xl);
    background-color: var(--card);
    color: var(--card-foreground);
    transition-property: color, background-color, border-color, box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;

    &:has(> :is(a, button, [data-slot='trigger'])):hover {
      background-color: color-mix(in oklab, var(--muted) 50%, var(--card));
    }

    &:focus-within {
      box-shadow: 0 0 0 1px color-mix(in oklab, var(--ring) 50%, transparent);
    }

    &:has([role='alert']) {
      border-color: light-dark(
        color-mix(in oklab, var(--destructive) 30%, transparent),
        color-mix(in oklab, var(--destructive) 40%, transparent)
      );
    }

    &[aria-busy='true'] > [data-slot='media'] {
      opacity: 60%;
    }

    > [data-slot='media'] {
      border-radius: var(--radius-lg);
      background-color: var(--muted);
      color: var(--foreground);

      > svg {
        width: 1rem;
        height: 1rem;
      }
    }

    > [data-slot='content'] {
      line-height: 1.25;

      > [data-slot='title'] {
        font-weight: 500;
      }

      > [data-slot='description'] {
        margin-block-start: 0.125rem;
        color: var(--muted-foreground);
        font-size: var(--text-xs);
        line-height: var(--text-xs--line-height);
      }

      > [role='alert'] {
        color: var(--destructive);
      }
    }

    &:not([data-size]),
    &[data-size='default'] {
      gap: 0.5rem;
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);

      &:has(> [data-slot='content']) {
        padding-inline: 0.625rem;
        padding-block: 0.5rem;
      }

      &:has(> [data-slot='media']) {
        padding: 0.5rem;
      }

      > [data-slot='media'] {
        width: 2.5rem;
      }

      &[data-orientation='vertical'] > [data-slot='media'] {
        width: 100%;
      }
    }

    &[data-size='sm'] {
      gap: 0.625rem;
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);

      &:has(> [data-slot='content']) {
        padding-inline: 0.5rem;
        padding-block: 0.375rem;
      }

      &:has(> [data-slot='media']) {
        padding: 0.375rem;
      }

      > [data-slot='media'] {
        width: 2rem;
      }

      &[data-orientation='vertical'] > [data-slot='media'] {
        width: 100%;
      }

      > [data-slot='content'] > [data-slot='description'] {
        font-size: var(--text-xs);
        line-height: var(--text-xs--line-height);
      }
    }

    &[data-size='xs'] {
      gap: 0.375rem;
      border-radius: var(--radius-lg);
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);

      &:has(> [data-slot='content']) {
        padding-inline: 0.375rem;
        padding-block: 0.25rem;
      }

      &:has(> [data-slot='media']) {
        padding: 0.25rem;
      }

      > [data-slot='media'] {
        width: 1.75rem;
        border-radius: var(--radius-md);
      }

      &[data-orientation='vertical'] > [data-slot='media'] {
        width: 100%;
      }

      > [data-slot='content'] > [data-slot='description'] {
        font-size: var(--text-xs);
        line-height: var(--text-xs--line-height);
      }
    }

    &:not([data-orientation]),
    &[data-orientation='horizontal'] {
      min-width: 10rem;
      align-items: center;
    }

    &[data-orientation='vertical'] {
      > [data-slot='media'] {
        width: 100%;
        border-radius: var(--radius-lg);
      }

      > [data-slot='content'] {
        padding-inline: 0.25rem;
      }

      > [data-slot='actions'] {
        gap: 0.25rem;
      }
    }

    &[aria-busy='true'] > [data-slot='content'] > [data-slot='title'] {
      color: var(--muted-foreground);
    }

    &:has([role='alert']) > [data-slot='media'] {
      background-color: light-dark(
        color-mix(in oklab, var(--destructive) 10%, transparent),
        color-mix(in oklab, var(--destructive) 20%, transparent)
      );
      color: var(--destructive);
    }
  }
}
/* Bubble */
@layer loseta.style {
  .bubble {
    > [data-slot='content'] {
      border-radius: var(--radius-xl);
      padding-inline: 0.75rem;
      padding-block: 0.5rem;
      font-size: var(--text-sm);
      line-height: 1.625;
      transition-property: color, background-color, border-color, box-shadow;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;

      &:is(a, button) {
        cursor: pointer;
      }

      &:is(a, button):focus-visible {
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
      }
    }

    &:not([data-variant]),
    &[data-variant='default'] {
      > [data-slot='content'] {
        background-color: var(--primary);
        color: var(--primary-foreground);
      }

      > [data-slot='content']:is(a, button):hover {
        background-color: color-mix(in oklab, var(--primary) 85%, var(--background));
      }
    }

    &[data-variant='secondary'] {
      > [data-slot='content'] {
        background-color: var(--secondary);
        color: var(--secondary-foreground);
      }

      > [data-slot='content']:is(a, button):hover {
        background-color: color-mix(in oklab, var(--secondary) 95%, var(--foreground));
      }
    }

    &[data-variant='muted'] {
      > [data-slot='content'] {
        background-color: var(--muted);
        color: var(--foreground);
      }

      > [data-slot='content']:is(a, button):hover {
        background-color: color-mix(in oklab, var(--muted) 95%, var(--foreground));
      }
    }

    &[data-variant='tinted'] {
      > [data-slot='content'] {
        background-color: light-dark(
          color-mix(in oklab, var(--primary) 8%, var(--background)),
          color-mix(in oklab, var(--primary) 18%, var(--background))
        );
        color: var(--foreground);
      }

      > [data-slot='content']:is(a, button):hover {
        background-color: light-dark(
          color-mix(in oklab, var(--primary) 12%, var(--background)),
          color-mix(in oklab, var(--primary) 24%, var(--background))
        );
      }
    }

    &[data-variant='outline'] {
      > [data-slot='content'] {
        border-color: var(--border);
        background-color: var(--background);
        color: var(--foreground);
      }

      > [data-slot='content']:is(a, button):hover {
        background-color: var(--muted);
      }
    }

    &[data-variant='ghost'] {
      > [data-slot='content'] {
        border-radius: 0;
        background-color: transparent;
        padding: 0;
        color: var(--foreground);
      }

      > [data-slot='content']:is(a, button):hover {
        background-color: var(--muted);
      }
    }

    &[data-variant='destructive'] {
      > [data-slot='content'] {
        background-color: light-dark(
          color-mix(in oklab, var(--destructive) 10%, transparent),
          color-mix(in oklab, var(--destructive) 20%, transparent)
        );
        color: var(--destructive);
      }

      > [data-slot='content']:is(a, button):hover {
        background-color: light-dark(
          color-mix(in oklab, var(--destructive) 20%, transparent),
          color-mix(in oklab, var(--destructive) 30%, transparent)
        );
      }
    }

    > [data-slot='reactions'] {
      border-radius: var(--radius-full);
      background-color: var(--muted);
      padding-inline: 0.375rem;
      padding-block: 0.125rem;
      color: var(--foreground);
      box-shadow: 0 0 0 3px var(--background);
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
    }

    [data-slot='reaction'] {
      padding-inline: 0.25rem;
      padding-block: 0.125rem;
      background-color: transparent;
      color: inherit;

      &:hover {
        background-color: color-mix(in oklab, var(--foreground) 8%, transparent);
      }

      &[aria-pressed='true'] {
        background-color: color-mix(in oklab, var(--primary) 15%, transparent);
        color: var(--primary);
      }

      &:focus-visible {
        box-shadow: 0 0 0 2px var(--ring);
      }
    }
  }
}
/* Marker */
@layer loseta.style {
  .marker {
    color: var(--muted-foreground);
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);

    > [data-slot='icon'] > svg {
      width: 1rem;
      height: 1rem;
    }

    > [data-slot='content'] {
      :is(a) {
        text-decoration-line: underline;
        text-underline-offset: 3px;
      }

      :is(a):hover {
        color: var(--foreground);
      }
    }

    &[data-variant='separator'] {
      &::before,
      &::after {
        background-color: var(--border);
      }
    }

    &[data-variant='border'] {
      border-block-end-color: var(--border);
    }
  }
}
/* Message */
@layer loseta.style {
  .message {
    gap: 0.5rem;
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);

    > [data-slot='content'] {
      gap: 0.625rem;
    }

    [data-slot='header'],
    [data-slot='footer'] {
      padding-inline: 0.75rem;
      color: var(--muted-foreground);
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);
      font-weight: 500;
    }

    &:has(.bubble[data-variant='ghost']) [data-slot='header'],
    &:has(.bubble[data-variant='ghost']) [data-slot='footer'] {
      padding-inline: 0;
    }

    > [data-slot='avatar'] {
      min-width: 2rem;
      overflow: hidden;
      border-radius: var(--radius-full);
      background-color: var(--muted);
    }

    > [data-slot='avatar'] > :is(img, svg) {
      width: 2rem;
      height: 2rem;
      object-fit: cover;
    }
  }
}
/* Message Scroller */
@layer loseta.style {
  .message-scroller {
    height: 100%;
    border-style: solid;
    border-width: 1px;
    border-color: var(--border);
    border-radius: var(--radius-lg);
    background-color: var(--background);
  }

  .message-scroller-viewport {
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
    padding: 1rem;
  }

  .message-scroller [data-slot='content'] {
    gap: 1rem;
  }

  .message-scroller [data-slot='jump'] {
    width: 2rem;
    height: 2rem;
    border-color: var(--border);
    border-radius: var(--radius-full);
    background-color: var(--background);
    color: var(--foreground);
    box-shadow: var(--shadow-md);
    transition-property: color, background-color, border-color, box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;

    &:hover {
      background-color: var(--muted);
    }

    &:focus-visible {
      border-color: var(--ring);
      box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
    }

    > svg {
      width: 1rem;
      height: 1rem;
    }
  }
}
/* Questionnaire */
@layer loseta.style {
  .questionnaire {
    > [data-slot='progress'] {
      color: var(--muted-foreground);
      font-size: var(--text-xs);
      line-height: var(--text-xs--line-height);

      > progress {
        block-size: 0.375rem;
        border-radius: var(--radius-full);
        background-color: color-mix(in oklab, var(--primary) 20%, transparent);

        &::-webkit-progress-bar {
          border-radius: inherit;
          background-color: transparent;
        }

        &::-webkit-progress-value {
          border-radius: inherit;
          background-color: var(--primary);
        }

        &::-moz-progress-bar {
          border-radius: inherit;
          background-color: var(--primary);
        }
      }
    }

    [data-slot='item'] {
      > legend {
        font-size: var(--text-lg);
        line-height: var(--text-lg--line-height);
        font-weight: 600;
        text-wrap: balance;
      }

      > [data-slot='description'] {
        margin: 0;
        color: var(--muted-foreground);
        font-size: var(--text-sm);
        line-height: var(--text-sm--line-height);
      }
    }

    .questionnaire-choice {
      border-color: var(--border);
      border-radius: var(--radius-lg);
      background-color: var(--background);
      padding: 0.75rem;
      transition-property: color, background-color, border-color, box-shadow;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;

      &:hover {
        background-color: color-mix(in oklab, var(--muted) 50%, var(--background));
      }

      &:has(input:checked) {
        border-color: var(--ring);
        background-color: color-mix(in oklab, var(--primary) 5%, var(--background));

        [data-slot='description'] {
          color: var(--foreground);
        }
      }

      &:focus-within {
        border-color: var(--ring);
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
      }

      > input {
        width: 1rem;
        height: 1rem;
        accent-color: var(--primary);
      }

      [data-slot='label'] {
        font-size: var(--text-sm);
        line-height: var(--text-sm--line-height);
        font-weight: 500;
      }

      [data-slot='description'] {
        color: var(--muted-foreground);
        font-size: var(--text-sm);
        line-height: var(--text-sm--line-height);
      }
    }

    > [data-slot='item'] > [data-slot='description'] {
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
    }

    [data-slot='input'] {
      border-style: solid;
      border-width: 1px;
      border-color: var(--input);
      border-radius: var(--radius-md);
      background-color: transparent;
      padding-inline: 0.75rem;
      padding-block: 0.5rem;
      color: var(--foreground);
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      outline-style: none;

      &::placeholder {
        color: var(--muted-foreground);
      }

      &:focus-visible {
        border-color: var(--ring);
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
      }

      &[aria-invalid='true'] {
        border-color: var(--destructive);
        box-shadow: 0 0 0 3px
          color-mix(in oklab, var(--destructive) 20%, transparent);
      }
    }

    [data-slot='actions'] {
      border-block-start-style: solid;
      border-block-start-width: 1px;
      border-block-start-color: var(--border);
      padding-block-start: 1rem;
    }

    [data-slot='error'] {
      color: var(--destructive);
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      font-weight: 500;
    }
  }
}
/* Trace */
@layer loseta.style {
  .trace {
    border-block-end-style: solid;
    border-block-end-width: 1px;
    border-block-end-color: var(--border);

    > summary {
      padding-block: 0.5rem;
      color: var(--muted-foreground);
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
      transition-property: color;
      transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
      transition-duration: 150ms;

      &:hover {
        color: var(--foreground);
      }

      &:focus-visible {
        border-radius: var(--radius-sm);
        box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);
      }

      &::after {
        border-color: currentColor;
      }

      > [data-slot='icon'] > svg {
        width: 1rem;
        height: 1rem;
      }

      > [data-slot='title'] {
        color: var(--foreground);
      }

      > [data-slot='status'] {
        border-radius: var(--radius-full);
        background-color: var(--muted);
        padding-inline: 0.375rem;
        padding-block: 0.125rem;
        color: var(--foreground);
        font-size: var(--text-xs);
        line-height: var(--text-xs--line-height);
      }

      > [data-slot='status'][data-variant='error'] {
        background-color: light-dark(
          color-mix(in oklab, var(--destructive) 10%, transparent),
          color-mix(in oklab, var(--destructive) 20%, transparent)
        );
        color: var(--destructive);
      }

      > [data-slot='status'][data-variant='success'] {
        background-color: color-mix(in oklab, var(--primary) 10%, transparent);
        color: var(--foreground);
      }
    }

    > [data-slot='body'] {
      padding-block-end: 0.5rem;
      padding-inline-start: 1.5rem;
      color: var(--muted-foreground);
      font-size: var(--text-sm);
      line-height: var(--text-sm--line-height);
    }

    [data-slot='source'] {
      color: var(--foreground);
      text-decoration-line: underline;
      text-underline-offset: 3px;
    }

    [data-slot='source']:hover {
      color: var(--primary);
    }

    .trace {
      border-block-end-color: color-mix(in oklab, var(--border) 70%, transparent);
    }
  }
}
