/* ========================================
   SEARCH OVERLAY — NEXT Online Cinema
   ======================================== */

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  background: rgba(8, 8, 12, 0.92);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-5xl) var(--space-xl) var(--space-2xl);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.search-overlay.is-active {
  opacity: 1;
  pointer-events: all;
}

.search-overlay__inner {
  width: 100%;
  max-width: 680px;
  position: relative;
}

.search-overlay__input {
  width: 100%;
  padding: 20px 60px 20px 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-xl);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: var(--font-size-xl);
  font-weight: 500;
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-overlay__input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.search-overlay__input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

.search-overlay__close {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
  background: none;
  border: none;
}

.search-overlay__close:hover {
  color: var(--text-primary);
}

.search-overlay__close svg {
  width: 24px;
  height: 24px;
}

/* Content area */
.search-overlay__content {
  width: 100%;
  max-width: 680px;
  margin-top: var(--space-2xl);
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  overflow-x: hidden;
}

.search-overlay__content::-webkit-scrollbar {
  width: 2px;
}

/* Sections */
.search-section {
  margin-bottom: var(--space-2xl);
}

.search-section__title {
  font-size: var(--font-size-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

/* Tag lists */
.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.search-tags .tag {
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-tags .tag:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

/* Result cards */
.search-results {
  display: flex;
  flex-direction: column;
}

.search-result-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  cursor: pointer;
  transition: opacity var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.search-result-card:last-child {
  border-bottom: none;
}

.search-result-card:hover {
  opacity: 0.7;
}

.search-result-card__poster {
  width: 44px;
  height: 66px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-card);
}

.search-result-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-card__info {
  flex: 1;
  min-width: 0;
}

.search-result-card__title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.search-result-card__meta {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

.search-result-card__rating {
  color: var(--accent-gold);
  font-weight: 600;
}

/* Empty state */
.search__empty {
  text-align: center;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  padding: var(--space-3xl) 0;
}
