/* London City Brass – cookie-free video carousels */
.lcbv, .lcbv-box { --lcbv-frame: #ebe9da; --lcbv-hover: #a7c987; --lcbv-green: #527c00; --lcbv-per: 2; }
@media (min-width: 25em)   { .lcbv { --lcbv-per: 3; } }
@media (min-width: 37.5em) { .lcbv { --lcbv-per: 4; } }
@media (min-width: 62.5em) { .lcbv { --lcbv-per: 5; } }

.lcbv-section { scroll-margin-top: 1rem; margin: 0; padding: .9rem 0 .4rem; border-top: 1px solid #e2e7ea; }
.lcbv-section:first-of-type { border-top: 0; padding-top: 0; }
.lcbv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.lcbv .lcbv-head h4 { margin: 0; padding: 0; }
.lcbv-more { font-size: .8rem; white-space: nowrap; }

.lcbv-carousel { position: relative; }
.lcbv-track {
  list-style: none; margin: 0; padding: 8px 0 10px;
  display: flex; gap: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: thin; overscroll-behavior-x: contain;
}
.lcbv-card {
  position: relative; flex: 0 0 calc((100% - (var(--lcbv-per) - 1) * 10px) / var(--lcbv-per));
  scroll-snap-align: start; margin: 0; padding: 0; text-align: center;
}
.lcbv-play { display: block; color: inherit; text-decoration: none; cursor: pointer; border-radius: 3px; }
.lcbv-thumb {
  display: block; position: relative; overflow: hidden; aspect-ratio: 16 / 9;
  border: 4px solid var(--lcbv-frame); background: var(--lcbv-frame); border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}
.lcbv-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Small play badge in the bottom-left corner, clear of the title artwork */
.lcbv-badge {
  position: absolute; left: 6px; bottom: 6px;
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--lcbv-green); color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45);
  transition: transform 150ms ease, background-color 150ms ease;
}
.lcbv-badge svg { width: 14px; height: 14px; margin-left: 2px; display: block; }
.lcbv-play:hover .lcbv-thumb, .lcbv-play:focus-visible .lcbv-thumb {
  transform: translateY(-3px); border-color: var(--lcbv-green); box-shadow: 0 6px 14px rgba(0,0,0,.3);
}
.lcbv-play:hover .lcbv-badge, .lcbv-play:focus-visible .lcbv-badge { transform: scale(1.2); background: var(--lcbv-hover); }
.lcbv-play:focus-visible { outline: 3px solid var(--lcbv-green); outline-offset: 3px; }
/* Titles are in the artwork; keep them for screen readers only */
.lcbv-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lcbv-ext {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  width: 1.6em; height: 1.6em; line-height: 1.6em; border-radius: 3px;
  background: rgba(0,0,0,.55); color: #fff !important; text-decoration: none; font-size: .8rem;
  opacity: 0; transition: opacity 150ms ease;
}
.lcbv-card:hover .lcbv-ext, .lcbv-ext:focus-visible { opacity: 1; }
@media (hover: none) { .lcbv-ext { opacity: .85; } }

