/* ═══════════════════════════════════════════════════════════════
   css/video-search.css
   Styles for hybrid video search results dropdown
   Include in section/css.php:
   <link rel="stylesheet" href="<?php echo $url_domain;?>/css/video-search.css">
═══════════════════════════════════════════════════════════════ */

/* Results container */
.isw-lr {
  display: none;
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 16px 50px rgba(0,0,0,.14);
  z-index: 9999;
  overflow: hidden;
  max-height: 520px;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.isw-lr.vsr-open { display: block; }

/* Section headers */
.vsr-section-hd {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px 7px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid #F1F5F9;
  background: #FAFBFC;
  position: sticky;
  top: 0;
  z-index: 1;
}
.vsr-site-hd { color: #DC2626; }
.vsr-yt-hd   { color: #DC2626; background: #FFF1F2; border-bottom-color: #FECDD3; }

/* Channel sub-header */
.vsr-chan-hd {
  padding: 7px 16px 5px;
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  background: #F8FAFC;
  border-bottom: 1px solid #F1F5F9;
}

/* Result item */
.vsr-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid #F8FAFC;
  transition: background .15s;
}
.vsr-item:last-child { border-bottom: none; }
.vsr-item:hover { background: #F8FAFC; text-decoration: none; }

/* Thumbnail */
.vsr-thumb {
  position: relative;
  width: 88px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #F1F5F9;
}
.vsr-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.vsr-thumb-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #FEE2E2, #FECDD3);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Duration badge */
.vsr-dur {
  position: absolute;
  bottom: 4px; right: 4px;
  background: rgba(0,0,0,.78);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  backdrop-filter: blur(2px);
}

/* YouTube badge on thumb */
.vsr-yt-badge {
  position: absolute;
  bottom: 4px; left: 4px;
  background: rgba(0,0,0,.6);
  border-radius: 4px;
  padding: 2px 4px;
  display: flex;
  align-items: center;
}

/* Text info */
.vsr-info { flex: 1; min-width: 0; }
.vsr-title {
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
  line-height: 1.3;
}
.vsr-item:hover .vsr-title { color: #DC2626; }

.vsr-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #64748B;
  margin-bottom: 5px;
}
.vsr-channel { font-weight: 600; }
.vsr-views { color: #94A3B8; }
.vsr-ext-icon { color: #DC2626; font-size: 12px; }

/* Source badges */
.vsr-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.vsr-badge-site { background: #DCFCE7; color: #15803D; }
.vsr-badge-yt   { background: #FEE2E2; color: #B91C1C; }

/* Loading state */
.vsr-loading {
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: #94A3B8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.vsr-spinner {
  width: 16px; height: 16px;
  border: 2px solid #E2E8F0;
  border-top-color: #DC2626;
  border-radius: 50%;
  animation: vsrSpin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes vsrSpin { to { transform: rotate(360deg); } }

/* Empty / fallback */
.vsr-empty {
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: #94A3B8;
}
.vsr-fallback {
  color: #DC2626;
  font-weight: 600;
  font-size: 13px;
  justify-content: center;
}

/* See all footer link */
.vsr-see-all {
  display: block;
  padding: 12px 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #DC2626;
  background: #FFF1F2;
  border-top: 1px solid #FECDD3;
  text-decoration: none;
  transition: background .15s;
}
.vsr-see-all:hover {
  background: #FEE2E2;
  text-decoration: none;
  color: #B91C1C;
}

/* Scrollbar inside results */
.isw-lr::-webkit-scrollbar { width: 4px; }
.isw-lr::-webkit-scrollbar-track { background: transparent; }
.isw-lr::-webkit-scrollbar-thumb { background: #E2E8F0; border-radius: 4px; }

/* Responsive */
@media (max-width: 600px) {
  .vsr-thumb { width: 68px; height: 42px; }
  .vsr-title { font-size: 12px; }
}
