/* Frontend */
.vod-downloads-page{
  display:grid;
  gap:34px;
}

.vod-downloads-page .vod-section{
  padding-top:6px;
  border-top:1px solid rgba(15,23,42,.10);
}

.vod-section-title{
  margin:0 0 18px;
  font-size:2rem;
  color:#0b223f;
}

.vod-download-toolbar{
  display:grid;
  gap:14px;
}

.vod-download-search{
  width:100%;
  min-height:52px;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  border-radius:16px;
  padding:0 16px;
  font-size:1rem;
  outline:none;
  box-shadow:0 10px 30px rgba(2,6,23,.04);
}

.vod-download-search:focus{
  border-color:rgba(10,75,155,.30);
  box-shadow:0 10px 30px rgba(10,75,155,.08);
}

.vod-download-filter-wrap{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.vod-filter-btn{
  appearance:none;
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  color:#0a4b9b;
  min-height:40px;
  padding:8px 14px;
  border-radius:999px;
  font-weight:700;
  cursor:pointer;
  transition:.2s ease;
}

.vod-filter-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 24px rgba(2,6,23,.06);
}

.vod-filter-btn.is-active{
  background:#0a4b9b;
  color:#fff;
  border-color:#0a4b9b;
}

.vod-download-grid,
.vod-download-list{
  display:grid;
  gap:16px;
}

.vod-download-card{
  display:grid;
  grid-template-columns:88px 1fr auto;
  gap:18px;
  align-items:center;
  background:#fff;
  border:1px solid rgba(15,23,42,.10);
  border-radius:20px;
  padding:18px;
  box-shadow:0 10px 30px rgba(2,6,23,.06);
}

.vod-download-card.is-featured{
  border-color:rgba(10,75,155,.22);
  box-shadow:0 14px 34px rgba(10,75,155,.08);
}

.vod-download-icon{
  width:88px;
  height:88px;
  border-radius:20px;
  background:linear-gradient(180deg,#eaf4ff 0%,#d8eafb 100%);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:4px;
  border:1px solid rgba(10,75,155,.10);
  text-align:center;
}

.vod-download-icon-emoji{
  font-size:1.7rem;
  line-height:1;
}

.vod-download-icon small{
  font-weight:800;
  font-size:13px;
  color:#0a4b9b;
  letter-spacing:.04em;
}

.vod-download-content{
  min-width:0;
}

.vod-download-top{
  display:flex;
  flex-wrap:wrap;
  gap:10px 14px;
  align-items:center;
  margin-bottom:6px;
}

.vod-download-title{
  margin:0;
  font-size:1.15rem;
  line-height:1.3;
  color:#0b223f;
}

.vod-download-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.vod-download-badge{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:4px 10px;
  border-radius:999px;
  background:#eef6ff;
  color:#0a4b9b;
  font-size:.88rem;
  font-weight:700;
}

.vod-download-date{
  font-size:.92rem;
  color:rgba(11,18,32,.60);
}

.vod-download-desc{
  margin:0;
  color:rgba(11,18,32,.74);
  line-height:1.65;
}

.vod-download-action{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.vod-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:10px 18px;
  border-radius:999px;
  text-decoration:none;
  font-weight:700;
  transition:.2s ease;
  white-space:nowrap;
  border:none;
  cursor:pointer;
}

.vod-btn.vod-btn-primary{
  background:#0a4b9b;
  color:#fff;
}

.vod-btn.vod-btn-primary:hover{
  background:#1d75d4;
  transform:translateY(-1px);
}

.vod-btn.vod-btn-secondary{
  background:#eef6ff;
  color:#0a4b9b;
  border:1px solid rgba(10,75,155,.14);
}

.vod-btn.vod-btn-secondary:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 24px rgba(2,6,23,.06);
}

.vod-download-empty{
  margin-top:10px;
  padding:18px 20px;
  border-radius:16px;
  background:#fff;
  border:1px dashed rgba(15,23,42,.14);
  color:rgba(11,18,32,.72);
}

/* Modal */
.vod-preview-modal[hidden]{
  display:none !important;
}

.vod-preview-modal{
  position:fixed;
  inset:0;
  z-index:9999;
}

.vod-preview-backdrop{
  position:absolute;
  inset:0;
  background:rgba(7,15,28,.56);
  backdrop-filter:blur(3px);
}

.vod-preview-dialog{
  position:relative;
  z-index:2;
  width:min(1100px, calc(100% - 24px));
  height:min(85vh, 900px);
  margin:4vh auto 0;
  background:#fff;
  border-radius:24px;
  box-shadow:0 30px 80px rgba(2,6,23,.30);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.vod-preview-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:18px 22px;
  border-bottom:1px solid rgba(15,23,42,.08);
}

.vod-preview-header h3{
  margin:0;
  font-size:1.1rem;
  color:#0b223f;
}

.vod-preview-close{
  position:absolute;
  top:12px;
  right:12px;
  width:42px;
  height:42px;
  border:none;
  border-radius:999px;
  background:#f2f6fb;
  color:#0b1220;
  font-size:1.8rem;
  line-height:1;
  cursor:pointer;
}

.vod-preview-body{
  flex:1;
  min-height:0;
  background:#f7fbff;
}

.vod-preview-body iframe{
  width:100%;
  height:100%;
  border:none;
  display:block;
  background:#fff;
}

.vod-preview-body img{
  display:block;
  max-width:100%;
  max-height:100%;
  margin:0 auto;
  object-fit:contain;
  width:100%;
  height:100%;
  background:#fff;
}

.vod-preview-fallback{
  display:flex;
  align-items:center;
  justify-content:center;
  height:100%;
  padding:30px;
  text-align:center;
  color:rgba(11,18,32,.72);
}

body.vod-preview-open{
  overflow:hidden;
}

@media (max-width:860px){
  .vod-download-card{
    grid-template-columns:72px 1fr;
  }

  .vod-download-icon{
    width:72px;
    height:72px;
    border-radius:18px;
  }

  .vod-download-action{
    grid-column:1 / -1;
    justify-content:flex-start;
  }

  .vod-preview-dialog{
    width:calc(100% - 12px);
    height:88vh;
    margin:2vh auto 0;
    border-radius:18px;
  }

  .vod-preview-header{
    padding:16px 18px 14px;
    padding-right:62px;
    align-items:flex-start;
    flex-direction:column;
  }
}

@media (max-width:560px){
  .vod-download-card{
    grid-template-columns:1fr;
  }

  .vod-download-icon{
    width:64px;
    height:64px;
  }

  .vod-btn{
    width:100%;
  }
}
