/**
 * Editions Component Styles
 * UI for song editions/variants management
 */

/* Edition card with variant selector */
.edition-card {
  background: linear-gradient(135deg, rgba(30, 30, 40, 0.95), rgba(20, 20, 30, 0.95));
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.edition-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Edition badge - indicates this is an edition with variants */
.edition-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
  z-index: 10;
}

.edition-badge i {
  font-size: 0.9rem;
}

/* Edition header */
.edition-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.edition-cover {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.edition-info {
  flex: 1;
  min-width: 0;
}

.edition-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.edition-artist {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 0.5rem 0;
}

.edition-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.edition-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Variant selector */
.variant-selector {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.variant-selector-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.variant-selector-label i {
  color: #667eea;
}

.variant-dropdown {
  width: 100%;
  background: rgba(30, 30, 40, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: white;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
}

.variant-dropdown:hover {
  border-color: #667eea;
  background: rgba(40, 40, 50, 0.9);
}

.variant-dropdown:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.variant-dropdown option {
  background: #1a1a2e;
  color: white;
  padding: 0.5rem;
}

/* Edition type badges for dropdown options */
.edition-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
}

.edition-type-ORIGINAL { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.edition-type-RADIO_EDIT { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); color: white; }
.edition-type-EXTENDED_MIX { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); color: white; }
.edition-type-CLUB_MIX { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); color: white; }
.edition-type-INSTRUMENTAL { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); color: white; }
.edition-type-ACAPELLA { background: linear-gradient(135deg, #30cfd0 0%, #330867 100%); color: white; }
.edition-type-VIP_MIX { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); color: #333; }
.edition-type-REMIX { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); color: #333; }
.edition-type-LIVE { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); color: #333; }
.edition-type-ACOUSTIC { background: linear-gradient(135deg, #ff6e7f 0%, #bfe9ff 100%); color: white; }
.edition-type-OTHER { background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); color: #333; }

/* Edition stats */
.edition-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.edition-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.edition-stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #667eea;
}

.edition-stat-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Variant info display */
.current-variant-info {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(102, 126, 234, 0.1);
  border-left: 3px solid #667eea;
  border-radius: 4px;
}

.current-variant-info p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 8px;
}

.current-variant-info i {
  color: #667eea;
}

/* Loading state */
.edition-loading {
  text-align: center;
  padding: 2rem;
  color: rgba(255, 255, 255, 0.6);
}

.edition-loading i {
  font-size: 2rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Empty state */
.editions-empty {
  text-align: center;
  padding: 3rem;
  color: rgba(255, 255, 255, 0.5);
}

.editions-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.editions-empty h3 {
  margin: 0 0 0.5rem 0;
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive */
@media (max-width: 768px) {
  .edition-header {
    flex-direction: column;
  }

  .edition-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .edition-stats {
    justify-content: space-around;
  }

  .edition-meta {
    font-size: 0.8rem;
  }
}

/* Edition grid layout */
.editions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  padding: 1rem 0;
}

@media (max-width: 768px) {
  .editions-grid {
    grid-template-columns: 1fr;
  }
}

/* Integration with existing player */
.edition-card .play-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.edition-card .play-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

.edition-card .play-button:active {
  transform: scale(0.95);
}

.edition-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
