/* =====================================================================
   Windows Media Player — after WMP 9 Series in full mode on Windows XP
   (src/apps/mediaplayer/). The XP window manager draws the title bar;
   everything below it is here: the menu bar on the player's blue frame,
   the features taskbar, Now Playing, the Media Library, the transport,
   the status bar.

   Loaded before xp.css, which styles every <button> and <input> globally:
   the player's rules carry the .wmp-player scope (and :not(:disabled) on
   the hover/active states xp.css also styles) so they win the cascade.
   ===================================================================== */

/* ------------------------------------------------------------ window body */

.window > .window-body:has(> .window-content > [data-ordinary-app="windows-media-player"]) {
  margin: 0 3px;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.window > .window-body > .window-content:has(> [data-ordinary-app="windows-media-player"]) {
  width: 100%;
  padding: 0;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ----------------------------------------------------------------- tokens */

.wmp-player {
  --wmp-frame-light: #4a72d0;
  --wmp-frame: #2a52b0;
  --wmp-frame-dark: #163a8e;
  --wmp-frame-edge: #0c2363;
  --wmp-pane-strip-top: #e6edfa;
  --wmp-pane-strip-bottom: #bccdee;
  --wmp-pane-border: #7f9db9;
  --wmp-select: #316ac5;
  --wmp-ink: #000;
  --wmp-ink-soft: #444;
  --wmp-frame-ink: #fff;
  --wmp-frame-ink-soft: #c9d8f6;
  --wmp-list-dark: #13275c;

  container: wmp / inline-size;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--wmp-frame);
  color: var(--wmp-ink);
  font: 11px Tahoma, "Segoe UI", Verdana, sans-serif;
  -webkit-font-smoothing: auto;
  user-select: none;
  outline: none;
}

.wmp-player button {
  font: inherit;
}

/* xp.css's button hover/active/focus bevel never reaches the player's own controls. */
.wmp-player button:not(:disabled):hover,
.wmp-player button:not(:disabled):active,
.wmp-player button:focus {
  box-shadow: none;
  outline: none;
}

.wmp-player button:focus-visible,
.wmp-player [role="slider"]:focus-visible,
.wmp-player [role="listbox"]:focus-visible {
  outline: 1px dotted currentColor;
  outline-offset: -3px;
}

.wmp-player [hidden] {
  display: none !important;
}

/* --------------------------------------------------------------- menu bar */

.wmp-player .wmp-menubar {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  height: 20px;
  padding: 0 2px;
  background: linear-gradient(180deg, var(--wmp-frame-light) 0%, var(--wmp-frame) 100%);
  border-bottom: 1px solid var(--wmp-frame-edge);
}

.wmp-player .wmp-menubar-slot {
  position: relative;
  display: flex;
}

.wmp-player .wmp-menubar-title {
  min-width: 0;
  min-height: 0;
  height: 18px;
  margin: 1px 0;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--wmp-frame-ink);
  line-height: 16px;
}

.wmp-player .wmp-menubar-title u {
  border-bottom-color: currentColor;
}

.wmp-player .wmp-menubar-title:not(:disabled):hover {
  border-color: #8fb0f0 #13328c #13328c #8fb0f0;
  background: rgba(255, 255, 255, 0.12);
}

.wmp-player .wmp-menubar-title.is-open,
.wmp-player .wmp-menubar-title.is-open:not(:disabled):hover {
  border-color: #13328c #8fb0f0 #8fb0f0 #13328c;
  background: rgba(0, 0, 40, 0.25);
}

/* Windows XP menus (drop-down and shortcut). */
.wmp-player .wmp-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  min-width: 190px;
  padding: 2px;
  background: #fff;
  border: 1px solid #aca899;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.35);
  outline: none;
}

.wmp-player .wmp-menu-item {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 20px;
  padding: 0 14px 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--wmp-ink);
  text-align: left;
  white-space: nowrap;
}

.wmp-player .wmp-menu-item:not(:disabled):hover,
.wmp-player .wmp-menu-item:focus {
  background: var(--wmp-select);
  color: #fff;
}

.wmp-player .wmp-menu-item:disabled {
  color: #aca899;
}

.wmp-player .wmp-menu-check {
  text-align: center;
  font-size: 10px;
}

