/* MP3 download result UI — only styles actually used */

.hidden {
  display: none !important;
}

.opacity-0 {
  opacity: 0;
}

#container.a-mp3-result {
  width: 100%;
  margin: 0;
  padding: 0 0 10px;
}

.a-mp3-result__card {
  width: 100%;
  box-sizing: border-box;
}

.a-mp3-result__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .a-mp3-result__row {
    flex-direction: column;
    align-items: stretch;
  }

  .a-mp3-result__meta {
    width: 100%;
  }

  .download-mp3 {
    width: 100%;
    min-width: 0;
  }
}

.a-mp3-result__meta {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
  overflow: hidden;
  gap: 2px;
}

#music_title,
#music_author {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  line-height: 22px;
}

#music_title {
  font-weight: 700;
  font-size: 16px;
  color: #0f172a;
}

#music_author {
  font-size: 14px;
  color: #64748b;
}

.download-mp3 {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 148px;
  height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #007bff;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s ease;
}

.download-mp3:hover {
  background: #0056b3;
}

.download-mp3-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.download-mp3-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: #fff;
}

.download-mp3-text {
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

#music_download #loader {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 24px;
  height: 24px;
}

#music_download #loader.animate-spin {
  animation: a-mp3-spin 1s linear infinite;
}

#music_download .fill-neutral-800 {
  fill: #ffffff;
}

/* Overlay loader / error */
#overlay_loader.overlay {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  position: fixed;
  z-index: 9999;
  background: #f5f5f5;
}

.overlay__inner {
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  position: absolute;
}

.overlay__content {
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.spinner {
  width: 75px;
  height: 75px;
  display: inline-block;
  border-width: 2px;
  border-style: solid;
  border-radius: 100%;
  border-color: #e5e5e5;
  border-top-color: #171717;
  animation: a-mp3-spin 1s infinite linear;
  box-sizing: border-box;
}

@keyframes a-mp3-spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Error message (built by download.js) */
.a-mp3-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #f5f5f5;
}

.a-mp3-error__icon {
  width: 96px;
  height: 96px;
  margin-bottom: 32px;
}

.a-mp3-error__icon .fill-red-300 {
  fill: #fca5a5;
}

.a-mp3-error__title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: #f5f5f5;
}

.a-mp3-error__subtitle {
  margin: 0 0 8px;
  font-size: 18px;
  color: #d4d4d4;
}

.a-mp3-error__home {
  margin: 8px 0 0;
  font-size: 18px;
}

.a-mp3-error__home a {
  color: #93c5fd;
  text-decoration: none;
}

.a-mp3-error__home a:hover {
  color: #60a5fa;
}

/* Error overlay uses darker background so light text is readable */
#overlay_loader.overlay.is-error {
  background: #262626;
}
