.video-library,
.video-watch {
  --video-blue: #0878c9;
  --video-blue-dark: #073d76;
  --video-ink: #102f4e;
  --video-muted: #63778c;
  --video-line: #d7e4ed;
  background: #f4f8fb;
  color: var(--video-ink);
  padding-top: 24px;
}

.video-library *,
.video-library *::before,
.video-library *::after,
.video-watch *,
.video-watch *::before,
.video-watch *::after {
  box-sizing: border-box;
}

.video-library-hero {
  background:
    radial-gradient(circle at 88% 20%, rgba(32,183,220,.22), transparent 27%),
    linear-gradient(135deg, #052e5a 0%, #075d9b 62%, #0878c9 100%);
  color: #fff;
  margin-top: 24px;
  overflow: hidden;
  padding: clamp(38px, 6vw, 70px) 0;
  position: relative;
}

.video-library-hero::after {
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  content: "";
  height: 420px;
  position: absolute;
  right: -130px;
  top: -230px;
  width: 420px;
}

.video-library-hero__inner {
  align-items: end;
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr) auto;
  position: relative;
  z-index: 1;
}

.video-library-eyebrow {
  align-items: center;
  color: #8de4f3;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  gap: 7px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.video-library-eyebrow .dashicons {
  font-size: 18px;
  height: 18px;
  width: 18px;
}

.video-library .video-library-hero h1 {
  color: #fff !important;
  font-size: clamp(36px, 5vw, 62px);
  letter-spacing: -.04em;
  line-height: 1.05;
  margin: 12px 0 16px;
}

.video-library-hero p {
  color: #dceefa;
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.65;
  margin: 0;
  max-width: 760px;
}

