/* Pinscribe reels (map-reels.php): tiles in a row or grid, and the player. */
.pinscribe-reels { --psv-gap: 12px; margin: 1.6em 0; font-family: var(--psd-font, inherit); }
.pinscribe-reels .psv-heading { margin: 0 0 .7em !important; font-family: var(--psd-heading-font, var(--psd-font, inherit)); }
.pinscribe-reels .psv-wrap { position: relative; }
.pinscribe-reels .psv-track { list-style: none !important; margin: 0 !important; padding: 0 !important; display: grid; gap: var(--psv-gap); }
.pinscribe-reels.psv-row .psv-track { grid-auto-flow: column; grid-auto-columns: clamp(140px, 22%, 210px); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 2px; padding-bottom: 6px !important; scrollbar-width: thin; overscroll-behavior-x: contain; }
.pinscribe-reels.psv-grid .psv-track { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pinscribe-reels .psv-item { margin: 0 !important; padding: 0 !important; scroll-snap-align: start; list-style: none !important; }
.pinscribe-reels .psv-item::before { content: none !important; }
.pinscribe-reels .psv-tile { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; padding: 0; margin: 0; border: 0; border-radius: var(--psd-radius, 14px); overflow: hidden; background: #111; color: #fff; cursor: pointer; box-shadow: var(--psd-shadow, none); text-align: left; font: inherit; }
.pinscribe-reels .psv-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; margin: 0; max-width: none; transition: transform .3s ease; }
.pinscribe-reels .psv-tile:hover img, .pinscribe-reels .psv-tile:focus-visible img { transform: scale(1.04); }
.pinscribe-reels .psv-tile:focus-visible { outline: 3px solid var(--psd-accent, #c8401a); outline-offset: 2px; }
.pinscribe-reels .psv-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.28) 0, transparent 22%, transparent 55%, rgba(0,0,0,.72) 100%); pointer-events: none; }
/* A tile with no cover: the platform's mark, above the play button. */
.pinscribe-reels .psv-blank { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 24%; }
.pinscribe-reels .psv-blank svg { width: 30%; height: auto; opacity: .95; }
.pinscribe-reels .psv-instagram .psv-blank { background: linear-gradient(45deg, #f9ce34, #ee2a7b 45%, #6228d7); }
.pinscribe-reels .psv-tiktok .psv-blank { background: linear-gradient(160deg, #161616, #2b2b2b); }
.pinscribe-reels .psv-tiktok .psv-blank svg { filter: drop-shadow(2px 2px 0 #fe2c55) drop-shadow(-2px -2px 0 #25f4ee); }
.pinscribe-reels .psv-youtube .psv-blank { background: #c00; }
.pinscribe-reels .psv-badge { position: absolute; z-index: 1; top: 9px; left: 9px; display: flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0,0,0,.45); }
.pinscribe-reels .psv-badge svg { width: 14px; height: 14px; }
.pinscribe-reels .psv-play { position: absolute; z-index: 1; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(0,0,0,.4); backdrop-filter: blur(3px); transition: transform .2s, background .2s; }
.pinscribe-reels .psv-play::before { content: ""; position: absolute; left: 21px; top: 16px; border-style: solid; border-width: 10px 0 10px 16px; border-color: transparent transparent transparent #fff; }
.pinscribe-reels .psv-tile:hover .psv-play { transform: scale(1.08); background: var(--psd-accent, #c8401a); }
.pinscribe-reels .psv-cap { position: absolute; z-index: 1; left: 10px; right: 10px; bottom: 10px; font-size: 13px; line-height: 1.3; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.5); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pinscribe-reels .psv-scroll { position: absolute; z-index: 2; top: calc(50% - 22px); width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #111; box-shadow: 0 2px 10px rgba(0,0,0,.25); font-size: 26px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pinscribe-reels .psv-scroll[hidden] { display: none; }
.pinscribe-reels .psv-scroll-prev { left: -14px; }
.pinscribe-reels .psv-scroll-next { right: -14px; }
@media (max-width: 600px) {
	.pinscribe-reels.psv-row .psv-track { grid-auto-columns: 42%; }
	.pinscribe-reels.psv-grid .psv-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pinscribe-reels .psv-scroll { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.pinscribe-reels .psv-tile img, .pinscribe-reels .psv-play { transition: none; }
}

/* The player. */
.psv-player { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; background: rgba(8,8,10,.92); color: #fff; font-family: var(--psd-font, inherit); }
.psv-player[hidden] { display: none; }
.psv-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; }
.psv-frame { position: relative; height: min(84vh, 860px); aspect-ratio: 9 / 16; max-width: calc(100vw - 32px); border-radius: 14px; overflow: hidden; background: #000; }
.psv-frame.is-instagram { aspect-ratio: 9 / 18.5; background: #fff; }
.psv-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.psv-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; max-width: min(560px, calc(100vw - 32px)); font-size: 14px; text-align: center; }
.psv-bar-cap { flex-basis: 100%; opacity: .9; }
.psv-bar-cap:empty { display: none; }
.psv-bar a { color: #fff; font-weight: 600; text-decoration: none; padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.14); }
.psv-bar a.psv-see { background: var(--psd-accent, #c8401a); color: var(--psd-accent-text, #fff); }
.psv-bar a:hover, .psv-bar a:focus-visible { background: rgba(255,255,255,.26); }
.psv-bar a.psv-see:hover { filter: brightness(1.08); background: var(--psd-accent, #c8401a); }
.psv-bar a[hidden] { display: none; }
.psv-btn { position: absolute; display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.psv-btn:hover, .psv-btn:focus-visible { background: rgba(255,255,255,.3); outline: none; }
.psv-btn[disabled] { opacity: .3; cursor: default; }
.psv-close { top: 16px; right: 16px; font-size: 24px; }
.psv-prev { left: 24px; top: calc(50% - 23px); }
.psv-next { right: 24px; top: calc(50% - 23px); }
.psv-count { position: absolute; top: 26px; left: 24px; font-size: 13px; opacity: .7; }
body.psv-open { overflow: hidden; }
@media (max-width: 700px) {
	.psv-player { background: #000; }
	.psv-frame { height: calc(100dvh - 120px); max-width: 100vw; border-radius: 0; }
	.psv-prev, .psv-next { display: none; }
	.psv-close { top: 10px; right: 10px; background: rgba(0,0,0,.5); z-index: 2; }
	.psv-count { top: 20px; left: 14px; z-index: 2; }
}
