/* =========================================================
   LTGVid Browse / Search Page
   ========================================================= */

.ltgv-browse-shell {
  width: min(1500px, calc(100vw - 32px));
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin: 0 0 50px 0;
  color: var(--ltgv-ink, #1c1c1a);
  font-family: inherit;
}

.ltgv-browse-shell *,
.ltgv-browse-shell *::before,
.ltgv-browse-shell *::after {
  box-sizing: border-box;
}


/* =========================================================
   Header
   ========================================================= */

.ltgv-browse-header {
  margin-bottom: 28px;
}

.ltgv-browse-heading {
  text-align: center;
  margin-bottom: 22px;
}

.ltgv-browse-heading h1 {
  margin: 0 0 5px;
  color: var(--ltgv-ink, #1c1c1a);
  font-size: 34px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.03em;
}

.ltgv-browse-heading p {
  margin: 0;
  color: var(--ltgv-muted, #686861);
  font-size: 15px;
}


/* =========================================================
   Search
   ========================================================= */

.ltgv-browse-search {
  display: flex;
  width: min(760px, 75vw);
  margin: 0 auto;
}

.ltgv-browse-search input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 20px;
  border: 1px solid #c7c7c0;
  border-right: 0;
  border-radius: 24px 0 0 24px;
  background: #fff;
  color: #171717;
  font-size: 16px;
  outline: none;
}

.ltgv-browse-search input:focus {
  border-color: #b18e00;
  box-shadow: inset 1px 0 0 #b18e00;
}

.ltgv-browse-search button {
  width: 66px;
  height: 48px;
  flex: 0 0 66px;
  border: 1px solid #e0b700;
  border-radius: 0 24px 24px 0;
  background: var(--ltgv-yellow, #ffd12a);
  color: #151515;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.ltgv-browse-search button:hover {
  background: #ffe06d;
}


/* =========================================================
   Toolbar
   ========================================================= */

.ltgv-browse-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 28px;
  margin-bottom: 14px;
}

.ltgv-browse-count {
  color: var(--ltgv-muted, #686861);
  font-size: 13px;
}


/* =========================================================
   Video grid
   ========================================================= */

.ltgv-browse-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 20px;
}


/* =========================================================
   Cards
   ========================================================= */

.ltgv-video-card {
  min-width: 0;
}

.ltgv-video-card-media,
.ltgv-video-card-copy {
  color: inherit;
  text-decoration: none;
}

.ltgv-video-card-media:hover,
.ltgv-video-card-media:focus,
.ltgv-video-card-copy:hover,
.ltgv-video-card-copy:focus {
  color: inherit;
  text-decoration: none;
}

.ltgv-video-thumbwrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--ltgv-line, #deded8);
  border-radius: 12px;
  background: #e7e7e2;
  box-shadow: 0 5px 16px rgba(30, 30, 24, .05);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.ltgv-video-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 160ms ease;
}

.ltgv-video-card-media:hover .ltgv-video-thumb {
  transform: scale(1.02);
}

.ltgv-video-card-media:hover .ltgv-video-thumbwrap,
.ltgv-video-card-media:focus-visible .ltgv-video-thumbwrap {
  border-color: #d2ad00;
  box-shadow: 0 8px 22px rgba(30, 30, 24, .09);
}

.ltgv-video-thumbwrap.is-thumbnail-waiting {
  background:
    linear-gradient(
      110deg,
      #e4e8ed 8%,
      #f1f3f6 18%,
      #e4e8ed 33%
    );
  background-size: 200% 100%;
  animation: ltgv-thumbnail-wait 1.5s linear infinite;
}

.ltgv-video-thumb-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: #687381;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

@keyframes ltgv-thumbnail-wait {
  to {
    background-position-x: -200%;
  }
}

.ltgv-video-duration {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.ltgv-video-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: start;
}

.ltgv-video-card-copy {
  min-width: 0;
}

.ltgv-video-title {
  display: -webkit-box;
  margin: 10px 3px 4px;
  overflow: hidden;
  color: var(--ltgv-ink, #1c1c1a);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ltgv-video-meta {
  margin: 0 3px;
  color: var(--ltgv-muted, #686861);
  font-size: 13px;
  line-height: 1.35;
}

.ltgv-card-menu {
  position: relative;
  margin-top: 7px;
}

.ltgv-card-menu > summary {
  list-style: none;
}

.ltgv-card-menu > summary::-webkit-details-marker {
  display: none;
}

.ltgv-card-menu-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #252525;
  cursor: pointer;
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  user-select: none;
}

.ltgv-card-menu-button:hover,
.ltgv-card-menu[open] .ltgv-card-menu-button {
  background: #fff4bd;
}

.ltgv-card-menu-panel {
  position: absolute;
  z-index: 30;
  top: 42px;
  right: 0;
  width: 190px;
  padding: 7px;
  border: 1px solid var(--ltgv-line, #deded8);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(17, 24, 39, 0.17);
}

.ltgv-card-menu-item {
  display: block;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #171717;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
}

.ltgv-card-menu-item:hover {
  background: #fff8dc;
}

.ltgv-card-menu-item.is-danger {
  color: #9e2525;
}

.ltgv-card-menu-item:disabled {
  opacity: .55;
  cursor: default;
}


/* =========================================================
   Empty / loading state
   ========================================================= */

.ltgv-browse-empty {
  padding: 70px 20px;
  text-align: center;
  color: var(--ltgv-muted, #686861);
  font-size: 16px;
}


/* =========================================================
   Pagination
   ========================================================= */

.ltgv-browse-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-top: 42px;
}

.ltgv-browse-pagination button {
  appearance: none;
  border: 1px solid #c8c8c0;
  border-radius: 999px;
  padding: 10px 18px;
  background: #fff;
  color: #171717;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.ltgv-browse-pagination button:hover:not(:disabled) {
  border-color: #d2ad00;
  background: #fff7cc;
}

.ltgv-browse-pagination button:disabled {
  opacity: 0.4;
  cursor: default;
}

.ltgv-browse-pagination span {
  min-width: 100px;
  text-align: center;
  color: var(--ltgv-muted, #686861);
  font-size: 13px;
}


/* =========================================================
   Medium screens
   ========================================================= */

@media (max-width: 1050px) {

  .ltgv-browse-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 700px) {

  .ltgv-browse-shell {
    width: 100vw;
  }

  .ltgv-browse-header {
    padding: 0 12px;
    margin-bottom: 18px;
  }

  .ltgv-browse-heading {
    margin-bottom: 15px;
  }

  .ltgv-browse-heading h1 {
    font-size: 25px;
  }

  .ltgv-browse-heading p {
    font-size: 14px;
  }

  .ltgv-browse-search {
    width: 100%;
  }

  .ltgv-browse-search input {
    height: 44px;
    padding: 0 16px;
    font-size: 15px;
  }

  .ltgv-browse-search button {
    width: 56px;
    height: 44px;
    flex-basis: 56px;
  }

  .ltgv-browse-toolbar {
    padding: 0 12px;
    margin-bottom: 12px;
  }

  .ltgv-browse-grid {
    display: block;
  }

  .ltgv-video-card {
    margin-bottom: 28px;
  }

  .ltgv-video-thumbwrap {
    border-radius: 0;
  }

  .ltgv-video-card-body {
    padding: 0 8px 0 12px;
  }

  .ltgv-video-title {
    margin: 9px 0 4px;
    font-size: 17px;
    line-height: 1.32;
  }

  .ltgv-video-meta {
    margin: 0;
    font-size: 13px;
  }

  .ltgv-card-menu {
    margin-top: 5px;
  }

  .ltgv-browse-pagination {
    margin: 30px 12px 0;
  }

}
/* Spoken-word search matches, shown only when the API returned a match. */
.ltgv-transcript-result {
  grid-column: 1 / -1;
  margin: 5px 3px 0;
  padding: 10px 12px;
  border-left: 3px solid #d8ac00;
  border-radius: 5px;
  background: #f8f7ef;
}
.ltgv-transcript-label {
  color: #55564c;
  font-size: 11px;
  font-weight: 750;
}
.ltgv-transcript-excerpt {
  margin: 5px 0;
  color: #242424;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.ltgv-transcript-jump {
  color: #584400;
  font-size: 13px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}
