/*
 * Default Skin
 *
 * The player controls are styled by the Video.js Neutral skin in its own shadow root (js/player.min.js).
 * This file styles what is outside of it: the container, the captions and the playlist.
 * Everything is scoped to #UseyourDrive and resets what themes commonly set, because the theme's
 * CSS applies to these elements.
 */

#UseyourDrive .wpcp26 {
    --wpcp26-font: var(--wpcp-font);
    --wpcp26-radius: var(--wpcp--present--border--radius, 10px);
    --wpcp26-radius-small: calc(var(--wpcp26-radius) * 0.6);
    /*
     * The colors of the plugin (the role tokens of CSS.php). These are resolved here, on .wpcp26: a rule
     * inside the layer over the video (wpcp-theme-dark, main.js) that needs the dark values uses the
     * --wpcp-color-* tokens directly instead.
     */
    --wpcp26-text: var(--wpcp-color-text);
    --wpcp26-muted: var(--wpcp-color-text-subtle);
    --wpcp26-surface: var(--wpcp-color-bg);
    --wpcp26-card: var(--wpcp-color-surface);
    --wpcp26-hover: var(--wpcp-color-fill);
    --wpcp26-line: var(--wpcp-color-border);
    --wpcp26-accent: var(--wpcp-color-accent);
    --wpcp26-current: var(--wpcp-color-accent-soft);
    /* Filled fields without a border (search, view switch), in light and dark themes */
    --wpcp26-fill: var(--wpcp-color-fill);
    /* Text on the accent color: white, or dark on a light accent */
    --wpcp26-on-accent: var(--wpcp-color-on-accent);

    /* Video.js skin settings */
    --media-font-family: var(--wpcp26-font);
    --media-accent-color: var(--wpcp26-accent);
    --media-accent-text-color: var(--wpcp26-on-accent);
    --media-border-radius: var(--wpcp26-radius);
    --media-scale-unit: 16px;
    --media-object-fit: contain;

    position: relative;
    width: 100%;
    margin: 0 auto;
    /* The playlist adapts to the width of the module, which can be narrow on a wide screen */
    container: wpcp26 / inline-size;
    font-family: var(--wpcp26-font);
    font-style: normal;
    font-weight: 400;
    line-height: 1.4;
    color: var(--wpcp26-text);
    text-align: start;
}

#UseyourDrive .wpcp26 *,
#UseyourDrive .wpcp26 *::before,
#UseyourDrive .wpcp26 *::after {
    box-sizing: border-box;
}

/* Reset of the buttons, lists and images of this skin, which themes often style */
#UseyourDrive .wpcp26 button {
    appearance: none;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: inherit;
    font: inherit;
    letter-spacing: normal;
    line-height: inherit;
    text-align: start;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    cursor: pointer;
}

#UseyourDrive .wpcp26 button:focus {
    outline: none;
}

#UseyourDrive .wpcp26 button:focus-visible,
#UseyourDrive .wpcp26 a:focus-visible,
#UseyourDrive .wpcp26 input:focus-visible {
    outline: 2px solid var(--wpcp-color-focus);
    outline-offset: -2px;
}

#UseyourDrive .wpcp26 ul,
#UseyourDrive .wpcp26 ol,
#UseyourDrive .wpcp26 li {
    margin: 0;
    padding: 0;
    list-style: none;
    background: none;
    border: 0;
}

#UseyourDrive .wpcp26 li::before,
#UseyourDrive .wpcp26 li::after {
    content: none;
}

#UseyourDrive .wpcp26 img {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

#UseyourDrive .wpcp26 svg {
    display: block;
}

#UseyourDrive .wpcp26 [hidden] {
    display: none !important;
}

/* Player */

#UseyourDrive .wpcp26__stage {
    position: relative;
    min-height: 120px;
    border-radius: var(--wpcp26-radius);
    background: #000; /* palette: fixed */
}

/*
 * Until the player is there (loading, or a message instead of the player) a video module already has
 * the height of the aspect ratio of the module settings, so the page doesn't shift when it loads. The
 * 'responsive' ratio is only known when the video loads, so that one starts at 16:9.
 */
#UseyourDrive .wpcp26[data-mode='video']:not(.wpcp26--ready) .wpcp26__stage {
    aspect-ratio: var(--wpcp26-aspect-ratio, 16/9);
    max-height: 80vh;
}

#UseyourDrive .wpcp26 wpcp-video-player,
#UseyourDrive .wpcp26 wpcp-video-neutral-skin,
#UseyourDrive .wpcp26 wpcp-audio-player,
#UseyourDrive .wpcp26 wpcp-audio-neutral-skin {
    display: block;
    width: 100%;
}

/*
 * The video keeps its aspect ratio and is at most 80% of the screen height, so a portrait video (9:16)
 * gets narrower instead of taller than the screen. With the 'responsive' ratio the player uses the ratio
 * of the video itself (--wpcp26-video-ratio, set when the video loads).
 */
#UseyourDrive .wpcp26 wpcp-video-neutral-skin {
    --wpcp26-ratio: var(--wpcp26-video-ratio, var(--wpcp26-aspect-ratio, 16/9));
    --wpcp26-max-video-height: 80vh;
    aspect-ratio: var(--wpcp26-ratio);
    width: min(100%, calc(var(--wpcp26-max-video-height) * var(--wpcp26-ratio)));
    margin-inline: auto;
}

#UseyourDrive .wpcp26 video {
    max-width: none;
    margin: 0;
    border: 0;
}

/*
 * The player is a layer of its own: the captions box of the video has a z-index of 20, which would
 * otherwise put the captions on top of the playlist that opens over the video
 */
#UseyourDrive .wpcp26 .wpcp26__player {
    isolation: isolate;
}

/* Native captions */
#UseyourDrive .wpcp26 video::cue {
    background: rgba(20, 20, 20, 0.5); /* palette: fixed */
    color: #fff; /* palette: fixed */
    font-family: var(--wpcp26-font);
}

/*
 * Captions a little above the bottom edge, and above the control bar while it shows. The Neutral skin
 * sets --media-caption-track-y for this, but its rule is in the shadow root and doesn't reach the video,
 * which is in the page. Chrome, Edge and Safari; Firefox gets a line higher in main.js (lift_captions).
 */
#UseyourDrive .wpcp26 video::-webkit-media-text-track-container {
    translate: 0 calc(var(--media-caption-track-y, 0px) - 4px);
    transition: translate var(--media-caption-track-duration, 0s) ease-out;
    transition-delay: var(--media-caption-track-delay, 0s);
}

/* Audio: the controls follow the light or dark theme of the plugin */
#UseyourDrive .wpcp26[data-mode='audio'] .wpcp26__stage {
    padding: 12px;
    background: var(--wpcp26-surface);
}

/* Cover, title and artist: slotted into the audio skin (see the neutral-audio patches in build.mjs) */
#UseyourDrive .wpcp26__cover {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    overflow: hidden;
    border-radius: var(--wpcp26-radius-small);
    background: var(--wpcp26-line);
    color: var(--wpcp26-muted);
}

#UseyourDrive .wpcp26__cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#UseyourDrive .wpcp26__now-playing-text {
    flex: 1;
    min-width: 0;
    text-align: center;
}

#UseyourDrive .wpcp26__now-playing-title,
#UseyourDrive .wpcp26__now-playing-artist {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#UseyourDrive .wpcp26__now-playing-title {
    font-size: var(--wpcp-text-lg, 17px);
    font-weight: 600;
}

/* The title with the (i) of the description, centred like the title alone */
#UseyourDrive .wpcp26__now-playing-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
}

