/* ===============================
   SINGLE VIDEO PAGE (FINAL CLEAN)
================================ */

/* Page */
.single-video {
  background: #fff;
  padding-bottom: 40px;
}

/* Container */
.sv-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ===============================
   VIDEO PLAYER
================================ */

.sv-player {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 40px auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.sv-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ===============================
   TITLES
================================ */

.sv-title {
  margin: 10px 0 10px;
  font-size: 22px;
  font-weight: 600;
  color: #146782;
}

.vlib-section-title {
  margin: 20px 0 16px;
}

/* ===============================
   PLAYLIST GRID (FIXED)
================================ */

/* Force correct grid */
.single-video .vlib-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 24px;
  row-gap: 24px;
  margin-bottom: 32px;
}

/* Card structure */
.single-video .vlib-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease;
}

.single-video .vlib-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
}

/* Active video highlight */
.single-video .vlib-card.active {
  border: 2px solid #146782;
}

/* ===============================
   THUMBNAIL FIX (CRITICAL)
================================ */

.single-video .vlib-card__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.single-video .vlib-card__thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Play overlay */
.single-video .vlib-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .3);
  opacity: 0;
  transition: opacity .2s ease;
}

.single-video .vlib-card:hover .vlib-card__play {
  opacity: 1;
}

.single-video .vlib-card__play svg {
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, .7);
  border-radius: 50%;
  padding: 12px;
}

/* ===============================
   TEXT FIX (REMOVE WHITE SPACE ISSUE)
================================ */

.single-video .vlib-card h3,
.single-video .vlib-title {
  font-size: 16px;
  font-weight: 700;
  color: #146782;
  margin: 12px 16px 16px;
  line-height: 1.35;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===============================
   LOAD MORE BUTTON
================================ */

.single-video .vlib-load-more-wrap {
  text-align: center;
  margin-top: 30px;
}

.single-video .vlib-load-more {
  padding: 14px 36px;
  font-size: 1rem;
  font-weight: 600;
  background: #146782;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.single-video .vlib-load-more:hover {
  background: #0f4d5a;
  transform: translateY(-2px);
}

.single-video .vlib-load-more:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 1024px) {
  .single-video .vlib-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .single-video .vlib-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .single-video .vlib-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================
   MODERN VIDEO META UI
================================ */

.sv-meta {
  margin-top: 20px;
}

.sv-video-title {
  font-size: 30px;
  font-weight: 800;
  color: #146782;
  margin-bottom: 10px;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* DESCRIPTION CARD */
.sv-description {
  background: #f3f4f6;
  padding: 16px;
  border-radius: 12px;
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
  position: relative;
}

/* READ MORE */
.sv-read-more {
  color: #146782;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 6px;
}

/* ACTION ROW */
.sv-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

/* BUTTON STYLE */
.sv-btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: #e5e7eb;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.sv-btn:hover {
  background: #d1d5db;
}

/* ================================
   SHARE MODAL
================================ */

.sv-share-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.sv-share-box {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 320px;
}

.sv-share-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

/* ================================
   SHARE BUTTONS – PREMIUM STYLE
================================ */

.sv-share-options {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.sv-share-btn {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  background: #f3f4f6;
  color: #374151;
  transition: all 0.25s ease;
  cursor: pointer;
  display: inline-block;
}

/* HOVER COLORS */

/* WhatsApp */
.sv-whatsapp:hover {
  background: #25D366;
  color: #fff;
  transform: translateY(-2px);
}

/* Facebook */
.sv-facebook:hover {
  background: #1877F2;
  color: #fff;
  transform: translateY(-2px);
}

/* X (Twitter) */
.sv-twitter:hover {
  background: #000000;
  color: #fff;
  transform: translateY(-2px);
}

/* Email */
.sv-email:hover {
  background: #EA4335;
  color: #fff;
  transform: translateY(-2px);
}

.sv-share-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sv-share-copy {
  display: flex;
  gap: 5px;
}

.sv-share-copy input {
  flex: 1;
  padding: 6px;
}

/* ================================
   PRIMARY SHARE BUTTON
================================ */

.sv-btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.25s ease;
}

/* 🔥 HIGHLIGHTED SHARE BUTTON */
.sv-btn--primary {
  background: linear-gradient(135deg, #146782, #1d8aa6);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(20, 103, 130, 0.3);
}

.sv-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(20, 103, 130, 0.4);
}

.sv-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 15px;
}

