/* Product demo library (product-demos.html). Everything is under the pd- prefix.
   Text uses div, not p/span, where size matters: styles-et-site.css and common-site.css carry blanket
   p/span/a font-size rules (some !important below 1400px) that would otherwise restyle it. */
.pd-pills { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1.25rem; }
.pd-pills > div { font-size: .85rem; padding: .35rem .8rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); color: #d6dcef; }
.pd-pills i { margin-right: .35rem; color: #a78bfa; }

.pd-wrap { max-width: 1280px; margin: 0 auto; }
.pd-h2 { font-size: 1.5rem; font-weight: 700; color: #fff; margin: 0 0 .3rem; }
.pd-sub { color: #a9b0c8; font-size: .95rem; margin: 0 0 1.4rem; }

/* Start here: one large overview video beside a short "watch next" list. */
.pd-start { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.5rem; align-items: stretch; }
@media (max-width: 991.98px) { .pd-start { grid-template-columns: minmax(0, 1fr); } }
.pd-hero-card { position: relative; border-radius: 1.1rem; overflow: hidden; border: 1px solid rgba(255,255,255,.12); background: #0b0a1a; cursor: pointer; }
.pd-hero-card .pd-thumb { aspect-ratio: 16 / 9; }
.pd-hero-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 1.2rem 1.3rem 1.1rem 5.2rem; background: linear-gradient(to top, rgba(8,7,22,.92), rgba(8,7,22,0)); pointer-events: none; }
.pd-hero-cap .pd-kicker { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #c4b5fd; }
.pd-hero-cap .pd-title { font-size: 1.35rem; margin-top: .15rem; }
.pd-hero-card .pd-play { width: 60px; height: 60px; left: 1.1rem; bottom: 1.25rem; font-size: 1.9rem !important; }
.pd-next { display: flex; flex-direction: column; gap: .6rem; }
.pd-next-label { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #a9b0c8; }

/* Compact row: used for "watch next" and the player's "Up next" list. */
.pd-row { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: .8rem; align-items: center; width: 100%; padding: .5rem; border: 1px solid rgba(255,255,255,.08); border-radius: .8rem; background: rgba(255,255,255,.04); color: inherit; text-align: left; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.pd-row:hover, .pd-row:focus-visible { border-color: rgba(167,139,250,.55); background: rgba(124,58,237,.12); outline: none; }
.pd-row-img { position: relative; aspect-ratio: 16 / 9; border-radius: .5rem; overflow: hidden; background: #000; }
.pd-row-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-row-img .pd-dur { right: .3rem; bottom: .3rem; }
.pd-row-title { font-size: .92rem; font-weight: 600; line-height: 1.3; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pd-row-meta { font-size: .75rem; color: #a9b0c8; margin-top: .2rem; }

/* Filter bar, as on most demo libraries: search on the left, topic chips on the right. */
.pd-tools { display: flex; flex-wrap: wrap; gap: .9rem 1.2rem; align-items: center; justify-content: space-between; margin: 3rem 0 2rem; padding: 1rem; border: 1px solid rgba(255,255,255,.1); border-radius: 1rem; background: rgba(255,255,255,.03); }
.pd-search { position: relative; flex: 1 1 280px; max-width: 420px; }
.pd-search i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: #a9b0c8; pointer-events: none; }
.pd-search input { width: 100%; height: 44px; padding: 0 .9rem 0 2.4rem; border-radius: .7rem; border: 1px solid rgba(255,255,255,.18); background: #0f0e22; color: #fff; font-size: .95rem; }
.pd-search input::placeholder { color: #8b93ad; }
.pd-search input:focus { outline: none; border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(167,139,250,.25); }
.pd-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.pd-chip { height: 36px; padding: 0 .85rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #d6dcef; font-size: .85rem; font-weight: 500; white-space: nowrap; cursor: pointer; transition: background .2s ease, border-color .2s ease, color .2s ease; }
.pd-chip .pd-n { margin-left: .35rem; font-size: .75rem; opacity: .7; }
.pd-chip:hover { border-color: rgba(167,139,250,.6); color: #fff; }
.pd-chip[aria-pressed="true"] { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.pd-chip:focus-visible { outline: 3px solid #a78bfa; outline-offset: 2px; }
.pd-chip.pd-quick[aria-pressed="true"] { background: #0e7490; border-color: #0e7490; }
@media (max-width: 767.98px) {
    .pd-tools { padding: .75rem; }
    .pd-search { max-width: none; flex-basis: 100%; }
    /* one swipeable line of chips instead of four wrapped rows */
    .pd-chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: .25rem; scrollbar-width: none; }
    .pd-chips::-webkit-scrollbar { display: none; }
}

.pd-section { margin-bottom: 3rem; }
.pd-section[hidden] { display: none; }
.pd-grid { display: grid; gap: 1.25rem; }
.pd-grid-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pd-grid-tall { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 1199.98px) { .pd-grid-tall { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 991.98px) { .pd-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pd-grid-tall { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .pd-grid-wide { grid-template-columns: minmax(0, 1fr); } .pd-grid-tall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; } }

.pd-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 1rem; overflow: hidden; cursor: pointer; transition: transform .2s ease, border-color .2s ease; }
.pd-card[hidden] { display: none; }
.pd-card:hover { transform: translateY(-3px); border-color: rgba(167,139,250,.55); }
.pd-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #0b0a1a; cursor: pointer; overflow: hidden; }
.pd-grid-tall .pd-thumb { aspect-ratio: 9 / 16; }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.pd-thumb::after { content: ""; position: absolute; inset: auto 0 0 0; height: 35%; background: linear-gradient(to top, rgba(8,7,22,.8), rgba(8,7,22,0)); pointer-events: none; }
.pd-card:hover .pd-thumb img, .pd-hero-card:hover .pd-thumb img, .pd-thumb:focus-visible img { transform: scale(1.03); }
.pd-thumb:focus-visible { outline: 3px solid #a78bfa; outline-offset: -3px; }
/* font-size is !important on these spans because common-site.css sets `span, p, a { font-size: ... !important }` below 1400px. */
.pd-play { position: absolute; left: .6rem; bottom: .6rem; z-index: 2; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #7c3aed; border: 2px solid rgba(255,255,255,.9); color: #fff; font-size: 1.3rem !important; box-shadow: 0 4px 14px rgba(0,0,0,.35); transition: transform .2s ease, background .2s ease; }
.pd-card:hover .pd-play, .pd-hero-card:hover .pd-play, .pd-thumb:focus-visible .pd-play { transform: scale(1.1); background: #8b5cf6; }
.pd-dur { position: absolute; right: .6rem; bottom: .75rem; z-index: 2; font-size: .72rem !important; line-height: 1.4; font-weight: 600; padding: .1rem .45rem; border-radius: .35rem; background: rgba(0,0,0,.7); color: #fff; font-variant-numeric: tabular-nums; }
.pd-tag { position: absolute; top: .55rem; left: .55rem; z-index: 2; max-width: calc(100% - 1.1rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .62rem !important; line-height: 1.4; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: rgba(15,14,34,.8); padding: .18rem .5rem; border-radius: 999px; }
.pd-body { padding: .8rem .9rem 1rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.pd-grid-tall .pd-body { padding: .65rem .75rem .8rem; }
.pd-title { font-size: 1.02rem; font-weight: 700; line-height: 1.3; color: #fff; }
.pd-grid-tall .pd-title { font-size: .9rem; }
.pd-desc { font-size: .84rem; line-height: 1.45; color: #a9b0c8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pd-grid-tall .pd-desc { font-size: .76rem; }

.pd-empty { text-align: center; padding: 2.5rem 1rem; border: 1px dashed rgba(255,255,255,.2); border-radius: 1rem; color: #d6dcef; }
.pd-empty[hidden] { display: none; }
.pd-empty button { margin-top: .8rem; }

/* Player. margin/inset restate the UA centring that the site's global reset removes. */
.pd-dialog { position: fixed; inset: 0; margin: auto; height: fit-content; width: min(1240px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 1px solid rgba(255,255,255,.15); border-radius: 1.25rem; background: #0f0e22; color: #eef1fb; overflow: hidden; }
.pd-dialog::backdrop { background: rgba(4,4,12,.88); }
.pd-dialog-inner { display: grid; grid-template-columns: minmax(0, 1fr) 340px; max-height: calc(100vh - 24px); }
.pd-stage { background: #000; display: grid; place-items: center; min-height: 0; }
.pd-frame { width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 26px); }
.pd-frame.is-tall { aspect-ratio: 9 / 16; width: auto; height: min(88vh, 820px); }
.pd-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.pd-side { padding: 1.3rem 1.3rem 1.2rem; overflow-y: auto; min-width: 0; max-height: calc(100vh - 26px); text-align: left; display: flex; flex-direction: column; gap: .8rem; }
.pd-side .pd-kicker { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #c4b5fd; margin-right: 2.6rem; }
.pd-dialog-title { font-size: 1.2rem; font-weight: 700; line-height: 1.3; color: #fff; margin: -.4rem 2.6rem 0 0; }
.pd-dialog-desc { font-size: .9rem; line-height: 1.55; color: #d6dcef; }
.pd-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.pd-actions .btn { font-size: .85rem; padding: .5rem .9rem; }
.pd-link-btn { display: inline-flex; align-items: center; gap: .35rem; height: 38px; padding: 0 .8rem; border-radius: .6rem; border: 1px solid rgba(255,255,255,.2); background: transparent; color: #d6dcef; font-size: .82rem; text-decoration: none; cursor: pointer; }
.pd-link-btn:hover, .pd-link-btn:focus-visible { border-color: #a78bfa; color: #fff; }
.pd-upnext { display: flex; flex-direction: column; gap: .5rem; margin-top: .4rem; }
.pd-upnext .pd-row { grid-template-columns: 112px minmax(0, 1fr); }
.pd-close { position: absolute; top: .6rem; right: .6rem; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 1.1rem; z-index: 3; }
.pd-close:hover, .pd-close:focus-visible { background: #7c3aed; }
@media (max-width: 991.98px) {
    .pd-dialog-inner { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
    .pd-frame.is-tall { height: min(70vh, 640px); }
    .pd-side { max-height: none; overflow: visible; }
    /* a bar above the video for the close button, so it never covers YouTube's own controls */
    .pd-dialog-inner { padding-top: 52px; }
    .pd-close { top: 6px; right: 6px; }
}
@media (max-width: 575.98px) {
    /* the caption would sit on top of the logo in a small thumbnail; put it under the picture instead */
    .pd-hero-cap { position: static; padding: .8rem 1rem .9rem; background: none; pointer-events: auto; }
    .pd-hero-card .pd-play { width: 48px; height: 48px; left: .8rem; bottom: .8rem; font-size: 1.5rem !important; }
}
@media (prefers-reduced-motion: reduce) { .pd-thumb img, .pd-play, .pd-card { transition: none; } }
