@use "lib/mixins";
@use "settings/helpers";
@use "settings/type";

// --------------------------------------------------------------
// Base styling
// --------------------------------------------------------------

// Base
.plyr {
  @include mixins.plyr-font-smoothing(type.$plyr-font-smoothing);
  align-items: center;
  direction: ltr;
  display: flex;
  flex-direction: column;
  font-family: type.$plyr-font-family;
  font-variant-numeric: tabular-nums; // Force monosace-esque number widths
  font-weight: type.$plyr-font-weight-regular;
  height: 100%;
  line-height: type.$plyr-line-height;
  max-width: 100%;
  min-width: 200px;
  position: relative;
  text-shadow: none;
  transition: box-shadow 0.3s ease;
  z-index: 0; // Force any border radius

  // Media elements
  video,
  audio,
  iframe {
    display: block;
    height: 100%;
    width: 100%;
  }

  button {
    font: inherit;
    line-height: inherit;
    width: auto;
  }

  // Ignore focus
  &:focus {
    outline: 0;
  }
}

// border-box everything
// http://paulirish.com/2012/box-sizing-border-box-ftw/
@if helpers.$plyr-border-box {
  .plyr--full-ui {
    box-sizing: border-box;

    *,
    *::after,
    *::before {
      box-sizing: inherit;
    }
  }
}

// Fix 300ms delay
@if helpers.$plyr-touch-action {
  .plyr--full-ui {
    a,
    button,
    input,
    label {
      touch-action: manipulation;
    }
  }
}