/* Pulse effect (subtle attention grab) */
.sv-btn--primary {
  animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 rgba(20, 103, 130, 0.3);
  }

  50% {
    box-shadow: 0 0 12px rgba(20, 103, 130, 0.6);
  }

  100% {
    box-shadow: 0 0 0 rgba(20, 103, 130, 0.3);
  }
}

/* TITLE + SHARE ALIGN */
.sv-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
}

/* TITLE */
.sv-video-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  margin-bottom: 16px;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* MAIN SHARE BUTTON - ENHANCED */
.sv-share-btn-main {
  background: linear-gradient(135deg, #146782, #1d8aa6);
  color: #fff;

  border: none;
  padding: 14px 26px;
  /* 🔥 bigger size */
  font-size: 16px;
  /* 🔥 more readable */
  font-weight: 600;

  border-radius: 999px;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  box-shadow: 0 8px 20px rgba(20, 103, 130, 0.3);
  transition: all 0.25s ease;

  /* 🔥 makes it stand out */
  transform: scale(1.05);
}

/* HOVER EFFECT (VERY IMPORTANT) */
.sv-share-btn-main:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 28px rgba(20, 103, 130, 0.5);
}

/* ACTIVE CLICK */
.sv-share-btn-main:active {
  transform: scale(0.98);
}

.sv-description {
  margin-top: 10px;
  background: #f3f6f8;
  padding: 14px 18px;
  border-radius: 10px;
}

/* BLOCK YOUTUBE BOTTOM-RIGHT ACTIONS */
.sv-player::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;

  /* 🔥 Responsive sizing */
  width: clamp(120px, 18%, 220px);
  height: clamp(50px, 12%, 100px);

  /* Transparent but clickable */
  background: transparent;

  z-index: 3;
  pointer-events: auto;
}

/* Action row: left group + share on right */
.sv-action-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 12px;
}

/* Left side: channel info + subscribe side by side */
.sv-left-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Channel logo + name grouped together */
.sv-channel-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sv-channel-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sv-channel-name {
  font-size: 22px;
  font-weight: 700;
  color: #146782;
  word-break: break-word;
}

/* ================================
   RESPONSIVE – META / BUTTONS
================================ */

/* Tablet: 768px and below */
@media (max-width: 768px) {
  .sv-action-buttons {
    flex-wrap: wrap;
    gap: 10px;
  }

  .sv-channel-logo {
    width: 36px;
    height: 36px;
  }

  .sv-channel-name {
    font-size: 17px;
  }

  .sv-share-btn-main,
  .sv-subscribe-btn {
    padding: 11px 20px;
    font-size: 14px;
  }
}

/* Mobile: 480px and below — stack left group above share */
@media (max-width: 480px) {
  .sv-action-buttons {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .sv-left-group {
    width: 100%;
    justify-content: space-between;
  }

  .sv-share-btn-main {
    width: 100%;
    justify-content: center;
  }

  .sv-channel-logo {
    width: 32px;
    height: 32px;
  }

  .sv-channel-name {
    font-size: 15px;
  }

  .sv-subscribe-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
}

.sv-subscribe-btn {
  background: linear-gradient(135deg, #ff3b3b, #ff0000);
  color: #fff;

  border: none;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;

  border-radius: 999px;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
  transition: all 0.25s ease;

  transform: scale(1.05);
}

.sv-subscribe-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 28px rgba(255, 0, 0, 0.5);
}

.sv-subscribe-btn:active {
  transform: scale(0.97);
}

.sv-subscribe-btn {
  animation: pulseRed 2.5s infinite;
}

@keyframes pulseRed {
  0% {
    box-shadow: 0 0 0 rgba(255, 0, 0, 0.3);
  }

  50% {
    box-shadow: 0 0 14px rgba(255, 0, 0, 0.6);
  }

  100% {
    box-shadow: 0 0 0 rgba(255, 0, 0, 0.3);
  }
}

.sv-subscribe-btn {
  background: linear-gradient(135deg, #146782, #1d8aa6);
}