.modalOverlay {
  position: fixed;
  inset: 0;
  background-color: rgb(0 0 0 / 70%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  overflow: auto;
}

.modal {
  background: var(--spice-card);
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: auto;
  position: relative;
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--spice-button-disabled);
}

.modalTitle {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--spice-text);
}

.modalBody {
  padding: 18px 24px;
  overflow-y: auto;
  max-height: calc(90vh - 70px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trackStats {
  color: var(--spice-text);
}

.warning {
  color: var(--spice-notification-error);
  font-style: italic;
}

.warningBox {
  background: rgb(255 193 7 / 10%);
  border: 1px solid rgb(255 193 7 / 30%);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 12px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.warningBox::before {
  content: "⚠️";
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.warningBox .warning {
  color: #ffc107;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.warningBox .warning strong {
  color: #fff3cd;
  font-weight: 600;
}

.playlistForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.formField {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  font-size: 14px;
  font-weight: 600;
  color: var(--spice-text);
}

.textarea {
  min-height: 80px;
  resize: vertical;
}

.input,
.textarea {
  padding: 10px 12px;
  border-radius: 4px;
  background: var(--spice-main);
  border: 1px solid var(--spice-button-disabled);
  color: var(--spice-text);
  font-size: 14px;
  width: 100%;
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: rgb(255 255 255 / 30%);
}

.tagsSection {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.formActions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.cancelButton {
  background: rgb(0 0 0 / 30%);
  color: var(--spice-text);
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.cancelButton:hover {
  background: rgb(255 255 255 / 10%);
}

.createButton {
  background: rgb(0 0 0 / 30%);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.createButton:hover {
  background: rgb(255 255 255 / 10%);
}

.filtersContainer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: rgb(0 0 0 / 10%);
  border-radius: 4px;

  /* border-left: 3px solid #1e90ff; */
}

.filterRow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.compactFilterRow {
  display: flex;
  gap: 4px;
  font-size: 13px;
  color: var(--spice-text);
  flex-direction: column;
}

.compactFilter {
  display: flex;
  align-items: center;
  gap: 4px;
}

.filterLabel {
  font-weight: 600;
  color: var(--spice-text);
  font-size: 13px;
  min-width: fit-content;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  background: #1e40af;
  color: white;
  border-radius: 12px;
  padding: 2.5px 8px;
  font-size: 11px;
  display: inline-block;
}

.tag:hover {
  background-color: #1e3a8a;
}

.excludedTag {
  background: #b91c1c;
  color: white;
  border-radius: 12px;
  padding: 2.5px 8px;
  font-size: 11px;
  display: inline-block;
}

.excludedTag:hover {
  background: #991b1b;
  opacity: 0.95 !important;
}

.helpTooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgb(30 144 255 / 20%);
  color: #1e90ff;
  font-size: 12px;
  font-weight: 600;
  cursor: help;
  transition: all 0.2s ease;

  /* margin-bottom: 16px; */
}

.helpTooltip:hover {
  background: rgb(30 144 255 / 30%);
  transform: scale(1.1);
}

.tooltipContent {
  position: absolute;
  bottom: 100%;
  left: 0;

  /* margin-bottom: 8px; */
  background: var(--spice-card);
  color: var(--spice-text);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgb(0 0 0 / 30%);
  border: 1px solid rgb(255 255 255 / 10%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
  width: 280px;
  max-width: 280px;
}

.helpTooltip:hover .tooltipContent {
  opacity: 1;
  visibility: visible;
  transform: translateY(-4px);
}

.tooltipContent::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 20px;
  border: 6px solid transparent;
  border-top-color: var(--spice-card);
}