#UseyourDrive .wpcp26__now-playing-row .wpcp26__now-playing-title {
    min-width: 0;
}

/* Out of the line height of the title, so it doesn't make the title row taller */
#UseyourDrive .wpcp26 .wpcp26__now-playing-info {
    margin-block: -6px;
}

#UseyourDrive .wpcp26__now-playing-artist {
    color: var(--wpcp26-muted);
    font-size: var(--wpcp-text-sm, 13px);
}

/* Narrow players: a small cover next to the title, the controls get the full width below (skin.css) */
#UseyourDrive .wpcp26[data-mode='audio'] .wpcp26__stage {
    container: wpcp26-audio / inline-size;
}

@container wpcp26-audio (width < 480px) {
    #UseyourDrive .wpcp26__cover {
        width: 48px;
        height: 48px;
    }

    #UseyourDrive .wpcp26__now-playing-title {
        font-size: var(--wpcp-text-base, 15px);
    }
}

/* Waveform behind the progress bar (waveform.js), in the slot of the audio skin; the bar stays on top */
#UseyourDrive .wpcp26__waveform {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#UseyourDrive .wpcp26__waveform-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* The colors of the bars, which waveform.js reads from these */
#UseyourDrive .wpcp26__waveform-played,
#UseyourDrive .wpcp26__waveform-unplayed {
    display: none;
}

#UseyourDrive .wpcp26__waveform-played {
    color: var(--wpcp-color-accent-edge);
}

#UseyourDrive .wpcp26__waveform-unplayed {
    color: color-mix(in srgb, var(--wpcp26-text) 30%, transparent);
}

@media (forced-colors: active) {
    #UseyourDrive .wpcp26__waveform-played,
    #UseyourDrive .wpcp26__waveform-unplayed {
        forced-color-adjust: none;
    }

    #UseyourDrive .wpcp26__waveform-played {
        color: Highlight;
    }

    #UseyourDrive .wpcp26__waveform-unplayed {
        color: CanvasText;
    }
}

/*
 * The whole description of a module with one file (main.js, build_about): below the video with the
 * title, and in the audio player below the controls, as tall as the text.
 */
#UseyourDrive .wpcp26__about {
    margin-top: 10px;
    padding: 12px 16px;
    border-radius: var(--wpcp26-radius);
    background: var(--wpcp26-surface);
    color: var(--wpcp26-text);
}

#UseyourDrive .wpcp26[data-mode='audio'] .wpcp26__about {
    margin: 12px -12px 0;
    padding: 12px 12px 0;
    border-top: 1px solid var(--wpcp26-line);
    border-radius: 0;
}

#UseyourDrive .wpcp26__about-title {
    margin: 0 0 4px;
    font-size: var(--wpcp-text-lg, 17px);
    font-weight: 600;
    line-height: var(--wpcp-leading-lg, 1.4);
    overflow-wrap: anywhere;
}

#UseyourDrive .wpcp26__about-text,
#UseyourDrive .wpcp26__sheet-text {
    margin: 0;
    font-size: var(--wpcp-text-base, 15px);
    line-height: var(--wpcp-leading-base, 1.5);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

@container wpcp26 (width < 480px) {
    #UseyourDrive .wpcp26__about {
        padding: 10px 12px;
    }

    #UseyourDrive .wpcp26__about-title {
        font-size: var(--wpcp-text-base, 15px);
    }
}

/* The audio player floats at the bottom of the screen: the description stays where it was */
#UseyourDrive .wpcp26--mini[data-mode='audio'] .wpcp26__stage {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/*
 * The whole description of an item (main.js, open_description): a popover next to its (i) button with
 * a mouse, a sheet at the bottom of the screen on phones and tablets. A modal dialog in the top layer.
 */
#UseyourDrive .wpcp26__sheet {
    position: fixed;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border: 0;
    background: var(--wpcp26-card);
    color: var(--wpcp26-text);
    font-family: var(--wpcp26-font);
    font-size: var(--wpcp-text-base, 15px);
    font-style: normal;
    font-weight: 400;
    line-height: var(--wpcp-leading-base, 1.5);
    text-align: start;
}

#UseyourDrive .wpcp26__sheet--popover {
    width: min(420px, calc(100vw - 24px));
    border: 1px solid var(--wpcp26-line);
    border-radius: var(--wpcp26-radius);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18); /* palette: fixed */
}

#UseyourDrive .wpcp26__sheet--popover::backdrop {
    background: transparent;
}

#UseyourDrive .wpcp26__sheet--sheet {
    inset: auto 0 0;
    width: 100%;
    max-height: 80vh;
    border-radius: 16px 16px 0 0;
}

#UseyourDrive .wpcp26__sheet--sheet::backdrop {
    background: rgba(0, 0, 0, 0.45); /* palette: fixed */
}

#UseyourDrive .wpcp26__sheet-box {
    padding: 4px 16px 16px;
}

#UseyourDrive .wpcp26__sheet--sheet .wpcp26__sheet-box {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
}

/* The header stays in view while a long text scrolls */
#UseyourDrive .wpcp26__sheet-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 -16px 0 0;
    padding-top: 6px;
    background: var(--wpcp26-card);
}

#UseyourDrive .wpcp26 .wpcp26__sheet-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 6px 0 8px;
    border: 0;
    color: inherit;
    font-family: var(--wpcp26-font);
    font-size: var(--wpcp-text-lg, 17px);
    font-style: normal;
    font-weight: 600;
    line-height: var(--wpcp-leading-lg, 1.4);
    letter-spacing: normal;
    text-transform: none;
    overflow-wrap: anywhere;
}

#UseyourDrive .wpcp26 .wpcp26__sheet-close {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: -4px;
    border-radius: 50%;
    color: var(--wpcp26-muted);
}

#UseyourDrive .wpcp26 .wpcp26__sheet-close:hover {
    background: var(--wpcp26-hover);
    color: var(--wpcp26-text);
}

#UseyourDrive .wpcp26 .wpcp26__sheet-close .wpcp-icon {
    font-size: 20px;
}

/* Loading and messages */

#UseyourDrive .wpcp26__loading {
    position: absolute;
    inset: 0;
    width: 40px;
    height: 40px;
    margin: auto;
    border: 3px solid rgba(255, 255, 255, 0.25); /* palette: fixed */
    border-top-color: var(--wpcp-color-accent-edge);
    border-radius: 50%;
    animation: wpcp26-spin 0.8s linear infinite;
}

#UseyourDrive .wpcp26[data-mode='audio'] .wpcp26__loading {
    border-color: var(--wpcp26-line);
    border-top-color: var(--wpcp-color-accent-edge);
}

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

/* With reduced motion (a setting of the system) it pulses slowly instead of turning, like the player */
@keyframes wpcp26-pulse {
    50% {
        opacity: 0.35;
    }
}

@media (prefers-reduced-motion: reduce) {
    #UseyourDrive .wpcp26__loading {
        animation: wpcp26-pulse 1.6s ease-in-out infinite;
    }
}

/*
 * Advertisement (sponsor.js): its own video and controls on top of the content video, in the 'sponsor'
 * slot of the skin. No seeking; a skip button when the ad allows it, and a link to the advertiser.
 */
#UseyourDrive .wpcp26__sponsor {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    background: #000; /* palette: fixed */
    color: #fff; /* palette: fixed */
    font-family: var(--wpcp26-font);
    font-size: var(--wpcp-text-sm, 13px);
    font-style: normal;
    font-weight: 400;
    line-height: var(--wpcp-leading-sm, 1.45);
    -webkit-user-select: none;
    user-select: none;
}

#UseyourDrive .wpcp26__sponsor-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000; /* palette: fixed */
    cursor: pointer;
}