.video-library-social {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.video-library-social__link {
  align-items: center;
  background: rgba(3,35,67,.32);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 7px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  gap: 7px;
  min-height: 38px;
  padding: 8px 13px;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.video-library-social__link .dashicons {
  color: #8de4f3;
  font-size: 18px;
  height: 18px;
  width: 18px;
}

.video-library-social__link:hover,
.video-library-social__link:focus-visible {
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.5);
  color: #fff;
  transform: translateY(-1px);
}

.video-library-hero__stats {
  display: flex;
  gap: 10px;
}

.video-library-hero__stats span {
  background: rgba(3,35,67,.42);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  display: grid;
  font-size: 11px;
  gap: 3px;
  min-width: 108px;
  padding: 13px 15px;
}

.video-library-hero__stats strong {
  color: #fff;
  font-size: 25px;
  line-height: 1;
}

.video-library__content {
  padding-bottom: 70px;
}

.video-library-search {
  align-items: center;
  background: #fff;
  border: 1px solid var(--video-line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(7,61,118,.05);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 24px;
  padding: 9px 11px;
}

.video-library-search label {
  align-items: center;
  display: flex;
  flex: 1;
  min-width: 0;
}

.video-library-search label > .dashicons {
  color: var(--video-blue);
  flex: 0 0 22px;
  margin: 0 8px 0 3px;
}

.video-library-search input {
  appearance: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--video-ink);
  flex: 1;
  font-size: 14px;
  min-height: 40px;
  min-width: 0;
  outline: 0;
  padding: 0;
}

.video-library-search button {
  appearance: none;
  background: #e9f5fc;
  border: 0;
  border-radius: 6px;
  color: var(--video-blue-dark);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 10px;
}

.video-library-search__status {
  border-left: 1px solid var(--video-line);
  color: var(--video-muted);
  flex: 0 0 auto;
  font-size: 11px;
  padding: 0 8px 0 18px;
}

.video-library-search-empty {
  align-items: center;
  background: #fff;
  border: 1px dashed #abc6d8;
  border-radius: 10px;
  color: var(--video-muted);
  display: flex;
  gap: 9px;
  justify-content: center;
  margin-top: 28px;
  min-height: 96px;
}

.video-library-search-empty .dashicons {
  color: var(--video-blue);
}

.video-library-search-empty p {
  font-size: 13px;
  margin: 0;
}

[data-video-search-empty][hidden],
[data-video-section][hidden],
[data-video-item][hidden] {
  display: none !important;
}

.video-library-notice {
  align-items: center;
  background: #fff8e8;
  border: 1px solid #f0d99f;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding: 13px 16px;
}

.video-library-notice > .dashicons {
  color: #a56a00;
  flex: 0 0 20px;
}

.video-library-notice p {
  color: #65512c;
  flex: 1;
  font-size: 13px;
  margin: 0;
}

.video-library-notice a {
  color: #7a4d00;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 650;
}

.video-library-section {
  margin-top: clamp(34px, 5vw, 58px);
}

.video-library-section__heading {
  align-items: end;
  border-bottom: 1px solid var(--video-line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 15px;
}

.video-library-section__heading > div > span,
.video-watch-related > header > div > span {
  color: var(--video-blue);
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.video-library-section__heading h2,
.video-watch-related h2 {
  color: var(--video-ink);
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -.025em;
  line-height: 1.18;
  margin: 0;
}

.video-library-section__heading p {
  color: var(--video-muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 5px 0 0;
}

.video-library-rail__controls {
  display: flex;
  gap: 7px;
}

.video-library-rail__controls button {
  align-items: center;
  appearance: none;
  background: #fff;
  border: 1px solid #bdd3e2;
  border-radius: 8px;
  color: var(--video-blue-dark);
  cursor: pointer;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  padding: 0;
  width: 38px;
}

.video-library-rail__controls button:hover,
.video-library-rail__controls button:focus-visible {
  background: var(--video-blue);
  border-color: var(--video-blue);
  color: #fff;
}

.video-library-rail__controls button:disabled {
  cursor: default;
  opacity: .35;
}

.video-short-rail {
  display: grid;
  gap: 16px;
  grid-auto-columns: clamp(220px, 22vw, 292px);
  grid-auto-flow: column;
  justify-content: start;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-color: #b8ccd9 transparent;
  scrollbar-width: thin;
}

.video-short-card {
  background: #fff;
  border: 1px solid var(--video-line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(7,61,118,.06);
  min-width: 0;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-margin-top: 150px;
}

.video-card-media {
  align-items: center;
  background: #09233a;
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}

.video-card-media--short {
  aspect-ratio: 9 / 16;
}

.video-card-media--landscape {
  aspect-ratio: 16 / 9;
}

.video-card-media img {
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
  width: 100%;
}

.video-card-media iframe {
  border: 0;
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.video-card-media:hover img {
  transform: scale(1.025);
}

.video-card-media__placeholder {
  color: #85b8d6;
  font-size: 48px;
  height: 48px;
  width: 48px;
}

.video-card-media__shade {
  background: linear-gradient(180deg, rgba(1,21,39,.18) 45%, rgba(1,21,39,.72) 100%);
  inset: 0;
  position: absolute;
}

.video-card-media__play {
  align-items: center;
  background: #e4232b;
  border: 3px solid rgba(255,255,255,.85);
  border-radius: 50%;
  box-shadow: 0 7px 20px rgba(0,0,0,.22);
  color: #fff;
  display: flex;
  height: 48px;
  justify-content: center;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
}

.video-card-media__play .dashicons {
  font-size: 22px;
  height: 22px;
  margin-left: 2px;
  width: 22px;
}

.video-card-media__platform {
  background: rgba(1,25,47,.8);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 5px;
  bottom: 10px;
  color: #fff;
  font-size: 9px;
  font-weight: 650;
  left: 10px;
  padding: 4px 7px;
  position: absolute;
}

.video-short-card__body {
  padding: 12px;
}

.video-short-card h3,
.video-landscape-card h3,
.video-watch-related h3 {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
}

.video-short-card h3 a,
.video-landscape-card h3 a,
.video-watch-related h3 a {
  color: var(--video-ink);
  font-weight: inherit;
  text-decoration: none;
}

.video-short-card h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-short-card h3 a:hover,
.video-landscape-card h3 a:hover,
.video-watch-related h3 a:hover {
  color: var(--video-blue);
}

.video-short-card time {
  color: var(--video-muted);
  display: block;
  font-size: 10px;
  margin-top: 7px;
}

.video-card-channel {
  align-items: center;
  color: var(--video-muted);
  display: inline-flex;
  font-size: 10px;
  gap: 5px;
  margin-top: 7px;
  max-width: 100%;
  text-decoration: none;
}

.video-card-channel .dashicons {
  color: var(--video-blue);
  font-size: 14px;
  height: 14px;
  width: 14px;
}

.video-card-channel span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-card-channel:hover {
  color: var(--video-blue);
}

.video-card-source {
  align-items: center;
  color: var(--video-blue);
  display: inline-flex;
  font-size: 10px;
  gap: 4px;
  margin-top: 8px;
  text-decoration: none;
}

.video-card-product {
  align-items: center;
  background: #f1f8fc;
  border: 1px solid #d7e8f2;
  border-radius: 8px;
  color: var(--video-ink);
  display: grid;
  gap: 8px;
  grid-template-columns: 42px minmax(0, 1fr) 16px;
  margin-top: 10px;
  padding: 7px;
  text-decoration: none;
}

.video-card-product > img {
  background: #fff;
  border-radius: 6px;
  height: 42px;
  object-fit: contain;
  width: 42px;
}

.video-card-product > span {
  min-width: 0;
}

.video-card-product small {
  color: var(--video-blue);
  display: block;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.video-card-product strong {
  color: var(--video-ink);
  display: -webkit-box;
  font-size: 10px;
  font-weight: 550;
  line-height: 1.35;
  margin-top: 2px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-card-product__price {
  color: #d5242f;
  display: block;
  font-size: 10px;
  font-weight: 650;
  margin-top: 2px;
}

.video-card-product__price .amount {
  color: inherit;
  font-size: inherit;
}

.video-card-product > .dashicons {
  color: var(--video-blue);
  font-size: 16px;
  height: 16px;
  width: 16px;
}

.video-card-product:hover {
  border-color: var(--video-blue);
  color: var(--video-ink);
}

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

.video-landscape-card {
  background: #fff;
  border: 1px solid var(--video-line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(7,61,118,.06);
  overflow: hidden;
  scroll-margin-top: 150px;
}

.video-landscape-card__body {
  padding: 15px;
}

.video-landscape-card h3 {
  font-size: 16px;
}

.video-landscape-card__body > p {
  color: var(--video-muted);
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.55;
  margin: 8px 0 13px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-landscape-card__body > div {
  align-items: center;
  border-top: 1px solid #e7eef3;
  display: flex;
  justify-content: space-between;
  padding-top: 11px;
}

.video-landscape-card time {
  color: var(--video-muted);
  font-size: 10px;
}

.video-landscape-card__body > div > a {
  color: var(--video-blue);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}

.video-library-section-empty {
  align-items: center;
  background: #fff;
  border: 1px dashed #abc6d8;
  border-radius: 11px;
  color: var(--video-muted);
  display: flex;
  gap: 10px;
  justify-content: center;
  min-height: 110px;
  padding: 20px;
}

.video-library-section-empty > .dashicons {
  color: var(--video-blue);
  font-size: 25px;
  height: 25px;
  width: 25px;
}

.video-library-section-empty p {
  font-size: 13px;
  margin: 0;
}

.video-library-section-empty a {
  color: var(--video-blue);
  font-size: 12px;
  font-weight: 650;
}

.video-library-empty {
  background: #fff;
  border: 1px dashed #abc6d8;
  border-radius: 12px;
  margin-top: 42px;
  padding: 54px 24px;
  text-align: center;
}

.video-library-empty > .dashicons {
  color: var(--video-blue);
  font-size: 50px;
  height: 50px;
  width: 50px;
}

.video-library-empty h2 {
  margin: 12px 0 6px;
}

.video-library-empty p {
  color: var(--video-muted);
  margin: 0 0 18px;
}

.video-library-empty a {
  color: var(--video-blue);
  font-weight: 650;
}

/* Trang xem riêng */
.video-watch {
  padding-bottom: 64px;
}

.video-watch__hero {
  align-items: center;
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  grid-template-columns: minmax(300px, .75fr) minmax(0, 1.25fr);
  padding-bottom: 46px;
  padding-top: 36px;
}

.video-watch__article--short .video-watch__hero {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
}

.video-watch__type {
  align-items: center;
  color: var(--video-blue);
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  gap: 7px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.video-watch__type .dashicons {
  font-size: 18px;
  height: 18px;
  width: 18px;
}

.video-watch__header h1 {
  color: var(--video-ink);
  font-size: clamp(32px, 4.4vw, 54px);
  letter-spacing: -.035em;
  line-height: 1.08;
  margin: 13px 0 16px;
}

.video-watch__header > p {
  color: var(--video-muted);
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
}

.video-watch__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.video-watch__meta > * {
  align-items: center;
  color: #536b80;
  display: inline-flex;
  font-size: 11px;
  gap: 5px;
}

.video-watch__meta .dashicons {
  color: var(--video-blue);
  font-size: 16px;
  height: 16px;
  width: 16px;
}

.video-watch__player-wrap {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.video-watch__player {
  aspect-ratio: 16 / 9;
  background: #061c31;
  border: 1px solid #103c62;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(4,39,72,.2);
  overflow: hidden;
  position: relative;
  width: 100%;
}

.video-watch__article--short .video-watch__player {
  aspect-ratio: 9 / 16;
  max-height: min(72vh, 760px);
  width: auto;
}

.video-watch__player iframe {
  border: 0;
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.video-watch__unavailable {
  align-items: center;
  aspect-ratio: 16 / 9;
  background: #eaf1f6;
  border-radius: 14px;
  color: var(--video-muted);
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
}

.video-watch__content-layout {
  border-top: 1px solid var(--video-line);
  padding-top: 34px;
}

.video-watch__content {
  color: #344b60;
  font-size: 15px;
  line-height: 1.75;
  margin: 0 auto;
  max-width: 860px;
}

.video-watch__source {
  align-items: center;
  background: var(--video-blue);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 650;
  gap: 7px;
  margin-top: 18px;
  min-height: 42px;
  padding: 9px 14px;
  text-decoration: none;
}

.video-watch__source:hover {
  background: var(--video-blue-dark);
  color: #fff;
}

.video-watch-related {
  border-top: 1px solid var(--video-line);
  margin-top: 48px;
  padding-top: 34px;
}

.video-watch-related > header {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.video-watch-related > header > a {
  color: var(--video-blue);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.video-watch-related__grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.video-watch-related__grid article {
  min-width: 0;
}

.video-watch-related__grid .video-card-media {
  border-radius: 10px;
}

.video-watch-related__grid .video-card-media--short {
  aspect-ratio: 9 / 12;
}

.video-watch-related h3 {
  margin-top: 10px;
}

@media (max-width: 980px) {
  .video-library-hero__inner {
    align-items: start;
    grid-template-columns: 1fr;
  }

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

  .video-watch__hero,
  .video-watch__article--short .video-watch__hero {
    grid-template-columns: 1fr;
  }

  .video-watch__article--short .video-watch__player {
    max-height: 680px;
  }

  .video-watch-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .video-library,
  .video-watch {
    padding-top: 16px;
  }

  .video-library-hero {
    margin-top: 16px;
    padding: 34px 0;
  }

  .video-library-hero__inner {
    gap: 24px;
  }

  .video-library-hero__stats {
    width: 100%;
  }

  .video-library-hero__stats span {
    flex: 1;
    min-width: 0;
  }

  .video-library-notice {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .video-library-search {
    gap: 8px;
  }

  .video-library-search__status {
    display: none;
  }

  .video-library-notice p {
    min-width: calc(100% - 34px);
  }

  .video-library-section__heading {
    align-items: center;
  }

  .video-library-section__heading p {
    display: none;
  }

  .video-short-rail {
    grid-auto-columns: 57%;
  }

  .video-landscape-grid {
    grid-template-columns: 1fr;
  }

  .video-watch__hero {
    gap: 26px;
    padding-bottom: 34px;
    padding-top: 26px;
  }

  .video-watch__article--short .video-watch__player {
    max-height: 72vh;
    max-width: 100%;
  }

  .video-watch__content-layout {
    padding-top: 26px;
  }

  .video-watch-related__grid {
    grid-template-columns: 1fr 1fr;
  }

  .video-watch-related__grid .video-card-media--short {
    aspect-ratio: 9 / 13;
  }

  .video-watch-related h3 {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .video-short-rail {
    scroll-behavior: auto;
  }

  .video-card-media img {
    transition: none;
  }
}
