/* "Watch how" videos for a planner page (js/app/help/pageVideos.js, 2026-11-16).
   The button is quiet: a small pill in the page's header. The dialog lists the page's videos, then plays one.
   A content box's video is a small play icon in its header, opening the same dialog (2026-11-18). */

.page-videos-btn {
    display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 6px;
    border: 1px solid var(--ui-borders-borderDefault); border-radius: 999px; cursor: pointer;
    background: var(--ui-backgrounds-cardBg); color: var(--ui-text-primaryText); font-weight: 600; white-space: nowrap;
}
.page-videos-btn:hover { border-color: var(--ui-text-linkText); color: var(--ui-text-linkText); }
.page-videos-btn-disc {
    display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(var(--color-blue-6-rgb), .12); color: var(--ui-text-linkText);
}
.page-videos-btn-disc svg { margin-left: 2px; }
.page-videos-btn-count { color: var(--ui-text-secondaryText); font-weight: 500; }
.page-videos-btn:focus-visible, .page-videos-dialog button:focus-visible, .page-videos-dialog a:focus-visible {
    outline: 2px solid var(--ui-borders-borderFocus); outline-offset: 3px;
}

/* A content box's video: the play icon in the box's header, after the title (PageVideos.attachBox, 2026-11-18).
   Only on the OPEN box (the dark bar): a collapsed box is a plain row and stays as clean as it was. Its colours are
   the header's own text colour, as the header's icon circle is, so it reads on the bar in every theme. */
.content-box-header .box-video-btn {
    position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; margin: 0 0 0 -2px; padding: 0 0 0 2px; border-radius: 50%; cursor: pointer; pointer-events: auto;
    border: 1px solid rgba(var(--color-ui-header-text-rgb), 0.5); background: transparent;
    color: var(--ui-main-headerText, var(--color-ui-header-text)); opacity: 0.85;
    transition: opacity 0.16s ease-out, background-color 0.16s ease-out;
}
.content-box-header .box-video-btn svg { width: 11px; height: 11px; }
.content-box-header .box-video-btn:hover,
.content-box-header .box-video-btn:focus-visible { opacity: 1; background: rgba(var(--color-ui-header-text-rgb), 0.28); }
.content-box-header .box-video-btn:focus-visible { outline: 2px solid var(--ui-main-headerText, var(--color-ui-header-text)); outline-offset: 2px; }
/* A larger place to press than the circle drawn, without moving the title. */
.content-box-header .box-video-btn::after { content: ''; position: absolute; inset: -9px; }
.content-box:has(> .content-box-body.collapsed) > .content-box-header .box-video-btn { display: none; }
/* A finger needs 44px on the glass, and the column is drawn smaller than life (--left-column-zoom). */
@media (pointer: coarse) {
    .content-box-header .box-video-btn::after { inset: calc((24px - 44px / var(--left-column-zoom, 1)) / 2); }
}

.page-videos-dialog {
    width: min(calc(100vw - 24px), 760px); max-width: none; max-height: calc(100dvh - 24px); padding: 16px; border: 0; border-radius: 16px;
    background: var(--ui-backgrounds-cardBg); color: var(--ui-text-primaryText);
    box-shadow: 0 24px 64px rgba(var(--color-ui-shadow-rgb), 0.35);
}
/* Playing: as large as the screen allows at 16:9, like the Summary's player. */
.page-videos-dialog.is-playing { width: min(calc(100vw - 24px), 1600px, calc((100dvh - 150px) * 16 / 9)); }
.page-videos-dialog::backdrop { background: rgba(var(--color-ui-shadow-rgb), 0.6); }
.page-videos-head { display: flex; align-items: center; gap: 12px; margin: 0 2px 12px; }
.page-videos-title { flex: 1; min-width: 0; margin: 0; font-size: 18px; font-weight: 700; color: var(--ui-text-primaryText); }
.page-videos-back, .page-videos-close {
    flex: none; height: 32px; padding: 0 14px; border: 1px solid var(--ui-borders-borderDefault); border-radius: 999px; cursor: pointer;
    background: var(--ui-backgrounds-cardBg); color: var(--ui-text-primaryText); font-weight: 700;
}
.page-videos-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.page-videos-item {
    display: flex; align-items: center; gap: 14px; width: 100%; padding: 8px; text-align: left; cursor: pointer;
    border: 1px solid var(--ui-borders-borderLight); border-radius: 12px; background: var(--ui-backgrounds-cardBg); color: inherit;
}
.page-videos-item:hover { border-color: var(--ui-text-linkText); }
.page-videos-pic { position: relative; flex: none; width: 176px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--color-brand-dark); }
.page-videos-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.page-videos-disc {
    position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; background: rgba(var(--color-gray-900-rgb), .65); color: var(--ui-text-inverseText);
}
.page-videos-disc svg { width: 14px; height: 14px; margin-left: 2px; }
.page-videos-clock {
    position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 4px; font-size: 12px; font-weight: 600;
    background: rgba(var(--color-gray-900-rgb), .75); color: var(--ui-text-inverseText);
}
.page-videos-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.page-videos-name { font-weight: 700; color: var(--ui-text-primaryText); }
.page-videos-sum { color: var(--ui-text-secondaryText); }
.page-videos-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--color-brand-dark); }
.page-videos-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.page-videos-foot { margin: 12px 2px 0; }
.page-videos-foot a { font-weight: 700; color: var(--ui-text-linkText); }

@media (max-width: 560px) {
    .page-videos-dialog { padding: 12px; }
    .page-videos-item { align-items: flex-start; gap: 10px; }
    .page-videos-pic { width: 112px; }
    .page-videos-sum { display: none; }
    .page-videos-btn-count { display: none; }
}