#UseyourDrive .wpcp26__sponsor-loading {
    position: absolute;
    inset: 0;
    width: 40px;
    height: 40px;
    margin: auto;
    border: 3px solid rgba(255, 255, 255, 0.25); /* palette: fixed */
    border-top-color: var(--wpcp-color-accent-edge);
    border-radius: 50%;
    animation: wpcp26-spin 0.8s linear infinite;
    pointer-events: none;
}

#UseyourDrive .wpcp26__sponsor-top {
    position: absolute;
    inset-block-start: 10px;
    inset-inline-start: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6); /* palette: fixed */
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

#UseyourDrive .wpcp26__sponsor-remaining:empty {
    display: none;
}

#UseyourDrive .wpcp26__sponsor-remaining {
    font-weight: 400;
    opacity: 0.85;
}

#UseyourDrive .wpcp26__sponsor-bar {
    position: absolute;
    inset-inline: 0;
    inset-block-end: 4px;
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.55)); /* palette: fixed */
    pointer-events: none;
}

#UseyourDrive .wpcp26__sponsor-bar > * {
    pointer-events: auto;
}

#UseyourDrive .wpcp26__sponsor-spacer {
    flex: 1;
    pointer-events: none;
}

#UseyourDrive .wpcp26 .wpcp26__sponsor-button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff; /* palette: fixed */
}

#UseyourDrive .wpcp26 .wpcp26__sponsor-button:hover {
    background: rgba(255, 255, 255, 0.16); /* palette: fixed */
}

#UseyourDrive .wpcp26__sponsor svg {
    width: 22px;
    height: 22px;
}

#UseyourDrive .wpcp26 .wpcp26__sponsor-more,
#UseyourDrive .wpcp26 .wpcp26__sponsor-unmute,
#UseyourDrive .wpcp26 .wpcp26__sponsor-skip {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    min-height: 36px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65); /* palette: fixed */
    color: #fff; /* palette: fixed */
    font-weight: 600;
    white-space: nowrap;
}

#UseyourDrive .wpcp26 .wpcp26__sponsor-more svg,
#UseyourDrive .wpcp26 .wpcp26__sponsor-unmute svg,
#UseyourDrive .wpcp26 .wpcp26__sponsor-skip svg {
    width: 18px;
    height: 18px;
}

#UseyourDrive .wpcp26 .wpcp26__sponsor-skip {
    border: 1px solid rgba(255, 255, 255, 0.5); /* palette: fixed */
}

#UseyourDrive .wpcp26 .wpcp26__sponsor-skip:not(:disabled):hover,
#UseyourDrive .wpcp26 .wpcp26__sponsor-more:hover,
#UseyourDrive .wpcp26 .wpcp26__sponsor-unmute:hover {
    background: var(--wpcp26-accent);
    box-shadow: inset 0 0 0 1px var(--wpcp-color-accent-ring);
    color: var(--wpcp26-on-accent);
}

/* The countdown is not a button yet */
#UseyourDrive .wpcp26 .wpcp26__sponsor-skip:disabled {
    border-color: transparent;
    cursor: default;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

#UseyourDrive .wpcp26 .wpcp26__sponsor-skip:disabled svg {
    display: none;
}

#UseyourDrive .wpcp26__sponsor-progress {
    position: absolute;
    inset-inline: 0;
    inset-block-end: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.25); /* palette: fixed */
    pointer-events: none;
}

#UseyourDrive .wpcp26__sponsor-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: #f5c518; /* palette: fixed */
    transition: width 0.25s linear;
}

#UseyourDrive .wpcp26__sponsor-live {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Narrow players: the link is the icon only */
@container wpcp26 (width < 420px) {
    #UseyourDrive .wpcp26 .wpcp26__sponsor-more span {
        display: none;
    }

    #UseyourDrive .wpcp26 .wpcp26__sponsor-more {
        padding: 7px 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #UseyourDrive .wpcp26__sponsor-loading {
        animation: wpcp26-pulse 1.6s ease-in-out infinite;
    }

    #UseyourDrive .wpcp26__sponsor-progress span {
        transition: none;
    }
}

/* Message instead of the player: no files, or the files could not be loaded */
#UseyourDrive .wpcp26__message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 160px;
    height: 100%;
    padding: 24px;
    color: #fff; /* palette: fixed */
    text-align: center;
}

#UseyourDrive .wpcp26[data-mode='audio'] .wpcp26__message {
    color: var(--wpcp26-muted);
}

#UseyourDrive .wpcp26__message-icon {
    display: flex;
    opacity: 0.6;
}

#UseyourDrive .wpcp26__message-icon svg {
    width: 40px;
    height: 40px;
}

/* Message on the player for a file that can't be played */
#UseyourDrive .wpcp26__error {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    border-radius: inherit;
    background: rgba(0, 0, 0, 0.82); /* palette: fixed */
    color: #fff; /* palette: fixed */
    text-align: center;
}

#UseyourDrive .wpcp26[data-mode='audio'] .wpcp26__error {
    flex-direction: row;
    flex-wrap: wrap;
    background: color-mix(in srgb, var(--wpcp26-surface) 94%, transparent);
    color: var(--wpcp26-text);
    text-align: start;
}

#UseyourDrive .wpcp26__error-icon {
    display: flex;
    color: #f5a524; /* palette: fixed */
}

#UseyourDrive .wpcp26__error-icon svg {
    width: 36px;
    height: 36px;
}

#UseyourDrive .wpcp26__error-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    max-width: 100%;
}

#UseyourDrive .wpcp26__error-title {
    font-size: var(--wpcp-text-base, 15px);
}

#UseyourDrive .wpcp26__error-name,
#UseyourDrive .wpcp26__error-countdown {
    overflow: hidden;
    font-size: var(--wpcp-text-sm, 13px);
    opacity: 0.8;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#UseyourDrive .wpcp26__error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

#UseyourDrive .wpcp26 .wpcp26__error-button {
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--wpcp26-accent);
    box-shadow: inset 0 0 0 1px var(--wpcp-color-accent-ring);
    color: var(--wpcp26-on-accent);
    font-weight: 600;
}

#UseyourDrive .wpcp26 .wpcp26__error-button:hover {
    filter: brightness(1.1);
}

/* On the accent surface the focus ring has the color of the text on it */
#UseyourDrive .wpcp26 .wpcp26__error-button:not(.wpcp26__error-button--secondary):focus-visible {
    outline-color: var(--wpcp-color-on-accent);
}

#UseyourDrive .wpcp26 .wpcp26__error-button--secondary {
    background: rgba(255, 255, 255, 0.16); /* palette: fixed */
    box-shadow: none;
    color: inherit;
}

#UseyourDrive .wpcp26[data-mode='audio'] .wpcp26__error-button--secondary {
    background: var(--wpcp26-line);
}

/* Icon for items and covers without an image */
#UseyourDrive .wpcp26__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--wpcp26-muted);
}

#UseyourDrive .wpcp26__placeholder svg {
    width: 40%;
    max-width: 48px;
    height: auto;
}

/* ---------- Playlist ---------- */

/* Only the Module height setting limits the playlist (Template.php); without it the playlist grows with its items, like the previous skins */
#UseyourDrive .wpcp26__playlist {
    max-height: var(--wpcp26-playlist-max-height, none);
    margin-top: 10px;
    padding: 0 12px 12px;
    overflow-y: auto;
    /* At the top or bottom, or with nothing to scroll, the wheel and touch scroll the page */
    overscroll-behavior: auto;
    border-radius: var(--wpcp26-radius);
    background: var(--wpcp26-surface);
    color: var(--wpcp26-text);
}