/* Theme styles all <button>s, so pin every box property here. */
.lcbv .lcbv-nav {
  position: absolute; top: calc(50% - 32px); z-index: 2;
  box-sizing: border-box; width: 44px !important; height: 44px !important;
  min-width: 0; max-width: none; margin: 0; padding: 0 !important;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff; border-radius: 50% !important;
  background: var(--lcbv-green); color: #fff; cursor: pointer;
  box-shadow: 0 1px 6px rgba(0,0,0,.35); text-indent: 0; letter-spacing: 0;
}
.lcbv .lcbv-nav[hidden] { display: none; }
.lcbv .lcbv-nav svg { width: 22px; height: 22px; display: block; }
.lcbv .lcbv-nav:hover:not([disabled]) { background: var(--lcbv-hover); }
.lcbv .lcbv-prev { left: -14px; } .lcbv .lcbv-next { right: -14px; }
.lcbv .lcbv-nav[disabled] { opacity: .35; cursor: default; }
.lcbv-note, .lcbv-empty { font-size: .8rem; color: #54606d; }

/* Lightbox */
.lcbv-box {
  width: min(960px, 94vw); max-height: 94vh; padding: 2.5rem 0 0; border: 0; border-radius: 4px;
  background: #111; color: #eee; overflow: auto;
}
.lcbv-box::backdrop { background: rgba(0,0,0,.8); }
.lcbv-frame { aspect-ratio: 16 / 9; background: #000; }
.lcbv-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.lcbv-caption { padding: .75rem 1rem 1rem; }
.lcbv-box .lcbv-caption h3 { margin: 0 0 .4rem; padding: 0; color: #fff; font-size: 1.1rem; line-height: 1.3; }
.lcbv-desc { white-space: pre-line; overflow-wrap: anywhere; font-size: .85rem; margin: 0 0 .5rem; color: #ccc; }
.lcbv-caption a { color: var(--lcbv-hover); }
.lcbv-box .lcbv-close {
  position: absolute; top: 4px; right: 8px; z-index: 3;
  box-sizing: border-box; width: 32px !important; height: 32px !important;
  min-width: 0; max-width: none; margin: 0; padding: 0 !important;
  display: flex; align-items: center; justify-content: center;
  border: 0 !important; border-radius: 50% !important; box-shadow: none; outline-offset: 2px;
  background: rgba(255,255,255,.12); color: #fff; cursor: pointer;
}
.lcbv-box .lcbv-close:hover { background: var(--lcbv-green); }
.lcbv-box .lcbv-close svg { width: 16px; height: 16px; display: block; }
@media (prefers-reduced-motion: reduce) {
  .lcbv-track { scroll-behavior: auto; }
  .lcbv-thumb, .lcbv-badge { transition: none; }
}

/* ---- Grid layout: no scrolling, two rows, "Show all" expands ---- */
.lcbv--grid .lcbv-track { display: grid; grid-template-columns: repeat(var(--lcbv-per), 1fr); overflow: visible; }
.lcbv--grid .lcbv-card { flex: none; }
.lcbv--grid .lcbv-section.is-collapsed .lcbv-card:nth-child(n+5)  { display: none; }
@media (min-width: 25em)   { .lcbv--grid .lcbv-section.is-collapsed .lcbv-card:nth-child(n+5)  { display: block; } .lcbv--grid .lcbv-section.is-collapsed .lcbv-card:nth-child(n+7)  { display: none; } }
@media (min-width: 37.5em) { .lcbv--grid .lcbv-section.is-collapsed .lcbv-card:nth-child(n+7)  { display: block; } .lcbv--grid .lcbv-section.is-collapsed .lcbv-card:nth-child(n+9)  { display: none; } }
@media (min-width: 62.5em) { .lcbv--grid .lcbv-section.is-collapsed .lcbv-card:nth-child(n+9)  { display: block; } .lcbv--grid .lcbv-section.is-collapsed .lcbv-card:nth-child(n+11) { display: none; } }
.lcbv .lcbv-expand {
  display: block; margin: .2rem auto 0; padding: .35rem 1rem; border: 1px solid var(--lcbv-green);
  border-radius: 999px; background: #fff; color: var(--lcbv-green); font: inherit; font-size: .8rem; cursor: pointer;
}
.lcbv .lcbv-expand:hover { background: var(--lcbv-green); color: #fff; }
.lcbv .lcbv-expand[hidden] { display: none; }

/* ---- Tabs layout: one playlist at a time ---- */
.lcbv-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 .75rem; }
.lcbv-tabs[hidden] { display: none; }
.lcbv .lcbv-tab {
  padding: .4rem .9rem; border: 1px solid var(--lcbv-green); border-radius: 999px;
  background: #fff; color: var(--lcbv-green); font: inherit; font-size: .85rem; cursor: pointer;
}
.lcbv .lcbv-tab[aria-selected="true"] { background: var(--lcbv-green); color: #fff; }
.lcbv .lcbv-tab:hover { border-color: var(--lcbv-hover); }
.lcbv-count { opacity: .7; font-size: .75em; }
.lcbv--tabs .lcbv-track { display: grid; grid-template-columns: repeat(var(--lcbv-per), 1fr); overflow: visible; }
.lcbv--tabs .lcbv-card { flex: none; }
.lcbv--tabs.is-tabbed .lcbv-section { border: 0; padding-top: 0; }
.lcbv--tabs.is-tabbed .lcbv-section:not(.is-active) { display: none; }
.lcbv--tabs.is-tabbed .lcbv-head h4 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lcbv--tabs.is-tabbed .lcbv-head { justify-content: flex-end; }

/* Title strip for photo thumbnails listed in config.php 'show_title' */
.lcbv-overlay {
  position: absolute; left: 42px; right: 8px; bottom: 8px; z-index: 2;
  color: #fff; font-size: .72rem; line-height: 1.25; max-height: 2.5em; text-align: left;
  text-shadow: 0 1px 2px rgba(0,0,0,.7);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lcbv-card--titled .lcbv-thumb::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60%; z-index: 1;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
}
.lcbv-badge { z-index: 2; }

/* Theme styles all buttons; reset the ones used here */
.lcbv .lcbv-expand, .lcbv .lcbv-tab { width: auto !important; height: auto !important; min-width: 0; box-shadow: none; line-height: 1.4; text-transform: none; }
