/* ── Video Swap Widget Styles ── */

.vsw-section { width: 100%; }

/* ── ROW ── */
.vsw-video-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

/* ── COLUMNS ── */
.vsw-video-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
}
.vsw-video-col.vsw-primary   { flex: 0 0 calc(70% - 8px); }
.vsw-video-col.vsw-secondary { flex: 0 0 calc(30% - 8px); }

.vsw-video-col.vsw-animate-to-primary {
  animation: vswGrowCol 0.55s cubic-bezier(0.4,0,0.2,1) forwards;
}
.vsw-video-col.vsw-animate-to-secondary {
  animation: vswShrinkCol 0.55s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes vswGrowCol {
  from { flex-basis: calc(30% - 8px); }
  to   { flex-basis: calc(70% - 8px); }
}
@keyframes vswShrinkCol {
  from { flex-basis: calc(70% - 8px); }
  to   { flex-basis: calc(30% - 8px); }
}

/* ── VIDEO CARD ── */
.vsw-video-card {
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: #111;
  width: 100%;
  height: 320px;
}

.vsw-thumb {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.vsw-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.5s ease;
}

.vsw-video-col.vsw-secondary .vsw-thumb img { filter: blur(4px) brightness(0.7); }
.vsw-video-col.vsw-primary   .vsw-thumb img { filter: none; }

.vsw-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.vsw-video-col.vsw-primary .vsw-thumb::after { opacity: 1; }

/* Play button */
.vsw-play-btn {
  position: absolute;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s ease, opacity 0.4s ease;
  z-index: 2;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.vsw-play-btn svg { fill: #222; width: 18px; height: 18px; margin-left: 3px; }
.vsw-video-col.vsw-primary .vsw-play-btn { opacity: 0; }
.vsw-video-col.vsw-primary:hover .vsw-play-btn { opacity: 1; }
.vsw-video-col.vsw-secondary .vsw-play-btn { opacity: 1; }
.vsw-video-card:hover .vsw-play-btn { transform: scale(1.1); }

/* Label chip */
.vsw-label {
  position: absolute;
  bottom: 14px; left: 14px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  z-index: 3;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.vsw-label span { display: block; font-size: 11px; font-weight: 400; opacity: 0.75; }
.vsw-video-col.vsw-primary .vsw-label { opacity: 1; transform: translateY(0); }

/* More tag */
.vsw-more-tag {
  position: absolute;
  bottom: 10px; left: 10px;
  background: rgba(0,0,0,0.55);
  color: rgba(255,255,255,0.7);
  font-size: 10px; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 4px;
  z-index: 3; opacity: 0; transition: opacity 0.5s;
}
.vsw-video-col.vsw-primary .vsw-more-tag { opacity: 1; }

/* Badge */
.vsw-badge {
  position: absolute;
  top: 10px; left: 10px;
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  border-radius: 6px; padding: 4px 8px;
  font-size: 11px; color: #fff; font-weight: 600;
  z-index: 3;
}
.vsw-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #a855f7; }

/* ── META CONTENT ── */
.vsw-meta-content {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 24px;
}
.vsw-brand-logo-wrap {
  flex: 0 0 calc(25% - 16px);
  display: flex;
  align-items: center;
}
.vsw-logo-img {
  max-width: 100%;
  height: auto;
  max-height: 40px;
  object-fit: contain;
}
.vsw-brand-detail {
  overflow: hidden;
  opacity: 1;
  max-height: 80px;
  transition: opacity 0.4s ease, max-height 0.45s ease;
  display: flex;
  flex: 1;
  align-items: center;
  gap: 24px;
}
.vsw-brand-detail .vsw-brand-text { flex: 1; }
.vsw-brand-detail .vsw-view-case {
  flex: 0 0 auto;
  white-space: nowrap;
}
.vsw-brand-detail.vsw-hidden {
  opacity: 0;
  max-height: 0;
  pointer-events: none;
}

.vsw-brand-text {
  font-size: 13px; color: #444;
  line-height: 1.5;
  margin: 0;
}
.vsw-view-case {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; white-space: nowrap;
  transition: color 0.2s ease;
}
.vsw-view-case .vsw-btn-text {
  font-size: 13px; font-weight: 600;
  color: #6366f1;
  transition: color 0.2s ease;
}
.vsw-view-case .vsw-btn-icon {
  color: #6366f1;
  font-size: 16px;
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color 0.2s ease;
}
.vsw-view-case .vsw-btn-icon svg { width: 1em; height: 1em; }

/* iframe */
iframe.vsw-iframe {
  position: absolute;
  inset: 0; width: 100%; height: 100%;
  border: none; z-index: 10;
}

/* ── MOBILE ── */
@media (max-width: 640px) {
  .vsw-video-row { flex-direction: column; }
  .vsw-video-col.vsw-primary,
  .vsw-video-col.vsw-secondary {
    flex: none !important;
    width: 100%;
  }
  .vsw-video-card {
    height: auto !important;
    aspect-ratio: 16 / 9;
  }
  .vsw-video-col.vsw-secondary .vsw-thumb img { filter: none; }
  .vsw-video-col.vsw-secondary .vsw-play-btn { opacity: 0; }
  .vsw-video-col .vsw-thumb::after { opacity: 1; }
  .vsw-video-col.vsw-secondary .vsw-thumb::after { opacity: 0; }
  .vsw-video-col .vsw-label { opacity: 1; transform: none; }
  .vsw-video-col .vsw-more-tag { opacity: 1; }

  .vsw-brand-detail.vsw-hidden {
    opacity: 1;
    max-height: none;
    pointer-events: auto;
  }
  .vsw-brand-detail {
    max-height: none;
    overflow: visible;
  }
  .vsw-meta-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .vsw-brand-logo-wrap { flex: none; width: 100%; }
  .vsw-brand-detail {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    flex: none;
  }
  .vsw-brand-detail .vsw-brand-text {
    flex: none; width: 100%;
    white-space: normal;
  }
  .vsw-brand-detail .vsw-view-case { flex: none; }
}
