@use './tokens' as kt;

@include kt.block {
  &__header {
    display: block;
    flex-shrink: 0;
    margin-bottom: 12px;
  }

  &__header-layout {
    display: flex;
    flex: 1 1 0;
    gap: 12px;
    align-items: flex-end;
    justify-content: space-between;
    min-width: 0;
  }

  &__header-content {
    display: grid;
    flex: 1 1 auto;
    gap: 8px;
    min-width: 0;
  }

  &__header-title-row {
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 0;
  }

  &__header-title {
    min-width: 0;
    font-size: 16px;
    font-weight: 500;
  }

  &__header-controls {
    display: grid;
    gap: 6px;
    align-items: start;
    min-width: 0;
  }

  &__header-control-group {
    display: flex;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    min-width: 0;
  }

  &__header-control-group--grow {
    flex: 0 1 auto;
  }

  &__header-control-label {
    flex: 0 0 auto;
    font-weight: 500;
    line-height: 32px;
  }

  &__header-control-muted {
    flex: 0 0 auto;
    line-height: 32px;
    color: hsl(var(--muted-foreground));
  }

  &__header-tabs {
    min-width: 0;

    .ant-tabs-nav {
      margin: 0;
    }
  }

  &__header-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    min-height: 32px;
  }

  &__header-button {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
  }

  &__header-toolbar {
    display: flex;
    flex-shrink: 0;
    align-items: center;
  }

  &__header-divider {
    margin-inline: 8px;
  }

  &__button-icon,
  &__toolbar-icon {
    width: 16px;
    height: 16px;
  }

  &__toolbar-button {
    width: 32px;
    height: 32px;
  }
}