.wmp-player .wmp-menu-shortcut {
  padding-left: 24px;
}

.wmp-player .wmp-menu-separator {
  height: 1px;
  margin: 3px 1px;
  background: #aca899;
}

/* ---------------------------------------------------------- layout frame */

.wmp-player .wmp-main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}

/* The features taskbar: text tasks on the dark frame; the current one is a
   light tab joined to the pane on its right. */
.wmp-player .wmp-taskbar {
  flex: 0 0 112px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 0 8px 6px;
  overflow: hidden auto;
  background: linear-gradient(90deg, var(--wmp-frame-dark) 0%, var(--wmp-frame) 100%);
  border-right: 1px solid var(--wmp-frame-edge);
}

.wmp-player .wmp-task {
  min-width: 0;
  min-height: 0;
  padding: 5px 6px 5px 8px;
  border: 1px solid transparent;
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background: transparent;
  color: var(--wmp-frame-ink);
  text-align: left;
  line-height: 13px;
  cursor: pointer;
}

.wmp-player .wmp-task:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.wmp-player .wmp-task.is-active,
.wmp-player .wmp-task.is-active:hover {
  margin-right: -1px;
  background: linear-gradient(180deg, var(--wmp-pane-strip-top) 0%, var(--wmp-pane-strip-bottom) 100%);
  border-color: #8fb0f0;
  color: #0b2a74;
  font-weight: bold;
}

.wmp-player .wmp-stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

/* ------------------------------------------------------------ Now Playing */

.wmp-player .wmp-now-playing {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #000;
}

.wmp-player .wmp-np-strip {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 20px;
  padding: 3px 8px;
  background: linear-gradient(180deg, var(--wmp-pane-strip-top) 0%, var(--wmp-pane-strip-bottom) 100%);
  border-bottom: 1px solid var(--wmp-pane-border);
  color: #0b2a74;
  box-sizing: border-box;
}

.wmp-player .wmp-np-title {
  min-width: 0;
  overflow: hidden;
  font-weight: bold;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wmp-player .wmp-np-subtitle {
  flex: 0 0 auto;
  color: #3d5a99;
}

.wmp-player .wmp-np-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}

.wmp-player .wmp-video-area {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  background: #000;
  overflow: hidden;
}

.wmp-player .wmp-video-surface,
.wmp-player .wmp-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The picture keeps its own proportions (the library's videos are square):
   fitted and centred in the black area, never stretched or cropped. The
   bars are the area's black, in the window and in full screen alike. */
.wmp-player .wmp-video {
  display: block;
  object-fit: contain;
  object-position: center;
  background: #000;
}

.wmp-video-area:fullscreen {
  background: #000;
}

/* Full screen: WMP 9's control bar over the bottom of the picture. It shows
   on any pointer movement or tap and hides after a few idle seconds, taking
   the cursor with it. */
.wmp-player .wmp-fs-host {
  display: contents;
}

.wmp-player .wmp-fs-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  transition: opacity 0.25s ease;
}

.wmp-player .wmp-fs-bar[data-visible="false"] {
  opacity: 0;
  pointer-events: none;
}

.wmp-video-area:fullscreen:has(.wmp-fs-bar[data-visible="false"]) {
  cursor: none;
}

.wmp-player .wmp-fs-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px;
  background: linear-gradient(180deg, var(--wmp-frame-light) 0%, var(--wmp-frame) 100%);
  border-top: 1px solid var(--wmp-frame-edge);
  color: #fff;
}

.wmp-player .wmp-fs-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: bold;
}

.wmp-player .wmp-fs-exit {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 0;
  height: 21px;
  padding: 0 10px;
  color: #000;
}

.wmp-player .wmp-fs-bar .wmp-controls {
  border-top: 0;
}

.wmp-player .wmp-video-area:focus {
  outline: none;
}

.wmp-player .wmp-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  color: #b8c6e6;
  text-align: center;
  pointer-events: none;
}

.wmp-player .wmp-overlay p {
  max-width: 320px;
  margin: 0;
  line-height: 1.4;
}

.wmp-player .wmp-idle-mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.85) 0 12%, transparent 40%),
    radial-gradient(circle at 50% 55%, #6e9ef0 0%, #2f5fc6 55%, #12307e 100%);
  box-shadow: 0 0 0 2px #0d2255, 0 0 18px rgba(80, 140, 255, 0.35);
  position: relative;
}