/* Toolbar: search, number of items, sort and ZIP download */

#UseyourDrive .wpcp26__toolbar {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0 -12px;
    padding: 12px;
    background: var(--wpcp26-surface);
}

#UseyourDrive .wpcp26__search {
    position: relative;
    flex: 1 1 100px;
    min-width: 0;
}

#UseyourDrive .wpcp26__search-icon {
    position: absolute;
    inset-inline-start: 11px;
    top: 50%;
    display: flex;
    color: var(--wpcp26-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

/* Icons of the plugin (css/icons.css) in the toolbar, the entries and the menus */
#UseyourDrive .wpcp26 .wpcp-icon {
    font-size: 18px;
    line-height: 1;
}

/* A filled field with a border (border-strong, also on the hover tint); the accent ring shows the focus */
#UseyourDrive .wpcp26 .wpcp26__search-input {
    display: block;
    width: 100%;
    height: 38px;
    margin: 0;
    padding-block: 0;
    padding-inline: 38px 36px;
    border: 1px solid var(--wpcp-color-border-strong);
    border-radius: var(--wpcp26-radius-small);
    background: var(--wpcp26-fill);
    box-shadow: none;
    color: var(--wpcp26-text);
    font: inherit;
    transition: box-shadow 0.15s ease;
}

/* At least 16px on touch screens, or iOS zooms in on the field */
@media (pointer: coarse) {
    #UseyourDrive .wpcp26 .wpcp26__search-input {
        font-size: max(16px, var(--wpcp-text-base, 15px));
    }
}

#UseyourDrive .wpcp26 .wpcp26__search-input::placeholder {
    color: var(--wpcp-color-text-muted);
    opacity: 1;
}

#UseyourDrive .wpcp26 .wpcp26__search-input:focus {
    box-shadow: 0 0 0 2px var(--wpcp-color-focus);
    outline: none;
}

#UseyourDrive .wpcp26__search-input::-webkit-search-cancel-button {
    display: none;
}

#UseyourDrive .wpcp26 .wpcp26__search-clear {
    position: absolute;
    inset-inline-end: 4px;
    top: 50%;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    transform: translateY(-50%);
}

#UseyourDrive .wpcp26__count {
    color: var(--wpcp26-muted);
    font-size: var(--wpcp-text-xs, 12px);
    white-space: nowrap;
}

#UseyourDrive .wpcp26__tools {
    position: relative;
    display: flex;
    gap: 6px;
    margin-inline-start: auto;
}

#UseyourDrive .wpcp26 .wpcp26__tool-button {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: var(--wpcp26-radius-small);
    background: transparent;
    color: var(--wpcp26-muted);
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

#UseyourDrive .wpcp26 .wpcp26__tool-button:hover,
#UseyourDrive .wpcp26 .wpcp26__tool-button[aria-expanded='true'] {
    background: var(--wpcp26-hover);
    color: var(--wpcp26-text);
}

#UseyourDrive .wpcp26__tool-button svg {
    width: 18px;
    height: 18px;
}

/* List / grid switch: a segmented control, the chosen view raised */
#UseyourDrive .wpcp26__views {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: var(--wpcp26-radius-small);
    background: var(--wpcp26-fill);
}

#UseyourDrive .wpcp26 .wpcp26__view {
    width: 30px;
    height: 30px;
    border-radius: calc(var(--wpcp26-radius-small) * 0.7);
}

#UseyourDrive .wpcp26 .wpcp26__view[aria-pressed='true'],
#UseyourDrive .wpcp26 .wpcp26__view[aria-pressed='true']:hover {
    background: var(--wpcp26-card);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); /* palette: fixed */
    color: var(--wpcp-color-accent-text);
}

/* Breadcrumb */

#UseyourDrive .wpcp26__breadcrumb {
    margin-bottom: 2px;
}

/*
 * Room between the toolbar and the first row, so the toolbar doesn't cover the ring of the current item
 * in the grid or the focus ring of the first row (the toolbar is sticky and covers what is below it)
 */
#UseyourDrive .wpcp26__content {
    padding-top: 6px;
}

#UseyourDrive .wpcp26 .wpcp26__breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: var(--wpcp-text-lg, 17px);
    line-height: var(--wpcp-leading-lg, 1.4);
}

#UseyourDrive .wpcp26 .wpcp26__breadcrumb-home {
    display: flex;
    align-items: center;
    padding: 3px 6px;
}

#UseyourDrive .wpcp26__breadcrumb-home .wpcp-icon {
    font-size: 22px; /* font-size: fixed */
    line-height: 1;
}

#UseyourDrive .wpcp26 .wpcp26__breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

#UseyourDrive .wpcp26 .wpcp26__breadcrumb-item + .wpcp26__breadcrumb-item::before {
    content: '›';
    color: var(--wpcp26-muted);
}

#UseyourDrive .wpcp26 .wpcp26__breadcrumb-link {
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--wpcp-color-accent-text);
}

#UseyourDrive .wpcp26 .wpcp26__breadcrumb-link:hover {
    background: var(--wpcp26-hover);
}

#UseyourDrive .wpcp26__breadcrumb-current {
    padding: 2px 6px;
    font-weight: 600;
}

/* Search results per folder */

#UseyourDrive .wpcp26__section + .wpcp26__section {
    margin-top: 16px;
}

#UseyourDrive .wpcp26 .wpcp26__section-title {
    margin: 0 0 8px;
    padding: 0;
    color: var(--wpcp26-muted);
    font-size: var(--wpcp-text-xs, 12px);
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: var(--wpcp-leading-xs, 1.35);
    text-transform: uppercase;
}

#UseyourDrive .wpcp26__no-results {
    margin: 0;
    padding: 24px 12px;
    color: var(--wpcp26-muted);
    text-align: center;
}

/* Entries: what the list and the grid have in common */

#UseyourDrive .wpcp26__entry {
    position: relative;
    display: flex;
    min-width: 0;
    border-radius: var(--wpcp26-radius-small);
    color: var(--wpcp26-text);
}

#UseyourDrive .wpcp26 .wpcp26__entry-button {
    display: flex;
    flex: 1;
    min-width: 0;
    color: inherit;
    /* A theme's button reset (white-space: nowrap) would stop the description from wrapping and clamping */
    white-space: normal;
}

#UseyourDrive .wpcp26__thumbnail {
    position: relative;
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--wpcp26-line);
}

#UseyourDrive .wpcp26__thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#UseyourDrive .wpcp26__thumbnail--folder {
    color: var(--wpcp-color-accent-text);
    background: var(--wpcp-color-accent-soft);
}

#UseyourDrive .wpcp26__thumbnail--folder svg {
    width: 45%;
    max-width: 44px;
    height: auto;
}

/*
 * A folder with thumbnails in it: a cover of up to four of them (main.js, build_folder_cover). One large
 * and two small tiles for video, four squares for audio, with thin lines between them.
 */
#UseyourDrive .wpcp26__thumbnail--cover {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    place-items: stretch;
    place-content: stretch;
    gap: 2px;
    background: var(--wpcp26-card);
}

#UseyourDrive .wpcp26__thumbnail--cover-3 {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

#UseyourDrive .wpcp26__thumbnail--cover-3 .wpcp26__cover-tile:first-child {
    grid-row: span 2;
}

#UseyourDrive .wpcp26__thumbnail--cover-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}

#UseyourDrive .wpcp26__cover-tile {
    position: relative;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    background: var(--wpcp26-line);
}

