.edc-video-library{
  --edc-video-brand:var(--brand,var(--wp--preset--color--primary,#534ab7));
  --edc-video-brand-light:var(--brand-light,#eeedfe);
  --edc-video-brand-mid:var(--brand-mid,#7f77dd);
  --edc-video-brand-dark:var(--brand-dark,#3c3489);
  --edc-video-border:var(--border,var(--wp--preset--color--contrast-3,rgba(0,0,0,.1)));
  --edc-video-border-strong:var(--border-strong,rgba(0,0,0,.18));
  --edc-video-muted:var(--text-secondary,var(--wp--preset--color--contrast-2,#65656d));
  --edc-video-surface:var(--surface,var(--wp--preset--color--base,#fff));
  --edc-video-text:var(--text-primary,var(--wp--preset--color--contrast,#171719));
  position:relative;
  width:100%;
  padding:1rem 0 2.5rem;
}

/* Full-viewport section divider, matching the Hero -> Resources transition. */
.edc-video-library::before{
  content:"";
  position:absolute;
  top:0;
  left:50%;
  width:100vw;
  transform:translateX(-50%);
  border-top:1px solid var(--edc-video-border);
  pointer-events:none;
}

/* Inherit the width of the Gutenberg content container. No extra horizontal
   padding: video cards should share the same left/right edges as Resources. */
.edc-video-library__inner{
  width:100%;
  max-width:1200px;
  margin:0 auto;
  padding:0;
}

.edc-video-library__header{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:1rem;
  width:100%;
  margin:0 0 .65rem;
}

.edc-video-library__title{
  margin:0;
  color:var(--edc-video-text);
  font-size:clamp(1.45rem,2vw,1.75rem);
  line-height:1.2;
  font-weight:500;
  letter-spacing:-.015em;
}

.edc-video-library__all{
  color:var(--edc-video-muted);
  font-size:.82rem;
  line-height:1.3;
  font-weight:500;
  text-decoration:none;
  white-space:nowrap;
}
.edc-video-library__all:hover,
.edc-video-library__all:focus-visible{
  color:var(--edc-video-brand-dark);
  text-decoration:underline;
  text-underline-offset:.18em;
}

/* Filter controls intentionally use the same full-bleed alignment currently
   used by the Resources filter row while cards remain content-aligned. */
.edc-video-library__tabs{
  position:relative;
  left:50%;
  width:100vw;
  margin:0 0 1rem -50vw;
  padding:0 1.5rem;
  box-sizing:border-box;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.45rem;
}

.edc-video-library__tab{
  min-height:0;
  margin:0;
  padding:.34rem .72rem;
  border:1px solid var(--edc-video-border-strong);
  border-radius:999px;
  background:var(--edc-video-surface);
  color:var(--edc-video-muted);
  box-shadow:none;
  cursor:pointer;
  font:inherit;
  font-size:.76rem;
  line-height:1.2;
  font-weight:500;
  white-space:nowrap;
  transition:background-color 120ms ease,border-color 120ms ease,color 120ms ease,transform 120ms ease;
}
.edc-video-library__tab:hover,
.edc-video-library__tab:focus-visible{
  border-color:var(--edc-video-brand-mid);
  background:var(--edc-video-brand-light);
  color:var(--edc-video-brand-dark);
}
.edc-video-library__tab.is-active{
  border-color:var(--edc-video-brand);
  background:var(--edc-video-brand);
  color:#fff;
}

.edc-video-library__grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1rem;
  width:100%;
  align-items:start;
}
.edc-video-library__empty{
  color:var(--edc-video-muted);
  font-size:.875rem;
  padding:2rem 0;
  text-align:center;
}

/* Card proportions intentionally mirror the Resource cards: media panel on
   top, compact white information footer below. */
.edc-video-card{
  min-width:0;
  overflow:hidden;
  position:relative;
  background:var(--edc-video-surface);
  border:1px solid var(--edc-video-border);
  border-radius:8px;
  box-shadow:none;
  transition:box-shadow .15s,transform .15s;
}
.edc-video-card:hover{
  box-shadow:0 4px 16px rgba(0,0,0,.08);
  transform:translateY(-2px);
}
.edc-video-card__button{
  display:flex;
  flex-direction:column;
  width:100%;
  height:auto;
  margin:0;
  padding:0;
  border:0;
  background:none;
  color:inherit;
  cursor:pointer;
  font:inherit;
  text-align:left;
}
.edc-video-card__thumb{
  position:relative;
  display:block;
  width:100%;
  aspect-ratio:1.4/1;
  overflow:hidden;
  background:var(--edc-video-brand-light);
}
.edc-video-card__image{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}
.edc-video-card__fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
}
.edc-video-card__fallback:before{
  content:"";
  margin-left:7px;
  border-top:18px solid transparent;
  border-bottom:18px solid transparent;
  border-left:28px solid var(--edc-video-brand-mid);
}
.edc-video-card__play{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.15);
  opacity:0;
  transition:opacity .2s;
}
.edc-video-card__play:before{
  content:"";
  width:40px;
  height:40px;
  border-radius:50%;
  background:color-mix(in srgb,var(--edc-video-brand) 92%,transparent);
}
.edc-video-card__play:after{
  content:"";
  position:absolute;
  margin-left:3px;
  border-top:7px solid transparent;
  border-bottom:7px solid transparent;
  border-left:11px solid #fff;
}
.edc-video-card:hover .edc-video-card__play,
.edc-video-card__button:focus-visible .edc-video-card__play{opacity:1}
.edc-video-card__duration{
  position:absolute;
  top:7px;
  right:9px;
  padding:2px 7px;
  border-radius:4px;
  background:rgba(0,0,0,.65);
  color:#fff;
  font-size:11px;
}
.edc-video-card__level{
  position:absolute;
  top:7px;
  left:9px;
  padding:3px 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:500;
}
.edc-video-card__level--beginner{background:#e1f5ee;color:#0f6e56}
.edc-video-card__level--intermediate{background:#eeedfe;color:#3c3489}
.edc-video-card__level--advanced{background:#faece7;color:#993c1d}
.edc-video-card__info{
  position:relative;
  display:block;
  width:100%;
  padding:.65rem .75rem .75rem;
  box-sizing:border-box;
  border-top:1px solid var(--edc-video-border);
  background:var(--edc-video-surface);
}
.edc-video-card__title{
  display:-webkit-box;
  margin:0 0 .1rem;
  overflow:hidden;
  color:var(--edc-video-text);
  font-size:.9rem;
  line-height:1.25;
  font-weight:600;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.edc-video-card__meta{
  display:block;
  color:var(--edc-video-muted);
  font-size:.78rem;
  line-height:1.4;
}

.edc-video-library__modal[hidden]{display:none}
.edc-video-library__modal{align-items:center;display:flex;inset:0;justify-content:center;padding:24px;position:fixed;z-index:100000}
.edc-video-library__backdrop{background:rgba(0,0,0,.72);inset:0;position:absolute}
.edc-video-library__dialog{background:var(--edc-video-surface);border-radius:8px;box-shadow:0 20px 60px rgba(0,0,0,.35);max-height:calc(100vh - 48px);max-width:1000px;overflow:auto;padding:24px;position:relative;width:100%}
.edc-video-library__close{background:transparent;border:0;color:var(--edc-video-muted);cursor:pointer;font-size:30px;height:40px;line-height:1;position:absolute;right:12px;top:10px;width:40px}
.edc-video-library__modal-title{color:var(--edc-video-text);font-size:20px;letter-spacing:0;margin:0 48px 16px 0}
.edc-video-library__player-wrap{align-items:center;aspect-ratio:16/9;background:#171717;display:flex;justify-content:center;width:100%}
.edc-video-library__player-wrap iframe,.edc-video-library__player{border:0;display:block;height:100%;width:100%}
.edc-video-library__loading{color:#fff;font-size:14px}
.edc-video-library__download,.edc-video-library__sign-in{background:var(--edc-video-brand);border-radius:6px;color:#fff;display:inline-block;font-size:14px;font-weight:500;padding:10px 16px;text-decoration:none}
.edc-video-library__error{color:var(--edc-video-muted);font-size:14px;margin:.75rem 0 0}
.edc-video-library__modal-actions{margin-top:16px;text-align:right}
.edc-video-modal-open{overflow:hidden}

@media(max-width:782px){
  .edc-video-library{padding:1rem 0 2rem}
  .edc-video-library__title{font-size:1.4rem}
  .edc-video-library__tabs{gap:.4rem;padding:0 1rem}
  .edc-video-library__grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
}
@media(max-width:560px){
  .edc-video-library__header{align-items:flex-start}
  .edc-video-library__grid{grid-template-columns:1fr}
  .edc-video-library__modal{padding:12px}
  .edc-video-library__dialog{padding:16px}
  .edc-video-card__title{font-size:.95rem}
  .edc-video-card__meta{font-size:.82rem}
}

/* v1.2 modal copy, teaser and protected-access state */
.edc-video-library__player-wrap[hidden]{display:none!important}
.edc-video-library__modal-excerpt{
  margin:1rem 0 .5rem;
  color:var(--edc-video-text);
  font-size:1rem;
  line-height:1.55;
  font-weight:500;
}
.edc-video-library__modal-description{
  margin-top:.75rem;
  color:var(--edc-video-muted);
  font-size:.95rem;
  line-height:1.7;
}
.edc-video-library__modal-description>*:first-child{margin-top:0}
.edc-video-library__modal-description>*:last-child{margin-bottom:0}
.edc-video-library__access-notice{
  margin-top:1rem;
  padding:1rem;
  border:1px solid var(--edc-video-border);
  border-radius:8px;
  background:var(--edc-video-brand-light);
  color:var(--edc-video-text);
}
.edc-video-library__access-notice>strong{
  display:block;
  margin-bottom:.25rem;
  color:var(--edc-video-brand-dark);
}
.edc-video-library__access-message{
  margin:.25rem 0 .75rem;
  color:var(--edc-video-muted);
  font-size:.9rem;
  line-height:1.5;
}
.edc-video-library__access-actions{
  display:flex;
  flex-wrap:wrap;
  gap:.65rem;
}
.edc-video-library__request-access,
.edc-video-library__sign-in{
  appearance:none;
  border:0;
  border-radius:6px;
  background:var(--edc-video-brand);
  color:#fff!important;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font:inherit;
  font-size:.875rem;
  font-weight:600;
  line-height:1.2;
  min-height:38px;
  padding:.65rem 1rem;
  text-decoration:none!important;
}
.edc-video-library__request-access:disabled{cursor:default;opacity:.7}
.edc-video-library__request-status{
  margin:.7rem 0 0;
  color:var(--edc-video-muted);
  font-size:.85rem;
}

.edc-video-card__modal-copy[hidden]{display:none!important}

/* v1.2.2 membership acquisition and access gateway */
.edc-video-library__get-access{
  appearance:none;
  border:0;
  border-radius:6px;
  background:var(--edc-video-brand);
  color:#fff!important;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font:inherit;
  font-size:.875rem;
  font-weight:600;
  line-height:1.2;
  min-height:38px;
  padding:.65rem 1rem;
  text-decoration:none!important;
}
.edc-video-library__request-access{
  border:1px solid var(--edc-video-brand);
  background:var(--edc-video-surface);
  color:var(--edc-video-brand)!important;
}
.edc-video-access-gateway{
  box-sizing:border-box;
  width:min(100%,900px);
  margin:2rem auto 4rem;
  padding:0 1rem;
  color:var(--edc-video-text,#1f1f1f);
}
.edc-video-access-gateway>h1{margin-bottom:.5rem}
.edc-video-access-gateway__intro{max-width:760px;color:var(--edc-video-muted,#666);line-height:1.6}
.edc-video-access-gateway__section,
.edc-video-access-gateway__status{
  margin-top:1.5rem;
  padding:1.25rem;
  border:1px solid var(--edc-video-border,#ddd);
  border-radius:10px;
  background:var(--edc-video-surface,#fff);
}
.edc-video-access-gateway__section>h2,
.edc-video-access-gateway__section>h3{margin-top:0}
.edc-video-access-gateway__options{display:grid;gap:.75rem}
.edc-video-access-gateway__option,
.edc-video-access-gateway__return{
  display:inline-flex;
  width:fit-content;
  padding:.65rem 1rem;
  border-radius:6px;
  background:var(--edc-video-brand,#534ab7);
  color:#fff!important;
  font-weight:600;
  text-decoration:none!important;
}
.edc-video-access-gateway__back{margin-top:1.5rem}

/* v1.3 collection/view model */
.edc-video-library__grid{grid-template-columns:repeat(var(--edc-video-columns,3),minmax(0,1fr))}
@media(max-width:900px){.edc-video-library__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.edc-video-library__grid{grid-template-columns:1fr}}