.wmp-player .wmp-idle-mark::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 13px;
  border-style: solid;
  border-width: 10px 0 10px 15px;
  border-color: transparent transparent transparent #fff;
}

.wmp-player .wmp-idle-title {
  color: #e3ebff;
  font-size: 13px;
  font-weight: bold;
}

.wmp-player .wmp-overlay-error {
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  pointer-events: auto;
}

/* Try Again: an ordinary XP push button on the error screen. */
.wmp-player .wmp-overlay-button {
  margin-top: 6px;
  min-width: 75px;
  color: #000;
}

.wmp-player .wmp-overlay-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #fff4b0, #f2c018 60%, #b88400);
  color: #000;
  font-weight: bold;
  line-height: 22px;
}

.wmp-player .wmp-busy-bar {
  position: relative;
  width: 120px;
  height: 9px;
  border: 1px solid #6c86c4;
  background: #0b1a44;
  overflow: hidden;
}

.wmp-player .wmp-busy-bar span {
  position: absolute;
  top: 1px;
  bottom: 1px;
  width: 30px;
  background: repeating-linear-gradient(90deg, #6fa6ff 0 6px, transparent 6px 8px);
  animation: wmp-marquee 1.2s linear infinite;
}

@keyframes wmp-marquee {
  from { left: -30px; }
  to { left: 120px; }
}

.wmp-player .wmp-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 48px;
}

.wmp-player .wmp-bars span {
  width: 7px;
  height: 20%;
  background: linear-gradient(0deg, #2d6ad8, #8fd0ff);
}

.wmp-player .wmp-overlay-audio.is-playing .wmp-bars span {
  animation: wmp-bars 0.9s ease-in-out infinite alternate;
}

.wmp-player .wmp-bars span:nth-child(2) { animation-delay: -0.3s; }
.wmp-player .wmp-bars span:nth-child(3) { animation-delay: -0.6s; }
.wmp-player .wmp-bars span:nth-child(4) { animation-delay: -0.15s; }
.wmp-player .wmp-bars span:nth-child(5) { animation-delay: -0.45s; }
.wmp-player .wmp-bars span:nth-child(6) { animation-delay: -0.75s; }
.wmp-player .wmp-bars span:nth-child(7) { animation-delay: -0.2s; }

@keyframes wmp-bars {
  from { height: 15%; }
  to { height: 100%; }
}

/* The Now Playing list. */
.wmp-player .wmp-np-list {
  flex: 0 0 176px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--wmp-list-dark);
  border-left: 1px solid var(--wmp-frame-edge);
  color: #dfe9ff;
}

.wmp-player .wmp-np-list-header,
.wmp-player .wmp-np-list-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-height: 20px;
  padding: 0 4px 0 6px;
  background: linear-gradient(180deg, #33549f 0%, #1b3473 100%);
  border-bottom: 1px solid #0a1a45;
}

.wmp-player .wmp-np-list-footer {
  border-top: 1px solid #0a1a45;
  border-bottom: 0;
  color: var(--wmp-frame-ink-soft);
}

.wmp-player .wmp-np-list-clear,
.wmp-player .wmp-link-button {
  min-width: 0;
  min-height: 0;
  padding: 1px 4px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: inherit;
}

.wmp-player .wmp-np-list-clear:not(:disabled):hover,
.wmp-player .wmp-link-button:not(:disabled):hover {
  border-color: #8fb0f0;
}

.wmp-player .wmp-np-list-clear:disabled {
  color: #6b7fae;
}

.wmp-player .wmp-link-button {
  color: #9cc2ff;
  text-decoration: underline;
}

.wmp-player .wmp-np-list-empty {
  flex: 1 1 auto;
  padding: 10px 8px;
  color: var(--wmp-frame-ink-soft);
}

.wmp-player .wmp-np-list-empty p {
  margin: 0 0 6px;
}

.wmp-player .wmp-np-items {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 2px 0;
  overflow: hidden auto;
  list-style: none;
}

.wmp-player .wmp-np-item {
  display: flex;
  gap: 6px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 2px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #dfe9ff;
  text-align: left;
}

