/* modals.css — BEM 核心弹窗样式（全项目统一）
   所有数值向 /list 主项目扁平样式对齐，保证改造前后视觉一致 */

/* ===== 遮罩层 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalOverlayIn 200ms ease;
}

@keyframes modalOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== 弹窗容器 ===== */
.modal {
  background: #ffffff;
  width: 600px;
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  padding: 24px;
  display: flex;
  flex-direction: column;
  animation: modalIn 200ms ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== 宽度分级 ===== */
.modal--sm { width: 380px; }

/* ===== 标题栏 ===== */
.modal__title {
  font-size: 20px;
  font-weight: 500;
  color: #1f2329;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

/* ===== 关闭按钮 ===== */
.modal__close {
  font-size: 24px;
  color: #8f959e;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
  flex-shrink: 0;
  margin-left: auto;
}
.modal__close:hover {
  color: #646a73;
}

/* ===== 内容区 ===== */
.modal__body {
  overflow-y: auto;
  flex: 1;
}

/* ===== 底部按钮区 ===== */
.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: var(--sp-3);
}

/* 待办编辑弹窗：删除按钮置于底部左侧 */
#todoEditorDeleteBtn {
  margin-right: auto;
}

/* 音乐编辑弹窗：删除按钮置于底部左侧 */
#musicEditorDeleteBtn {
  margin-right: auto;
}

/* 歌词选择框所在的 form-group 需要相对定位 */
#musicEditorModal .form-group {
  position: relative;
}

/* 音乐编辑弹窗不允许内部滚动，否则下拉列表会被裁剪 */
#musicEditorModal .modal {
  overflow: visible;
}

/* ===== 歌词选择框 ===== */
.music-lrc-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s;
  font-size: 14px;
  color: #1f2329;
}
.music-lrc-select:hover {
  border-color: #3370ff;
}
.music-lrc-select__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-lrc-select__arrow {
  flex-shrink: 0;
  margin-left: 8px;
  font-size: 10px;
  color: #8f959e;
}

/* 歌词下拉列表 */
.music-lrc-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1800;
  max-height: 220px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  margin-top: 4px;
}
.music-lrc-dropdown__item {
  padding: 8px 12px;
  font-size: 14px;
  color: #1f2329;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s;
}
.music-lrc-dropdown__item:hover {
  background: #f2f3f5;
}
.music-lrc-dropdown__item--active {
  color: #3370ff;
  background: #f0f5ff;
}

/* ===== 按钮基础 ===== */
.modal__btn {
  height: 36px;
  padding: 0 20px;
  border: 1px solid #d9d9d9;
  background: #ffffff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #1f2329;
  cursor: pointer;
  transition: all 0.2s;
}
.modal__btn:hover {
  background: #f5f6f7;
  border-color: #d0d2d5;
}

/* ===== 主按钮（确认/保存）===== */
.modal__btn--primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  font-weight: 500;
}
.modal__btn--primary:hover {
  background: #2860e6;
}
.modal__btn--primary:disabled {
  background: #bfbfbf;
  border-color: #bfbfbf;
  cursor: not-allowed;
  color: #fff;
}

/* ===== 危险按钮（删除）===== */
.modal__btn--danger {
  background: #ffffff;
  border-color: #f54a45;
  color: #f54a45;
  font-weight: 500;
}
.modal__btn--danger:hover {
  background: #fff2f0;
  border-color: #d9403b;
  color: #d9403b;
}

/* ===== 音乐上传弹窗 ===== */
.music-upload__tabs {
  display: flex;
  background: var(--bg-2);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 12px;
  width: fit-content;
}
.music-upload__tab {
  padding: 6px 18px;
  border-radius: 6px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.2s;
}
.music-upload__tab--active {
  background: var(--bg-1);
  color: var(--text-1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.music-upload__dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border: 2px dashed var(--line-2);
  border-radius: 12px;
  background: var(--bg-2);
  cursor: pointer;
  transition: border-color 150ms, background 150ms;
}
.music-upload__dropzone:hover,
.music-upload__dropzone--over {
  border-color: var(--primary);
  background: rgba(20,86,240,0.04);
}
.music-upload__drop-text {
  font-size: 14px;
  color: var(--text-3);
}

.music-upload__status {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg-2);
  text-align: center;
}
.music-upload__status-text {
  font-size: 13px;
  color: var(--text-2);
}
.music-upload__status-text--error {
  color: #e33e38;
}
.music-upload__status-text--success {
  color: #00b42a;
}
.music-upload__file-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
  max-height: 160px;
  overflow-y: auto;
}
.music-upload__file-list li {
  padding: 3px 0;
  font-size: 12px;
  color: var(--text-2);
  border-bottom: 1px solid var(--bg-3, #eee);
  word-break: break-all;
}
.music-upload__file-list li:last-child {
  border-bottom: none;
}