/* The folder icon in the corner, so a folder with one thumbnail doesn't look like a file */
#UseyourDrive .wpcp26__folder-mark {
    position: absolute;
    inset-block-end: 6px;
    inset-inline-end: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(18px, 20%, 28px);
    aspect-ratio: 1;
    border-radius: var(--wpcp26-radius-small);
    background: rgba(0, 0, 0, 0.62); /* palette: fixed */
    color: #fff; /* palette: fixed */
    pointer-events: none;
}

#UseyourDrive .wpcp26__thumbnail--folder .wpcp26__folder-mark svg {
    width: 62%;
    max-width: none;
    height: auto;
}

/* The small covers of the list view get a small mark in the corner itself */
#UseyourDrive .wpcp26__playlist--list .wpcp26__folder-mark {
    inset-block-end: 3px;
    inset-inline-end: 3px;
    width: 18px;
    border-radius: 4px;
}

#UseyourDrive .wpcp26[data-mode='audio'] .wpcp26__playlist--list .wpcp26__folder-mark {
    inset-block-end: 2px;
    inset-inline-end: 2px;
    width: 16px;
}

#UseyourDrive .wpcp26__entry-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

#UseyourDrive .wpcp26__entry-title {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: var(--wpcp-text-base, 15px);
    font-weight: 600;
    line-height: var(--wpcp-leading-tight, 1.3);
}

#UseyourDrive .wpcp26__entry-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#UseyourDrive .wpcp26__entry-meta {
    overflow: hidden;
    color: var(--wpcp26-muted);
    font-size: var(--wpcp-text-sm, 13px);
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* A preview of the description: two lines, one in the audio list. The (i) and the menu of the item show all of it. */
#UseyourDrive .wpcp26__entry-description {
    display: -webkit-box;
    overflow: hidden;
    color: var(--wpcp26-muted);
    font-size: var(--wpcp-text-sm, 13px);
    line-height: var(--wpcp-leading-sm, 1.45);
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

#UseyourDrive .wpcp26[data-mode='audio'] .wpcp26__playlist--list .wpcp26__entry-description {
    -webkit-line-clamp: 1;
    line-clamp: 1;
}

/* An item that could not be played */
#UseyourDrive .wpcp26__failed-icon {
    display: none;
    flex: none;
    color: #f5a524; /* palette: fixed */
}

#UseyourDrive .wpcp26__failed-icon svg {
    width: 16px;
    height: 16px;
}

#UseyourDrive .wpcp26__entry--failed .wpcp26__failed-icon {
    display: flex;
}

#UseyourDrive .wpcp26__entry--failed .wpcp26__thumbnail,
#UseyourDrive .wpcp26__entry--failed .wpcp26__entry-name {
    opacity: 0.55;
}

#UseyourDrive .wpcp26__badge {
    flex: none;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--wpcp26-line);
    /* Not the muted color of the playlist: small text on the line color, which is about fill-strong */
    color: var(--wpcp-color-text-muted);
    font-size: var(--wpcp-text-xs, 12px);
    font-weight: 600;
    line-height: var(--wpcp-leading-xs, 1.35);
}

#UseyourDrive .wpcp26__duration {
    font-variant-numeric: tabular-nums;
    font-size: var(--wpcp-text-xs, 12px);
    font-weight: 600;
    white-space: nowrap;
}

/* Duration on the thumbnail, like YouTube */
#UseyourDrive .wpcp26__duration--badge {
    position: absolute;
    inset-inline-end: 4px;
    bottom: 4px;
    z-index: 1;
    padding: 0 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.78); /* palette: fixed */
    color: #fff; /* palette: fixed */
    font-size: 12px; /* font-size: fixed */
    font-weight: 600;
    line-height: 17px;
}

#UseyourDrive .wpcp26__playlist--list .wpcp26__duration--badge {
    inset-inline-end: 4px;
    bottom: 4px;
}

/* With thumbnails the duration is on the thumbnail, without them in a column of its own */
#UseyourDrive .wpcp26:not(.wpcp26--no-thumbnails) .wpcp26__duration--inline {
    display: none;
}

/* Audio: the duration is always a column of its own, like in music apps, never on the cover art */
#UseyourDrive .wpcp26[data-mode='audio'] .wpcp26__duration--badge {
    display: none;
}

#UseyourDrive .wpcp26[data-mode='audio']:not(.wpcp26--no-thumbnails) .wpcp26__duration--inline {
    display: inline;
}

/* In the grid it is below the title, at the end */
#UseyourDrive .wpcp26[data-mode='audio'] .wpcp26__playlist--grid .wpcp26__duration--inline {
    align-self: flex-start;
    padding: 2px 2px 0;
    color: var(--wpcp26-muted);
}

#UseyourDrive .wpcp26__chevron {
    display: flex;
    flex: none;
    align-self: center;
    color: var(--wpcp26-muted);
}

#UseyourDrive .wpcp26 .wpcp26__chevron .wpcp-icon {
    font-size: 16px;
}

#UseyourDrive [dir='rtl'] .wpcp26__chevron .wpcp-icon {
    transform: scaleX(-1);
}

/* Separate rule: a browser without :dir() would drop a combined one */
#UseyourDrive .wpcp26:dir(rtl) .wpcp26__chevron .wpcp-icon {
    transform: scaleX(-1);
}

/* Playing indicator on the thumbnail of the current item */
#UseyourDrive .wpcp26__playing {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45); /* palette: fixed */
    color: #fff; /* palette: fixed */
}

#UseyourDrive .wpcp26__playing svg {
    width: 22px;
    height: 22px;
}

#UseyourDrive .wpcp26--playing .wpcp26__entry--current .wpcp26__playing {
    display: flex;
}

/* Actions button: shows on hover on devices with a mouse, always on touch screens */
/* The buttons of a row look like those of an entry in the File Browser: 30px, round, darker on hover */
#UseyourDrive .wpcp26 .wpcp26__more {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--wpcp26-muted);
}

#UseyourDrive .wpcp26 .wpcp26__more:hover,
#UseyourDrive .wpcp26 .wpcp26__more[aria-expanded='true'] {
    background: color-mix(in srgb, var(--wpcp26-text) 15%, transparent);
    color: var(--wpcp26-text);
}

#UseyourDrive .wpcp26__more svg {
    width: 18px;
    height: 18px;
}

@media (hover: hover) {
    #UseyourDrive .wpcp26 .wpcp26__more {
        opacity: 0;
        transition: opacity 0.15s ease;
    }

    #UseyourDrive .wpcp26__entry:hover .wpcp26__more,
    #UseyourDrive .wpcp26__entry:focus-within .wpcp26__more,
    #UseyourDrive .wpcp26 .wpcp26__more[aria-expanded='true'] {
        opacity: 1;
    }
}

/*
 * (i) of a row whose description is cut off (main.js, update_info_buttons), with a mouse. In the list
 * it is always visible, as only some rows have it; in the grid on hover. Touch screens have Description
 * in the menu of the item instead, so a row doesn't get two buttons.
 */
#UseyourDrive .wpcp26 .wpcp26__info {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--wpcp26-muted);
}

#UseyourDrive .wpcp26 .wpcp26__info:hover {
    background: color-mix(in srgb, var(--wpcp26-text) 15%, transparent);
    color: var(--wpcp26-text);
}

/* Touch screens: the More actions button and the (i) next to the audio title look 30px and can be tapped in 44px */
@media (pointer: coarse) {
    #UseyourDrive .wpcp26 .wpcp26__playlist .wpcp26__info {
        display: none;
    }

    #UseyourDrive .wpcp26 .wpcp26__info,
    #UseyourDrive .wpcp26 .wpcp26__more {
        position: relative;
    }

    #UseyourDrive .wpcp26 .wpcp26__info::before,
    #UseyourDrive .wpcp26 .wpcp26__more::before {
        content: '';
        position: absolute;
        inset: -7px;
    }
}