.wmp-player .wmp-np-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.wmp-player .wmp-np-item.is-current,
.wmp-player .wmp-np-item.is-current:hover {
  background: #2f5cc4;
  color: #fff;
  font-weight: bold;
}

.wmp-player .wmp-np-item-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wmp-player .wmp-np-item-length {
  flex: 0 0 auto;
  color: inherit;
  opacity: 0.8;
}

/* ---------------------------------------------------------- Media Library */

.wmp-player .wmp-library {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.wmp-player .wmp-library-toolbar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  min-height: 26px;
  padding: 2px 6px;
  background: linear-gradient(180deg, var(--wmp-pane-strip-top) 0%, var(--wmp-pane-strip-bottom) 100%);
  border-bottom: 1px solid var(--wmp-pane-border);
  box-sizing: border-box;
}

.wmp-player .wmp-library-heading {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #0b2a74;
  font-weight: bold;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wmp-player .wmp-search {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0;
}

.wmp-player .wmp-search-input {
  width: 128px;
  height: 18px;
  padding: 1px 3px;
  border: 1px solid var(--wmp-pane-border);
  border-radius: 0;
  background: #fff;
  font: inherit;
  box-sizing: border-box;
}

.wmp-player .wmp-toolbar-button {
  min-width: 0;
  min-height: 0;
  height: 19px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  color: #0b2a74;
}

.wmp-player .wmp-toolbar-button:not(:disabled):hover {
  border-color: #7f9db9;
  background: rgba(255, 255, 255, 0.6);
}

.wmp-player .wmp-toolbar-button[aria-pressed="true"],
.wmp-player .wmp-toolbar-button[aria-pressed="true"]:not(:disabled):hover {
  border-color: #6b87b8 #fff #fff #6b87b8;
  background: rgba(255, 255, 255, 0.75);
}

.wmp-player .wmp-view-switch {
  display: flex;
  gap: 1px;
}

.wmp-player .wmp-library-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
}

.wmp-player .wmp-library-tree {
  flex: 0 0 132px;
  min-height: 0;
  overflow: auto;
  padding: 4px 0;
  border-right: 1px solid var(--wmp-pane-border);
  background: #fff;
}

.wmp-player .wmp-library-tree ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wmp-player .wmp-tree-item {
  display: flex;
  align-items: center;
  gap: 4px;
  width: calc(100% - 4px);
  min-width: 0;
  min-height: 0;
  margin: 0 2px;
  padding: 2px 3px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--wmp-ink);
  text-align: left;
  white-space: nowrap;
}

.wmp-player .wmp-tree-item.level-2 {
  padding-left: 19px;
}

.wmp-player .wmp-tree-item span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.wmp-player .wmp-tree-item:hover span {
  text-decoration: underline;
}

.wmp-player .wmp-tree-item.is-selected span {
  padding: 0 2px;
  background: var(--wmp-select);
  color: #fff;
  text-decoration: none;
}

.wmp-player .wmp-tree-icon {
  flex: 0 0 16px;
}

.wmp-player .wmp-library-pane {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.wmp-player .wmp-library-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  outline: none;
  user-select: none;
}

/* Details: an XP list view. */
.wmp-player .wmp-list-header,
.wmp-player .wmp-list-row {
  display: grid;
  grid-template-columns: 16px minmax(120px, 1fr) 96px 52px 92px;
  align-items: center;
}

