/* public/css/playlists-channel.css */

#channel-playlists .channel-content {
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.playlists-layout {
  display: flex;
  flex-grow: 1; 
  min-height: 0;
  align-items: stretch; 
  padding: 0 1.5rem; 
  gap: 1rem;
}

.playlist-divider-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 1.5rem;
  padding: 0 0.5rem;
}

.playlist-column {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  min-width: 0;
  background-color: var(--color-windows-bg);
  border: 1px solid #000;
  border-top-color: #fff;
  border-left-color: #fff;
  border-radius: 0.375rem;
  box-shadow: inset 0 6px 12px rgba(0,0,0,0.8);
}

.playlist-section-header,
.bucket-header {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  font-family: var(--font-sections, sans-serif);
  background-color: var(--color-background-header-banner);
  padding: 0.4rem 0.75rem;
  border-radius: 0.375rem 0.375rem 0 0;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border-secondary);
  background-image: linear-gradient(to bottom, rgba(255,255,255,0.2), rgba(0,0,0,0.25));
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
  box-shadow: 0 4px 8px rgba(0,0,0,0.6);
  flex-shrink: 0;
  min-height: 44px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-section-header {
  justify-content: center;
}

.bucket-header {
  position: relative;
  justify-content: center;
}

.bucket-header .icon-button {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
}

#channel-playlists .playlist-controls {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background-color: var(--color-windows-bg);
  border-bottom: 1px solid var(--color-border-secondary);
  align-items: center;
  flex-shrink: 0;
}

#channel-playlists .playlist-controls .dropdown-input-wrapper {
  flex-grow: 1;
  min-width: 0;
  position: relative;
}

#channel-playlists .playlist-controls .form-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.playlist-main-content {
  flex-grow: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

#playlist-songs-left {
  background-color: var(--color-console-main);
  padding: 0.5rem;
  overflow-y: auto;
  height: 100%;
}

.playlist-songs-container {
  flex-grow: 1;
  min-height: 0; 
  background-color: var(--color-console-main);
  border-radius: 0 0 0.375rem 0.375rem;
  padding: 0.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}


.playlist-manager-song-entry {
  padding: 0.2rem 0.5rem;
  background-color: #374151;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
  cursor: grab;
  color: #d1d5db;
  transition: background-color 0.2s;
  background-image: linear-gradient(to bottom, rgba(255,255,255,0.15), rgba(0,0,0,0.2));
  box-shadow: inset 0 2px 2px rgba(0,0,0,0.6), inset 0 -1px 2px rgba(255,255,255,0.2), 0 3px 5px rgba(0,0,0,0.5);
  border: 1px solid rgba(0,0,0,0.5);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.playlist-manager-song-entry:hover {
  background-color: #4b5563;
}

.playlist-manager-song-entry:active {
  cursor: grabbing;
}

.drag-over-top {
  border-top: 2px solid var(--color-active-highlight) !important;
}

.drag-over-bottom {
  border-bottom: 2px solid var(--color-active-highlight) !important;
}

#playlist-editor-view {
  padding: 0.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#playlist-editor-view.hidden {
  display: none !important;
}

#playlist-description-textarea {
  flex-grow: 1;
  resize: none;
}

#playlist-tag-editor {
  flex-shrink: 0;
}

#playlist-tags-input {
  margin-bottom: 0.5rem;
}

#playlist-tags-display-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 24px;
}

#playlist-tag-editor .tag-item {
  background-color: #4b5563;
  padding: 0.1rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

#playlist-tag-editor .tag-item:hover {
  background-color: #ef4444;
}

#playlist-privacy-btn.is-public,
#playlist-description-btn.active-icon {
  background-color: var(--color-active-highlight);
  color: white;
}

#playlist-privacy-btn.is-public {
  color: #f3f4f6; 
}


.playlist-footer-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.5rem 0 1.5rem;
  flex-shrink: 0;
}

.playlist-creation-area {
  display: flex;
  gap: 0.5rem;
  justify-self: center; 
}

#playlist-lottery-ticket-btn {
  grid-column: 3;
  justify-self: center;
  font-size: 1.25rem;
  width: 40px;
  height: 40px;
  transition: all 0.2s ease-in-out;
}

#playlist-lottery-ticket-btn:disabled {
  background-color: #374151;
  color: #6b7280;
  cursor: not-allowed;
  filter: grayscale(80%);
  box-shadow: inset 0 3px 6px rgba(0,0,0,0.6);
}

#playlist-lottery-ticket-btn:not(:disabled) {
    color: #facc15; /* Gold color for active ticket */
    animation: ticket-pulse 2s infinite;
}

@keyframes ticket-pulse {
    0% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(250, 204, 21, 0); }
    100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0); }
}


#refresh-bucket-btn {
    font-size: 0.8rem;
    width: 28px;
    height: 28px;
}
#refresh-bucket-btn:active {
    transform: rotate(360deg);
    transition: transform 0.5s ease;
}

#delete-playlist-btn:hover {
    background-color: #ef4444;
    color: white;
}

#channel-playlists .playlist-controls .icon-button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}