/* List view */

#UseyourDrive .wpcp26__playlist--list .wpcp26__items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#UseyourDrive .wpcp26__playlist--list .wpcp26__entry {
    align-items: center;
}

#UseyourDrive .wpcp26__playlist--list .wpcp26__entry:hover {
    background: var(--wpcp26-hover);
}

#UseyourDrive .wpcp26__playlist--list .wpcp26__entry--current,
#UseyourDrive .wpcp26__playlist--list .wpcp26__entry--current:hover {
    background: var(--wpcp26-current);
    box-shadow: inset 3px 0 0 var(--wpcp-color-accent-edge);
}

/* On the hover and accent tints the muted texts of a row need more contrast than text-subtle has */
#UseyourDrive .wpcp26__playlist--list .wpcp26__entry:hover,
#UseyourDrive .wpcp26__playlist--list .wpcp26__entry--current {
    --wpcp26-muted: var(--wpcp-color-text-muted);
}

#UseyourDrive .wpcp26 .wpcp26__playlist--list .wpcp26__entry-button {
    align-items: center;
    gap: 14px;
    padding: 6px 8px;
}

/* Video thumbnails close to the size of the list next to a YouTube video (168px), cover art like music apps */
#UseyourDrive .wpcp26__playlist--list .wpcp26__thumbnail {
    width: 128px;
    aspect-ratio: 16/9;
    border-radius: var(--wpcp26-radius-small);
}

#UseyourDrive .wpcp26[data-mode='audio'] .wpcp26__playlist--list .wpcp26__thumbnail {
    width: 48px;
    aspect-ratio: 1;
}

#UseyourDrive .wpcp26__playlist--list .wpcp26__duration--inline {
    flex: none;
    color: var(--wpcp26-muted);
}

#UseyourDrive .wpcp26__playlist--list .wpcp26__more {
    margin-inline-end: 6px;
}

/* Grid view */

#UseyourDrive .wpcp26__playlist--grid .wpcp26__items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
    gap: 20px 16px;
}

#UseyourDrive .wpcp26[data-mode='audio'] .wpcp26__playlist--grid .wpcp26__items {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
}

/*
 * No cards: the thumbnail with the text below it, like video sites. On hover the image zooms a little,
 * the item that plays gets an accent ring around its thumbnail and an accent title.
 */
#UseyourDrive .wpcp26__playlist--grid .wpcp26__entry {
    flex-direction: column;
}

#UseyourDrive .wpcp26__playlist--grid .wpcp26__thumbnail {
    transition: box-shadow 0.15s ease;
}

#UseyourDrive .wpcp26__playlist--grid .wpcp26__thumbnail img {
    transition: transform 0.25s ease;
}

#UseyourDrive .wpcp26__playlist--grid .wpcp26__entry:hover .wpcp26__thumbnail img {
    transform: scale(1.04);
}

#UseyourDrive .wpcp26__playlist--grid .wpcp26__entry--current .wpcp26__thumbnail {
    box-shadow:
        0 0 0 2px var(--wpcp26-surface),
        0 0 0 4px var(--wpcp-color-focus);
}

#UseyourDrive .wpcp26__entry--current .wpcp26__entry-name,
#UseyourDrive .wpcp26__entry--has-current .wpcp26__entry-name {
    color: var(--wpcp-color-accent-text);
}

#UseyourDrive .wpcp26 .wpcp26__to-current {
    color: var(--wpcp-color-accent-text);
}

/* The folder with the current item in it */
#UseyourDrive .wpcp26__entry--has-current .wpcp26__badge {
    background: var(--wpcp26-accent);
    box-shadow: inset 0 0 0 1px var(--wpcp-color-accent-ring);
    color: var(--wpcp26-on-accent);
}

#UseyourDrive .wpcp26 .wpcp26__playlist--grid .wpcp26__entry-button {
    flex-direction: column;
    align-items: stretch;
    border-radius: inherit;
}

#UseyourDrive .wpcp26__playlist--grid .wpcp26__thumbnail {
    width: 100%;
    aspect-ratio: var(--wpcp26-aspect-ratio, 16/9);
    border-radius: var(--wpcp26-radius-small);
}

#UseyourDrive .wpcp26[data-aspect-ratio='responsive'] .wpcp26__playlist--grid .wpcp26__thumbnail {
    aspect-ratio: 16/9;
}

#UseyourDrive .wpcp26[data-mode='audio'] .wpcp26__playlist--grid .wpcp26__thumbnail {
    aspect-ratio: 1;
}

#UseyourDrive .wpcp26__playlist--grid .wpcp26__entry-text {
    padding: 10px 2px 0;
}

#UseyourDrive .wpcp26__playlist--grid .wpcp26__entry-name {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    white-space: normal;
}

#UseyourDrive .wpcp26__playlist--grid .wpcp26__chevron {
    display: none;
}

/* On the thumbnail, like the buttons on a photo in the Gallery and the File Browser */
#UseyourDrive .wpcp26 .wpcp26__playlist--grid .wpcp26__more {
    position: absolute;
    inset-inline-end: 6px;
    top: 6px;
    z-index: 1;
    background: rgba(0, 0, 0, 0.3); /* palette: fixed */
    color: #fff; /* palette: fixed */
}

#UseyourDrive .wpcp26 .wpcp26__playlist--grid .wpcp26__more:hover,
#UseyourDrive .wpcp26 .wpcp26__playlist--grid .wpcp26__more[aria-expanded='true'] {
    background: rgba(0, 0, 0, 0.5); /* palette: fixed */
    color: #fff; /* palette: fixed */
}

/* In the grid on the thumbnail, next to the More actions button, like the (i) in the Gallery */
#UseyourDrive .wpcp26 .wpcp26__playlist--grid .wpcp26__info {
    position: absolute;
    inset-inline-end: 40px;
    top: 6px;
    z-index: 1;
    background: rgba(0, 0, 0, 0.3); /* palette: fixed */
    color: #fff; /* palette: fixed */
}

#UseyourDrive .wpcp26 .wpcp26__playlist--grid .wpcp26__info:hover {
    background: rgba(0, 0, 0, 0.5); /* palette: fixed */
    color: #fff; /* palette: fixed */
}

/* With a mouse it shows on hover, together with the More actions button, like that one */
@media (hover: hover) {
    #UseyourDrive .wpcp26 .wpcp26__playlist--grid .wpcp26__info {
        opacity: 0;
        transition: opacity 0.15s ease;
    }

    #UseyourDrive .wpcp26__playlist--grid .wpcp26__entry:hover .wpcp26__info,
    #UseyourDrive .wpcp26__playlist--grid .wpcp26__entry:focus-within .wpcp26__info {
        opacity: 1;
    }
}

/* Without a thumbnail there is no place for it on the tile: Description is in the menu */
#UseyourDrive .wpcp26--no-thumbnails .wpcp26__playlist--grid .wpcp26__info {
    display: none;
}

#UseyourDrive .wpcp26--no-thumbnails .wpcp26__playlist--grid .wpcp26__more {
    position: relative;
    inset: auto;
    align-self: flex-end;
    margin: 0 6px 6px;
    background: transparent;
    color: var(--wpcp26-muted);
}

/* Menus: actions of an item and the sort orders */