.wmp-player .wmp-list-header {
  flex: 0 0 auto;
  height: 19px;
  background: linear-gradient(180deg, #fff 0%, #f3f2ea 70%, #ebeadb 100%);
  border-bottom: 1px solid #d6d2c2;
}

.wmp-player .wmp-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 19px;
  min-width: 0;
  min-height: 0;
  padding: 0 5px;
  border: 0;
  border-right: 1px solid #c7c5b2;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--wmp-ink);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}

.wmp-player .wmp-list-heading:not(:disabled):hover {
  border-bottom-color: #f9b23c;
  background: #fafaf6;
}

.wmp-player .wmp-sort-arrow {
  color: #aca899;
  font-size: 8px;
}

.wmp-player .wmp-list-row {
  height: 17px;
  cursor: default;
}

.wmp-player .wmp-list-row > span {
  min-width: 0;
  padding: 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wmp-player .wmp-list-row .wmp-col-fav {
  padding: 0;
  color: #d39b00;
  text-align: center;
}

.wmp-player .wmp-list-row.is-playing .wmp-col-title {
  font-weight: bold;
}

.wmp-player .wmp-list-row.is-selected {
  background: var(--wmp-select);
  color: #fff;
}

.wmp-player .wmp-list-row.is-selected .wmp-col-fav {
  color: #ffe58a;
}

.wmp-player .wmp-col-length {
  text-align: right;
}

/* Thumbnails: small frames, captions underneath, as in Explorer. */
.wmp-player .wmp-thumbs {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px 12px;
  padding: 8px;
}

.wmp-player .wmp-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 120px;
  cursor: default;
}

/* Square, like the videos: the box is fixed before any image arrives, and
   an image of another shape is fitted inside it on black, never cropped. */
.wmp-player .wmp-thumb-frame {
  position: relative;
  display: block;
  width: 96px;
  height: 96px;
  aspect-ratio: 1 / 1;
  border: 1px solid #b8c6dd;
  background: #000;
  overflow: hidden;
}

.wmp-player .wmp-thumb-frame img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

/* Until its image arrives a frame is a plain XP panel of the same size: no shift, no animation. */
.wmp-player .wmp-thumb-frame[data-thumb="waiting"],
.wmp-player .wmp-thumb-frame[data-thumb="loading"] {
  background: #dfe6f1;
}

.wmp-player .wmp-thumb-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #e8edf6;
}

.wmp-player .wmp-thumb-length {
  position: absolute;
  right: 2px;
  bottom: 2px;
  padding: 0 3px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 10px;
}

.wmp-player .wmp-thumb-title {
  display: -webkit-box;
  max-width: 116px;
  padding: 0 2px;
  overflow: hidden;
  text-align: center;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}

.wmp-player .wmp-thumb.is-selected .wmp-thumb-frame {
  border-color: var(--wmp-select);
  box-shadow: 0 0 0 1px var(--wmp-select);
}

.wmp-player .wmp-thumb.is-selected .wmp-thumb-title {
  background: var(--wmp-select);
  color: #fff;
}

.wmp-player .wmp-thumb.is-playing .wmp-thumb-title {
  font-weight: bold;
}

/* The empty library. */
.wmp-player .wmp-library-empty {
  padding: 14px 12px;
  color: var(--wmp-ink-soft);
  line-height: 1.45;
}

.wmp-player .wmp-library-empty p {
  margin: 0 0 4px;
}

.wmp-player .wmp-library-empty-title {
  color: var(--wmp-ink);
  font-weight: bold;
}

/* Shortcut menu: positioned inside the library at the pointer. */
.wmp-player .wmp-menu-scrim {
  position: absolute;
  inset: 0;
  z-index: 39;
}

.wmp-player .wmp-context-menu {
  top: auto;
  min-width: 180px;
}

/* ---------------------------------------------------------------- dialogs */

.wmp-player .wmp-dialog-backdrop {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.12);
}

.wmp-player .wmp-dialog {
  width: min(320px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: #ece9d8;
  border: 1px solid #0c2363;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
  user-select: text;
}

.wmp-player .wmp-dialog-title {
  padding: 4px 8px;
  background: linear-gradient(180deg, var(--wmp-pane-strip-top) 0%, var(--wmp-pane-strip-bottom) 100%);
  border-bottom: 1px solid var(--wmp-pane-border);
  color: #0b2a74;
  font-weight: bold;
}

.wmp-player .wmp-dialog-body {
  min-height: 0;
  padding: 10px 12px 4px;
  overflow: auto;
  line-height: 1.45;
}

.wmp-player .wmp-dialog-body p {
  margin: 0 0 6px;
}

.wmp-player .wmp-about-name {
  font-size: 13px;
  font-weight: bold;
}

.wmp-player .wmp-about-note {
  color: var(--wmp-ink-soft);
}

.wmp-player .wmp-dialog-buttons {
  display: flex;
  justify-content: flex-end;
  padding: 6px 12px 10px;
}

.wmp-player .wmp-properties {
  margin: 0 0 6px;
}

.wmp-player .wmp-properties div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 6px;
  padding: 1px 0;
}

.wmp-player .wmp-properties dt {
  color: var(--wmp-ink-soft);
}

