/*
    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;
    }
*/
/**
* @prop --uic-tile-box-shadow: default shadow of the tile
* @prop --uic-tile-dragging-outline: outline while dragging is enabled
* @prop --uic-tile-dragging-opacity: opacity while dragging is enabled
* @prop --uic-tile-header-font-size: font size of header label/title
* @prop --uic-tile-header-font-weight: font weight of header label/title
* @prop --uic-tile-header-border-background: background color of the border between header and content
* @prop --uic-tile-header-border-box-shadow: box shadow of the border between header and content
* @prop --uic-tile-background-color: font color of the tile, different for different variants
* @prop --uic-tile-color: background color of the tile, different for different variants
* @prop --uic-tile-border: border of the tile, different for different variants
* @prop --uic-tile-hover-border: border of the tile when hovered, different for different variants
* @prop --uic-tile-hover-color: font color of the tile when hovered, different for different variants;
* @prop --uic-tile-hover-header-border-box-shadow: box shadow of the border between header and content when hovered, different for different variants
* @prop --uic-tile-active-border: border of the tile when active, different for different variants
* @prop --uic-tile-active-background: background color of the tile when active, different for different variants
* @prop --uic-tile-active-color: font color of the tile when active, different for different variants
* @prop --uic-tile-active-dragging-outline: outline while dragging is enabled and tile is active
* @prop --uic-tile-active-dragging-opacity: opacity while dragging is enabled and tile is active
* @prop --uic-tile-focus-outline: outline of the tile when focused, different for different variants
* @prop --uic-tile-focus-outline-offset: outline offset of the tile when focused, different for different variants
* @prop --uic-tile-focus-dragging-outline: outline while dragging is enabled and tile is focused
* @prop --uic-tile-focus-dragging-outline-offset: outline offset while dragging is enabled and tile is focused
*/
uic-tile {
  display: block;
}

.uic-tile {
  display: flex;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--uic-tile-box-shadow);
  background: var(--uic-tile-background-color);
  color: var(--uic-tile-color);
  border: var(--uic-tile-border);
}
.uic-tile--dragable {
  cursor: grab;
}
.uic-tile--clickable {
  cursor: pointer;
}
.uic-tile--dragging {
  outline: var(--uic-tile-dragging-outline);
  opacity: var(--uic-tile-dragging-opacity);
  cursor: move;
}
.uic-tile:focus {
  outline: none;
}
.uic-tile--dragable:hover, .uic-tile--clickable:hover {
  border: var(--uic-tile-hover-border);
  color: var(--uic-tile-hover-color);
}
.uic-tile--clickable:hover .uic-tile__border::after, .uic-tile--dragable:hover .uic-tile__border::after {
  box-shadow: var(--uic-tile-hover-header-border-box-shadow);
}
.uic-tile--dragable:active, .uic-tile--clickable:active {
  border: var(--uic-tile-active-border);
  background: var(--uic-tile-active-background);
  color: var(--uic-tile-active-color);
}
.uic-tile--dragable.uic-tile--dragging:active {
  outline: var(--uic-tile-active-dragging-outline);
  opacity: var(--uic-tile-active-dragging-opacity);
  cursor: move;
}
.uic-tile--dragable:focus, .uic-tile--clickable:focus {
  outline: var(--uic-tile-focus-outline);
  outline-offset: var(--uic-tile-focus-outline-offset);
}
.uic-tile--dragable.uic-tile--dragging:focus {
  outline: var(--uic-tile-focus-dragging-outline);
  outline-offset: var(--uic-tile-focus-dragging-outline-offset);
  opacity: 1;
  cursor: move;
}
.uic-tile__header {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  flex-direction: row;
  align-items: center;
  margin-bottom: 8px;
  padding: 13px 0 6px;
}
.uic-tile__close-button {
  margin-right: 8px;
}
.uic-tile__label {
  height: fit-content;
  font-size: var(--uic-tile-header-font-size);
  font-weight: var(--uic-tile-header-font-weight);
}
.uic-tile--outline.uic-tile--dragable:active, .uic-tile--outline.uic-tile--clickable:active {
  box-shadow: none;
}
.uic-tile--outline.uic-tile--with-content .uic-tile__content {
  height: 100%;
}
.uic-tile--outline.uic-tile--with-content .uic-tile__content-container {
  align-items: center;
  flex-direction: column;
}
.uic-tile--with-content {
  align-items: flex-start;
  justify-content: flex-start;
}
.uic-tile--with-content .uic-tile__icon {
  margin: 0 0 0 8px;
}
.uic-tile--with-content .uic-tile__label {
  min-width: 30%;
  flex-grow: 1;
  margin: 0 0 0 14px;
}
.uic-tile--with-content .uic-tile__icon + .uic-tile__label {
  margin: 0 0 0 8px;
}
.uic-tile--with-content .uic-tile__content {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
  flex: 1;
  flex-direction: row;
  justify-content: center;
  overflow: hidden;
}
.uic-tile--with-content .uic-tile__content-container {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: row;
  justify-content: center;
}
.uic-tile--with-content .uic-tile__content-container--hidden {
  opacity: 0;
}
.uic-tile--with-content .uic-tile__loader-container {
  display: flex;
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: var(--uic-tile-loader-container-z-index);
  align-items: center;
  justify-content: center;
}
.uic-tile--with-content .uic-tile__border {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  position: absolute;
  left: 0;
  margin: 0;
}
.uic-tile--with-content .uic-tile__border::after {
  content: "";
  width: 100%;
  height: 1px;
  position: absolute;
  top: 8px;
  left: 0;
  background: var(--uic-tile-header-border-background);
  box-shadow: var(--uic-tile-header-border-box-shadow);
}
.uic-tile--with-content.uic-tile--outline .uic-tile__border {
  display: none;
}
.uic-tile--with-content.uic-tile--outline .uic-tile__header {
  display: none;
}
@media only screen and (max-width: 1919px) {
  .uic-tile .uic-tile__header {
    height: 41px;
  }
  .uic-tile .uic-tile__loader {
    width: 128px;
  }
  .uic-tile .uic-tile__border {
    top: 40px;
  }
}
@media only screen and (min-width: 1920px) {
  .uic-tile .uic-tile__header {
    height: 49px;
  }
  .uic-tile .uic-tile__icon {
    margin: 4px 0 4px 8px !important;
  }
  .uic-tile .uic-tile__loader {
    width: 154px;
  }
  .uic-tile .uic-tile__border {
    top: 48px;
  }
}
@media only screen and (max-width: 1023px) {
  .uic-tile .uic-tile__header {
    height: 31px;
  }
  .uic-tile .uic-tile__icon {
    margin: 2px 0 2px 8px !important;
  }
  .uic-tile .uic-tile__loader {
    width: 96px;
  }
  .uic-tile .uic-tile__border {
    top: 30px;
  }
}