/* search.css */

/* Keresés és Zenekérés gombok pozícionálása */
#search-trigger-button {
  left: 20px;
}

#request-button {
  /* Eltoljuk a kereső gomb mellé */
  left: 155px;
}

/* Kereső felület (overlay) */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  z-index: 1010;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Fentre igazítjuk */
  padding-top: 15vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.search-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* A fő kereső konténer */
.search-container {
  width: 100%;
  max-width: 600px;
  transform: translateY(-20px) scale(0.98);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: 0.1s;
}

.search-overlay.active .search-container {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Wrapper a kereső mezőnek és a gombnak */
.search-input-wrapper {
  position: relative;
}

/* A kereső beviteli mező */
#search-input {
  width: 100%;
  padding: 18px 60px 18px 30px; /* Hely a gombnak jobbra */
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 500;
  color: white;
  outline: none;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}
#search-input::selection {
  background-color: rgb(153, 153, 153);
  color: black;
}

#search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

#search-input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(255, 45, 85, 0.2);
}

/* Véletlen keresés gomb */
.random-search-button {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 10;
}

.random-search-button:hover {
  color: white;
  transform: translateY(-50%) scale(1.1);
}

/* Eredmények listája */
.search-results-list {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  max-height: 50vh;
  overflow-y: auto;
  border-radius: 15px;
}

/* Görgetősáv stílusa */
.search-results-list::-webkit-scrollbar {
  width: 8px;
}
.search-results-list::-webkit-scrollbar-track {
  background: transparent;
}
.search-results-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}
.search-results-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Egy-egy találati elem */
.search-result-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  opacity: 0;
  transform: translateX(-10px);
  animation: resultFadeIn 0.5s ease forwards;
}

@keyframes resultFadeIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.search-result-item:first-child {
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.search-result-item:last-child {
  border-bottom: none;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}

.search-result-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.02);
}

.search-result-item img {
  width: 45px;
  height: 45px;
  border-radius: 6px;
  object-fit: cover;
  margin-right: 15px;
  flex-shrink: 0;
}

.search-result-info h4 {
  margin: 0 0 4px 0;
  font-weight: 500;
  color: #fff;
}

.search-result-info p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.search-result-empty {
  padding: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 15px;
}

/* ÚJ SZABÁLYOK az előadó találathoz */
.search-result-item.artist-result .search-result-info p {
  color: var(--primary-color);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.search-result-item.artist-result img {
  border-radius: 50%; /* Kör alakú kép az előadóknak */
}

/* Kereső bezárás gomb */
.search-close-button {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: none;
  font-size: 2.5rem;
  font-weight: 200;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1;
}

.search-close-button:hover {
  transform: scale(1.1);
  color: white;
}