#UseyourDrive .wpcp26__menu {
    position: absolute;
    top: calc(100% + 4px);
    inset-inline-end: 0;
    z-index: 20;
    min-width: 190px;
    padding: 4px;
    /* A menu is raised (lighter in the dark theme), where the icons need the muted text color */
    --wpcp26-card: var(--wpcp-color-surface-raised);
    --wpcp26-muted: var(--wpcp-color-text-muted);
    border-radius: var(--wpcp26-radius-small);
    background: var(--wpcp26-card);
    box-shadow:
        0 0 0 1px var(--wpcp26-line),
        0 8px 24px rgba(0, 0, 0, 0.16); /* palette: fixed */
}

#UseyourDrive .wpcp26__entry > .wpcp26__menu {
    top: calc(100% - 4px);
    inset-inline-end: 6px;
}

#UseyourDrive .wpcp26__playlist--grid .wpcp26__entry > .wpcp26__menu {
    top: 42px;
}

#UseyourDrive .wpcp26 .wpcp26__menu--up,
#UseyourDrive .wpcp26__entry > .wpcp26__menu--up,
#UseyourDrive .wpcp26__playlist--grid .wpcp26__entry > .wpcp26__menu--up {
    top: auto;
    bottom: calc(100% + 4px);
}

#UseyourDrive .wpcp26 .wpcp26__menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border-radius: calc(var(--wpcp26-radius-small) * 0.7);
    color: var(--wpcp26-text);
    font-weight: normal;
    text-align: start;
    text-decoration: none;
    white-space: nowrap;
}

#UseyourDrive .wpcp26 .wpcp26__menu-item .wpcp-icon {
    color: var(--wpcp26-muted);
}

#UseyourDrive .wpcp26 .wpcp26__menu-item:hover,
#UseyourDrive .wpcp26 .wpcp26__menu-item:focus {
    background: var(--wpcp26-hover);
    color: var(--wpcp26-text);
    outline: none;
}

#UseyourDrive .wpcp26 .wpcp26__menu-item[role='menuitemradio']::before {
    content: '';
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

#UseyourDrive .wpcp26 .wpcp26__menu-item[aria-checked='true'] {
    color: var(--wpcp-color-accent-text);
    font-weight: 600;
}

/* On the hover tint over the raised menu, accent-text has too little contrast; the dot keeps the state */
#UseyourDrive .wpcp26 .wpcp26__menu-item[aria-checked='true']:is(:hover, :focus) {
    color: var(--wpcp26-text);
}

#UseyourDrive .wpcp26 .wpcp26__menu-item[aria-checked='true']::before {
    background: currentColor;
}

/* Playlist on top of the video (Playlist opens on top of player) */

/* The texts of a hovered or current item stay light on the dark layer (not the muted color of the module theme) */
#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist .wpcp26__entry:hover,
#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist .wpcp26__entry--current {
    --wpcp26-muted: rgba(255, 255, 255, 0.85); /* palette: fixed */
}

/* The name of the current item in white: the accent bar shows the state (accent text can be too dark over a light video frame) */
#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist .wpcp26__entry--current .wpcp26__entry-name,
#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist .wpcp26__entry--has-current .wpcp26__entry-name {
    color: #fff; /* palette: fixed */
}


/*
 * A dark, translucent layer over the video, like the playlists of video sites. It works on dark and light
 * videos alike and keeps the video visible behind it. It leaves the control bar free. The colors of the
 * playlist are light on dark here, whatever the color theme of the plugin.
 */
#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist {
    --wpcp26-text: #fff; /* palette: fixed */
    --wpcp26-muted: rgba(255, 255, 255, 0.7); /* palette: fixed */
    --wpcp26-surface: transparent;
    --wpcp26-card: rgba(255, 255, 255, 0.14); /* palette: fixed */
    --wpcp26-hover: rgba(255, 255, 255, 0.1); /* palette: fixed */
    --wpcp26-line: rgba(255, 255, 255, 0.16); /* palette: fixed */
    /* A neutral tint: the accent bar of the current item (accent-edge of the dark theme) shows the state, also with a light accent */
    --wpcp26-current: rgba(255, 255, 255, 0.14); /* palette: fixed */

    position: absolute;
    /* Above the controls: the progress bar row and the button row, about 74px, and some space */
    inset: 0 0 84px;
    z-index: 5;
    max-height: none;
    margin: 0;
    border-radius: var(--wpcp26-radius) var(--wpcp26-radius) 0 0;
    background: rgba(0, 0, 0, 0.72); /* palette: fixed */
    box-shadow: none;
    color: var(--wpcp26-text);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color-scheme: dark;
}

#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist .wpcp26__toolbar {
    background: transparent;
}

/*
 * The toolbar and the breadcrumb stay in place and only the list scrolls: the layer is translucent, so a
 * sticky toolbar would show the list scrolling through it.
 */
#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist:not([hidden]) {
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
    overflow: hidden;
}

#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist .wpcp26__toolbar,
#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist .wpcp26__breadcrumb {
    position: static;
    flex: none;
}

#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist .wpcp26__content {
    flex: 1;
    min-height: 0;
    margin: 0 -12px;
    padding: 6px 12px 12px;
    overflow-y: auto;
    overscroll-behavior: auto;
    /*
     * The scrollbar in the colors of the dark theme of the plugin (main.js gives the layer that class),
     * also with the light theme. Set here, because the value on #UseyourDrive has the light colors.
     */
    scrollbar-color: var(--wpcp-color-accent-edge) var(--wpcp-color-bg);
}

/* No captions while the list is on top of the video. ::cue for Firefox, which has no caption box. */
#UseyourDrive .wpcp26--overlay.wpcp26--playlist-open video::-webkit-media-text-track-container {
    visibility: hidden;
}

#UseyourDrive .wpcp26--overlay.wpcp26--playlist-open video::cue {
    visibility: hidden;
}

/* After the last item: the item that would play next */
#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist .wpcp26__entry--next .wpcp26__entry-button {
    outline: 2px solid var(--wpcp-color-accent-edge);
    outline-offset: -2px;
}

/* A paused video: the next items in a strip above the controls (main.js show_strip) */
#UseyourDrive .wpcp26__strip {
    position: absolute;
    inset: auto 12px 84px;
    z-index: 5;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
    border-radius: var(--wpcp26-radius-small);
    background: rgba(0, 0, 0, 0.72); /* palette: fixed */
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #fff; /* palette: fixed */
}

#UseyourDrive .wpcp26__strip[hidden] {
    display: none;
}

#UseyourDrive .wpcp26 .wpcp26__strip-item,
#UseyourDrive .wpcp26 .wpcp26__strip-all {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    margin: 0;
    padding: 4px;
    border: 0;
    border-radius: var(--wpcp26-radius-small);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
}

#UseyourDrive .wpcp26 .wpcp26__strip-item:hover,
#UseyourDrive .wpcp26 .wpcp26__strip-all:hover {
    background: rgba(255, 255, 255, 0.12); /* palette: fixed */
}

#UseyourDrive .wpcp26 .wpcp26__strip-item:focus-visible,
#UseyourDrive .wpcp26 .wpcp26__strip-all:focus-visible {
    outline: 2px solid #fff; /* palette: fixed */
    outline-offset: 0;
}

#UseyourDrive .wpcp26__strip-thumbnail {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1); /* palette: fixed */
}

#UseyourDrive .wpcp26__strip-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#UseyourDrive .wpcp26__strip-title {
    overflow: hidden;
    font-size: var(--wpcp-text-xs, 12px);
    line-height: var(--wpcp-leading-xs, 1.35);
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The button to the whole playlist: an icon in the place of a thumbnail */
#UseyourDrive .wpcp26 .wpcp26__strip-all {
    align-items: center;
    justify-content: center;
    text-align: center;
}

