/* Colours and sizes follow @pl/ui-theme */
.pl-splash {
  --primary-color: #37003c;
  --secondary-color: #ff2882;
  --light-color: #ebebe6;
  --splash-font-family:
    PremierLeague, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Noto Sans',
    'Liberation Sans', Arial, sans-serif;
  --text-secondary: #5a505f;
  --divider: #e0e0e0;
  --skeleton-bg: var(--light-color);
  --skeleton-pulse: rgba(0, 0, 0, 0.2);

  /* Side bar, as pl-side-bar's fill modes; vanilla and light by default */
  --side-bar-width: 275px;
  --side-bar-mini-width: 70px;
  --side-bar-surface: #ffffff;
  --side-bar-skeleton: var(--light-color);
  --side-bar-skeleton-pulse: rgba(0, 0, 0, 0.2);
  --tertiary-color: #12e6ff;
  --quaternary-color: #db25ff;

  &,
  & * {
    box-sizing: border-box;
  }

  overflow: hidden;
  font-family: var(--splash-font-family);
  margin: 0;
  padding: 0;
  position: relative;

  .splash__container {
    background-color: #ffffff;
  }

  .skeleton__screen {
    display: flex;
    height: 100vh;
    height: 100dvh;
  }

  /* Side bar */
  .skeleton__sidebar {
    --skeleton-bg: var(--side-bar-skeleton);
    --skeleton-pulse: var(--side-bar-skeleton-pulse);

    width: var(--side-bar-width);
    flex-shrink: 0;
    background: var(--side-bar-surface);
    display: flex;
    flex-direction: column;
    padding: 32px 20px 68px;
    gap: 15px;
    border: 0;
    border-right: 3px solid transparent;
    border-image: linear-gradient(to bottom, var(--tertiary-color), var(--quaternary-color)) 1;
  }

  .skeleton__sidebar-header {
    display: flex;
    gap: 12px;
    flex: 0 0 auto;
  }

  .skeleton__sidebar-header-row {
    width: 80%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
  }

  .skeleton__sidebar-header-circle {
    height: 32px;
    width: 32px;
  }

  .skeleton__sidebar-header-heavy-line {
    width: 128px;
    height: 12px;
  }

  .skeleton__sidebar-header-short-line {
    width: 90px;
    height: 8px;
  }

  .skeleton__sidebar-items {
    display: flex;
    flex-direction: column;
    gap: 35px;
    margin-top: 32px;
    flex: 1 1 auto;
    padding-left: 1px;
  }

  .skeleton__sidebar-row {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .skeleton__sidebar-icon {
    height: 24px;
    width: 24px;
  }

  .skeleton__sidebar-item-line {
    height: 16px;
    width: 128px;
  }

  .skeleton__sidebar-footer {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 10px;
    display: flex;
    justify-content: center;
  }

  .skeleton__sidebar-footer-line {
    width: 128px;
    height: 12px;
  }

  /* Content */
  .skeleton__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--primary-color);
  }

  .skeleton__content-main {
    height: 100%;
    width: 100%;
    display: flex;
    gap: 24px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 48px;
  }

  /* Header */
  .search-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    width: 100%;
    min-height: 50px;
    background-color: #ffffff;
    border-bottom: 1px solid var(--divider);
  }

  .skeleton__content-search-line {
    width: 200px;
    height: 24px;
  }

  .skeleton__content-search-circle {
    height: 32px;
    width: 32px;
    margin-right: 20px;
  }

  /* Logo and title */
  .skeleton__logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
  }

  .skeleton__logo-image {
    max-width: 116px;
    width: auto;
    height: 48px;
    object-fit: contain;
  }

  .skeleton__logo-separator {
    width: 2px;
    height: 50px;
    background-color: var(--primary-color);
  }

  .skeleton__logo-title {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 24px;
    margin: 16px 0;
  }

  /* Spinner, as pl-loader */
  .spinner__wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1em;
  }

  .spinner__icon {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--secondary-color);
    animation: pl-splash-spin 0.6s linear infinite;
  }

  .skeleton__subtext {
    font-weight: bold;
    font-size: 20px;
    color: var(--primary-color);
  }

  /* Skeleton blocks, as pl-skeleton-loader */
  .skeleton__wrapper {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    background-color: var(--skeleton-bg);
    animation: pl-splash-pulse 1.6s ease-in-out infinite;
  }

  .skeleton__sidebar-header-circle .skeleton__wrapper,
  .skeleton__content-search-circle .skeleton__wrapper {
    border-radius: 50%;
  }

  /* pl-side-bar is a mini rail on tablets and hidden on phones */
  @media screen and (min-width: 768px) and (max-width: 991px) {
    .skeleton__sidebar {
      width: var(--side-bar-mini-width);
      padding: 32px 0 68px;
      align-items: center;
    }

    .skeleton__sidebar-header-row,
    .skeleton__sidebar-item-line,
    .skeleton__sidebar-footer {
      display: none;
    }
  }

  @media screen and (max-width: 767px) {
    .skeleton__sidebar {
      display: none;
    }

    .skeleton__content-main {
      padding: 0.5em;
      gap: 0.2em;
    }

    .skeleton__logo-title {
      font-size: 20px;
    }

    .skeleton__subtext {
      font-size: 16px;
      color: var(--text-secondary);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .skeleton__wrapper {
      animation: none;
    }

    .spinner__icon {
      animation-duration: 1.5s;
    }
  }
}

.pl-splash--premierleague {
  --side-bar-surface: #37003c;
  --side-bar-skeleton: rgba(255, 255, 255, 0.15);
  --side-bar-skeleton-pulse: rgba(255, 255, 255, 0.3);
  --tertiary-color: #05f0ff;
  --quaternary-color: #ff2882;
}

.pl-splash--efl {
  --side-bar-surface: linear-gradient(180deg, #2d3a80 0%, #283270 55%, #1d2559 100%);
  --side-bar-skeleton: rgba(255, 255, 255, 0.15);
  --side-bar-skeleton-pulse: rgba(255, 255, 255, 0.3);
  --tertiary-color: #001489;
  --quaternary-color: #ba0c2f;
}

.pl-splash--dark {
  --side-bar-surface: #1b1b1f;
  --side-bar-skeleton: rgba(255, 255, 255, 0.15);
  --side-bar-skeleton-pulse: rgba(255, 255, 255, 0.3);
}

@keyframes pl-splash-pulse {
  50% {
    background-color: var(--skeleton-pulse);
  }
}

@keyframes pl-splash-spin {
  to {
    transform: rotate(360deg);
  }
}
