/* ---------------------------------
-----  dimension variables --------
---------------------------------- */
/* ------  standard elements padding & margin  ------- */
/* spacing */
/**
**  Official Font sizes
------------------------------- */
/**
** Line-heights
------------------------------- */
/*
  Mixin to progressively-enhance :focus-visible, keeping :focus where not supported
  Add an arbitrary list of selectors into the arguments, and the styling in the block.
  I you pass no selectors to the mixin the parent ("ampersand") operator is used instead.

  There are two mixins:
  - focus-visible: a generic focus-visible, giving you "slots" to decide what to render for :focus, :focus reset, and :focus-visible
  - focus-visible-outline: a focus-visible, which only resets the outline. If you don't need more custom resets, use this one!

  Use focus-visible:
  The key thing here is checking which slot is being rendered.
  For example, you can reset box-shadow here, or anything else.

  @include focus-visible using ($slot) {
      @if $slot == focus {
          outline: 2px solid transparent;
          box-shadow: 0 0 0 4px blue;
      }
      @if $slot == focusReset {
          box-shadow: none;
      }
      @if $slot == focusVisible {
          box-shadow: 0 0 0 4px blue;
      }
  }

  Use focus-visible-outline:
  @include focus-visible-outline("button", "a[href]") {
      outline: 2px solid blue;
  }

  Resulting CSS (compressed):

  button:focus,
  a[href]:focus {
      outline: 2px solid blue;
  }

  button:focus:not(:focus-visible),
  a[href]:focus:not(:focus-visible) {
      outline: none;
  }
  button:focus-visible,
  a[href]:focus-visible {
      outline: 2px solid blue;
  }
*/
:host {
  display: flex;
  padding: 15px 10px;
  border-inline-end: 1px solid #9ea9b0;
  border-block-end: 1px solid #9ea9b0;
  grid-column: auto/span var(--ux-cell-span);
  gap: 0 10px;
  position: relative;
}

:host([borderless]) {
  border: 0;
}

::slotted(ux-copy) {
  margin-block-start: 0;
  margin-block-end: 0;
}

:host([sortable]) {
  cursor: pointer;
}

:host([head]) {
  flex-direction: row;
  text-transform: uppercase;
  background-color: #c3cfd6;
}
:host([head]) #labelContainer {
  align-items: normal;
}
@container style(--trumpf-ux-theme: web) {
  :host([head]) #labelContainer {
    align-items: end;
  }
}

:host([sorted][head]) #labelContainer {
  border-color: black;
}

#labelContainer {
  display: flex;
  align-items: center;
  gap: 0 10px;
  padding-block-start: 5px;
  padding-block-end: 5px;
  border-block-end: 1px solid transparent;
}

:host(:not([head]):hover) {
  background-color: var(--ux-table-col-hover-color, #f0f0f0);
}

#resize {
  position: absolute;
  right: -15px;
  top: 0;
  bottom: 0;
  border: none;
  z-index: 10;
  cursor: col-resize;
  transform: ease-in 0.2s max-width;
  background-color: transparent;
  padding: 5px 15px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  outline: none;
}
#resize.onresize {
  transform: scale(0.9);
}
#resize:after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 4px;
  width: 0;
  height: 0;
  border-right: 10px solid transparent;
  border-bottom: 10px solid #9ea9b0;
}
#resize:focus-visible {
  background-color: #9ea9b0;
  transform: scale(0.9);
}
#resize:focus-visible:after {
  content: unset;
}
#resize:hover {
  background-color: #9ea9b0;
}
#resize:hover:after {
  content: unset;
}