.wmp-player .wmp-properties dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.wmp-player .wmp-properties-description {
  padding-top: 6px;
  border-top: 1px solid #d6d2c2;
  white-space: pre-line;
}

/* ------------------------------------------------------- playback controls */

.wmp-player .wmp-controls {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  padding: 3px 8px 4px;
  background: linear-gradient(180deg, var(--wmp-frame-light) 0%, var(--wmp-frame) 45%, var(--wmp-frame-dark) 100%);
  border-top: 1px solid var(--wmp-frame-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Sliders: a thin groove, a fill, a small silver thumb. */
.wmp-player .wmp-slider {
  position: relative;
  height: 13px;
  cursor: pointer;
  touch-action: none;
}

.wmp-player .wmp-slider.is-disabled {
  cursor: default;
}

.wmp-player .wmp-slider-groove {
  position: absolute;
  left: 0;
  right: 0;
  top: 4px;
  height: 4px;
  border: 1px solid #0a1b4f;
  border-radius: 3px;
  background: #0e2463;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.wmp-player .wmp-slider-secondary,
.wmp-player .wmp-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
}

.wmp-player .wmp-slider-secondary {
  background: #36508f;
}

.wmp-player .wmp-slider-fill {
  background: linear-gradient(180deg, #a6d0ff 0%, #4c8ef0 100%);
}

.wmp-player .wmp-slider-thumb {
  position: absolute;
  top: 1px;
  width: 9px;
  height: 11px;
  margin-left: -5px;
  border: 1px solid #1d3f86;
  border-radius: 4px;
  background: linear-gradient(180deg, #fff 0%, #dfe6f3 45%, #a8b8d8 100%);
  box-sizing: border-box;
}

.wmp-player .wmp-slider.is-disabled .wmp-slider-thumb {
  display: none;
}

.wmp-player .wmp-transport {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
}

.wmp-player .wmp-transport-group {
  display: flex;
  gap: 1px;
}

.wmp-player .wmp-transport-spacer {
  flex: 1 1 auto;
}

/* Round silver buttons with dark-blue glyphs; Play/Pause is the large one. */
.wmp-player .wmp-transport-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 1px solid #152f74;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #ffffff 0%, #e4eaf6 38%, #a9b9d9 78%, #7f93bd 100%);
  color: #17357d;
  box-shadow: inset 0 -1px 1px rgba(0, 0, 40, 0.25);
  cursor: pointer;
}

.wmp-player .wmp-transport-button svg {
  fill: currentColor;
}

.wmp-player .wmp-transport-button:not(:disabled):hover {
  background: radial-gradient(circle at 38% 30%, #ffffff 0%, #eef4ff 38%, #b9cdf2 78%, #87a3d8 100%);
  box-shadow: 0 0 4px rgba(150, 200, 255, 0.85), inset 0 -1px 1px rgba(0, 0, 40, 0.2);
}

.wmp-player .wmp-transport-button:not(:disabled):active,
.wmp-player .wmp-transport-button[aria-pressed="true"] {
  background: radial-gradient(circle at 50% 60%, #dfe7f6 0%, #a5b7db 60%, #7489b4 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 40, 0.45);
}

.wmp-player .wmp-transport-button:disabled {
  color: #7f8fb3;
  background: radial-gradient(circle at 38% 30%, #f2f4f8 0%, #d6dce8 50%, #aab4c8 100%);
  border-color: #3a4f86;
  cursor: default;
}

.wmp-player .wmp-transport-button.wmp-play {
  width: 34px;
  height: 34px;
  margin-right: 2px;
  border-color: #0e2463;
  box-shadow: 0 0 0 2px rgba(120, 170, 255, 0.35), inset 0 -2px 2px rgba(0, 0, 40, 0.25);
}

.wmp-player .wmp-transport-group .wmp-transport-button {
  width: 22px;
  height: 22px;
}

.wmp-player .wmp-volume {
  flex: 0 0 68px;
}

.wmp-player .wmp-seek {
  margin: 0 1px 1px;
}

/* ------------------------------------------------------------- status bar */

.wmp-player .wmp-statusbar {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  height: 18px;
  padding: 0 8px;
  background: var(--wmp-frame-edge);
  color: var(--wmp-frame-ink-soft);
  line-height: 18px;
}

.wmp-player .wmp-status-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wmp-player .wmp-status-text.is-error {
  color: #ffd36b;
}

.wmp-player .wmp-status-time {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------- narrow windows, phones */

/* Below WMP's own minimum width the taskbar folds into a row of tabs over
   the pane, the Now Playing list moves under the video, and the library
   relies on those tabs instead of its tree. */
@container wmp (max-width: 560px) {
  .wmp-player .wmp-main {
    flex-direction: column;
  }

  .wmp-player .wmp-taskbar {
    flex: 0 0 auto;
    flex-direction: row;
    gap: 2px;
    padding: 4px 4px 0;
    overflow: auto hidden;
    scrollbar-width: none;
    background: linear-gradient(180deg, var(--wmp-frame) 0%, var(--wmp-frame-dark) 100%);
    border-right: 0;
    border-bottom: 1px solid var(--wmp-frame-edge);
  }

  .wmp-player .wmp-taskbar::-webkit-scrollbar {
    display: none;
  }

  .wmp-player .wmp-task {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-right: 1px solid transparent;
    border-bottom: 0;
    border-radius: 4px 4px 0 0;
    white-space: nowrap;
  }

  .wmp-player .wmp-task.is-active,
  .wmp-player .wmp-task.is-active:hover {
    margin: 0 0 -1px;
    border-right-color: #8fb0f0;
  }

  .wmp-player .wmp-np-body {
    flex-direction: column;
  }

  .wmp-player .wmp-np-list {
    flex: 0 0 auto;
    max-height: 40%;
    border-left: 0;
    border-top: 1px solid var(--wmp-frame-edge);
  }

  .wmp-player .wmp-library-tree {
    display: none;
  }

  .wmp-player .wmp-list-header,
  .wmp-player .wmp-list-row {
    grid-template-columns: 16px minmax(0, 1fr) 96px 52px;
  }

  .wmp-player .wmp-col-date {
    display: none !important;
  }

  .wmp-player .wmp-search-input {
    width: 104px;
  }

  .wmp-player .wmp-volume {
    flex-basis: 56px;
  }
}

@container wmp (max-width: 420px) {
  .wmp-player .wmp-list-header,
  .wmp-player .wmp-list-row {
    grid-template-columns: 16px minmax(0, 1fr) 52px;
  }

  .wmp-player .wmp-col-category {
    display: none !important;
  }

  .wmp-player .wmp-library-heading {
    flex-basis: 100%;
  }

  .wmp-player .wmp-search {
    flex: 1 1 auto;
  }

  .wmp-player .wmp-search-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .wmp-player .wmp-thumbs {
    justify-content: center;
  }

  .wmp-player .wmp-transport {
    gap: 3px;
  }

  .wmp-player .wmp-repeat {
    display: none !important;
  }
}

/* Touch: the same controls, sized for a finger. */
@media (pointer: coarse) {
  .wmp-player .wmp-menubar {
    height: 26px;
  }

  .wmp-player .wmp-menubar-title {
    height: 24px;
    padding: 0 10px;
    line-height: 22px;
  }

  .wmp-player .wmp-menu-item {
    height: 32px;
  }

  .wmp-player .wmp-task,
  .wmp-player .wmp-tree-item {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .wmp-player .wmp-list-row {
    height: 32px;
  }

  .wmp-player .wmp-np-item {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .wmp-player .wmp-slider {
    height: 24px;
  }

  .wmp-player .wmp-slider-groove {
    top: 9px;
  }

  .wmp-player .wmp-slider-thumb {
    top: 4px;
    width: 14px;
    height: 16px;
    margin-left: -7px;
  }

  .wmp-player .wmp-transport-button,
  .wmp-player .wmp-transport-group .wmp-transport-button {
    width: 36px;
    height: 36px;
  }

  .wmp-player .wmp-transport-button.wmp-play {
    width: 44px;
    height: 44px;
  }

  .wmp-player .wmp-search-input {
    height: 28px;
    font-size: 16px; /* below 16px iOS zooms the page on focus */
  }

  .wmp-player .wmp-toolbar-button {
    height: 28px;
  }

  .wmp-player .wmp-fs-exit {
    height: 32px;
  }
}