#UseyourDrive .wpcp26__strip-all .wpcp-icon {
    font-size: 24px; /* font-size: fixed */
}

/*
 * The title of the current item gets the accent text color of the dark theme on the dark layer (the layer
 * has wpcp-theme-dark), so it needs no rule of its own. The breadcrumb, the folder icons and the view
 * switch stay white there, like the rest of the layer.
 */
#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist .wpcp26__to-current {
    color: var(--wpcp26-text);
}

#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist .wpcp26__view[aria-pressed='true'] {
    color: var(--wpcp26-text);
}

#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist .wpcp26__breadcrumb-link {
    color: var(--wpcp26-muted);
}

#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist .wpcp26__breadcrumb-link:hover {
    color: var(--wpcp26-text);
}

#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist .wpcp26__thumbnail--folder {
    color: rgba(255, 255, 255, 0.85); /* palette: fixed */
    background: rgba(255, 255, 255, 0.1); /* palette: fixed */
}

#UseyourDrive .wpcp26--overlay .wpcp26__stage > .wpcp26__playlist .wpcp26__menu {
    --wpcp26-card: #262626; /* palette: fixed */
}

/* Narrow modules, also in a narrow column on a wide screen */

@container wpcp26 (width < 480px) {
    #UseyourDrive .wpcp26__playlist {
        padding: 0 8px 8px;
    }

    /* The search field gets a row of its own, the count and the tools go below it */
    #UseyourDrive .wpcp26__search {
        flex-basis: 100%;
    }

    #UseyourDrive .wpcp26__toolbar {
        margin: 0 -8px;
        padding: 8px;
    }

    #UseyourDrive .wpcp26 .wpcp26__playlist--grid .wpcp26__items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 10px;
    }

    #UseyourDrive .wpcp26 .wpcp26__playlist--list .wpcp26__entry-button {
        gap: 12px;
        padding: 6px;
    }

    #UseyourDrive .wpcp26__playlist--list .wpcp26__thumbnail {
        width: 104px;
    }
}

/* Very narrow modules: a smaller thumbnail leaves room for the title */
@container wpcp26 (width < 400px) {
    #UseyourDrive .wpcp26__playlist--list .wpcp26__thumbnail {
        width: 80px;
    }

    #UseyourDrive .wpcp26 .wpcp26__playlist--list .wpcp26__entry-button {
        gap: 10px;
    }
}

/*
 * ---------- The small forms of the player: audio in a bar at the bottom, video in a small player in the corner ----------
 * The file browser opens a new player in .wpcp26-bar (js/src/bar.js). A module that plays out of view moves
 * its own wpcp-media-i18n (main.js, watch_mini_player). Both have data-context on their .wpcp26.
 */

#UseyourDrive .wpcp26-bar,
#UseyourDrive .wpcp26--mini wpcp-media-i18n {
    display: block;
    position: fixed;
    z-index: 999;
    box-sizing: border-box;
    color: var(--wpcp-color-text);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2); /* palette: fixed */
}

#UseyourDrive .wpcp26-bar[data-context='bar'],
#UseyourDrive .wpcp26--mini[data-context='bar'] wpcp-media-i18n {
    right: 0;
    bottom: 0;
    left: 0;
    container: wpcp26-bar / inline-size;
    background: var(--wpcp-color-bg);
}

#UseyourDrive .wpcp26-bar[data-context='dock'],
#UseyourDrive .wpcp26--mini[data-context='dock'] wpcp-media-i18n {
    right: 16px;
    bottom: 16px;
    width: clamp(320px, 30vw, 480px);
    overflow: hidden;
    border-radius: var(--wpcp--present--border--radius, 10px);
    background: #000; /* palette: fixed */
}

#UseyourDrive button.wpcp26-bar__close {
    display: flex;
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    z-index: 2;
    align-items: center;
    justify-content: center;
    appearance: none;
    width: 32px;
    min-width: 0;
    height: 32px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 100%;
    background: transparent;
    box-shadow: none;
    color: inherit;
    cursor: pointer;
}

#UseyourDrive button.wpcp26-bar__close:hover {
    background: var(--wpcp-color-fill-strong);
}

#UseyourDrive button.wpcp26-bar__close:focus-visible {
    outline: 2px solid var(--wpcp-color-focus);
    outline-offset: 1px;
}

#UseyourDrive [data-context='dock'] button.wpcp26-bar__close {
    background: rgba(0, 0, 0, 0.55); /* palette: fixed */
    color: #fff; /* palette: fixed */
}

#UseyourDrive [data-context='dock'] button.wpcp26-bar__close:hover {
    background: rgba(0, 0, 0, 0.8); /* palette: fixed */
}

#UseyourDrive [data-context='dock'] button.wpcp26-bar__close:focus-visible {
    outline-color: #fff; /* palette: fixed */
}

#UseyourDrive [data-context='bar'] button.wpcp26-bar__close {
    top: 50%;
    translate: 0 -50%;
}

/* No corners on the edges of the screen. In a module the stage stays behind as the place of the player. */
#UseyourDrive .wpcp26-bar .wpcp26 .wpcp26__stage {
    min-height: 0;
    padding: 0;
    border-radius: 0;
}

/* Room for the close button */
#UseyourDrive .wpcp26[data-context='bar'] wpcp-audio-neutral-skin {
    padding: 8px 12px;
    padding-inline-end: 48px;
}

#UseyourDrive .wpcp26[data-context='bar'] .wpcp26__cover {
    width: 48px;
    height: 48px;
}

#UseyourDrive .wpcp26[data-context='bar'] .wpcp26__now-playing-text {
    text-align: start;
}

#UseyourDrive .wpcp26[data-context='bar'] .wpcp26__now-playing-row {
    justify-content: flex-start;
}

#UseyourDrive .wpcp26[data-context='bar'] .wpcp26__now-playing-title {
    font-size: var(--wpcp-text-base, 15px);
}

#UseyourDrive .wpcp26[data-context='bar'] .wpcp26__now-playing-artist {
    font-size: var(--wpcp-text-xs, 12px);
}

#UseyourDrive .wpcp26[data-context='dock'] wpcp-video-neutral-skin {
    --wpcp26-max-video-height: 60vh;
}

/*
 * A narrow bar has the cover and title above the controls (skin.css, below 448px for the skin), so the
 * controls get the full width and the close button goes in the corner, next to the title
 */
@container wpcp26-bar (width < 472px) {
    #UseyourDrive [data-context='bar'] button.wpcp26-bar__close {
        top: 8px;
        translate: none;
    }

    #UseyourDrive .wpcp26[data-context='bar'] wpcp-audio-neutral-skin {
        padding-inline-end: 12px;
    }

    #UseyourDrive .wpcp26[data-context='bar'] .wpcp26__now-playing-text {
        padding-inline-end: 32px;
    }

    #UseyourDrive .wpcp26[data-context='bar'] .wpcp26__cover {
        width: 40px;
        height: 40px;
    }
}

/* Only the file browser: a module doesn't go to the corner on these screens (MINI_PLAYER_SCREEN in main.js) */
@media (max-width: 640px) {
    #UseyourDrive .wpcp26-bar[data-context='dock'] {
        right: 0;
        bottom: 0;
        left: 0;
        width: auto;
        border-radius: 0;
    }

    #UseyourDrive .wpcp26[data-context='dock'] wpcp-video-neutral-skin {
        --wpcp26-max-video-height: 40vh;
    }
}

/* The place of the player in a module: its image, dimmed */
#UseyourDrive .wpcp26__mini-poster {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: #000 center / contain no-repeat; /* palette: fixed */
    opacity: 0.5;
}
