import { css } from 'lit';
import componentStyles from '../../styles/component.styles.mjs';

const styles = css`
  ${componentStyles}

  :host {
    display: block;
    --header-height: 56px;
    --header-icon-size: 24px;
  }

  .stepper_header-scroll-container {
    overflow-x: auto;

    /* Hide scrollbar in Firefox */
    scrollbar-width: none;
  }

  /* Hide scrollbar in webkit */
  .stepper_header-scroll-container::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .stepper__header {
    display: flex;
    align-items: center;
    white-space: nowrap;
  }

  .stepper__header-item {
    display: flex;
    align-items: center;
    padding-inline: var(--flow-ui-spacing-large);
    height: var(--header-height);
    box-sizing: content-box;
  }

  .stepper__header-item--active {
    background-color: var(--flow-ui-color-neutral-400);
  }

  .stepper__header-item-icon {
    position: relative;
    width: var(--header-icon-size);
    height: var(--header-icon-size);
    margin-right: var(--flow-ui-spacing-x-small);
    flex: none;
    border-radius: var(--flow-ui-border-radius-circle);
    color: var(--flow-ui-color-neutral-800);
    background-color: var(--flow-ui-color-neutral-500);
  }

  .stepper__header-item--active .stepper__header-item-icon,
  .stepper__header-item--complete .stepper__header-item-icon {
    color: var(--flow-ui-color-primary-contrast);
    background-color: var(--flow-ui-color-primary-500);
  }

  .stepper__header-item-icon-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .stepper__header-item-label {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 50px;
    vertical-align: middle;
    line-height: var(--flow-ui-line-height-dense);
    color: var(--flow-ui-color-neutral-800);
  }

  .stepper__header-item--active .stepper__header-item-label {
    font-weight: var(--flow-ui-font-weight-semibold);
    color: var(--flow-ui-color-text);
  }

  .stepper__header-item-title {
    font-size: var(--flow-ui-font-size-medium);
  }

  .stepper__header-item-subtitle {
    font-size: var(--flow-ui-font-size-800);
  }

  .stepper__header-line {
    border-top-width: 1px;
    border-top-style: solid;
    flex: auto;
    height: 0;
    margin: 0 calc(var(--flow-ui-spacing-large) / -2);
    min-width: 32px;
    border-top-color: var(--flow-ui-color-neutral-600);
  }
`;

export { styles as default };
