/* Thread 创建弹窗 */
.wk-thread-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wk-thread-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
}

.wk-thread-modal-content {
  position: relative;
  width: 360px;
  background: var(--wk-bg-surface);
  border-radius: var(--wk-r-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  animation: wkModalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes wkModalIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

body[theme-mode="dark"] .wk-thread-modal-content {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.wk-thread-modal-header {
  display: flex;
  align-items: center;
  gap: var(--wk-sp-2);
  padding: var(--wk-sp-4);
  border-bottom: 1px solid var(--wk-border-default);
}

.wk-thread-modal-icon {
  color: var(--wk-brand-primary);
  flex-shrink: 0;
}

.wk-thread-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--wk-text-primary);
  flex: 1;
}

.wk-thread-modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--wk-r-sm);
  cursor: pointer;
  color: var(--wk-text-tertiary);
  transition: background 0.15s, color 0.15s;
}

.wk-thread-modal-close:hover {
  background: var(--wk-bg-hover);
  color: var(--wk-text-primary);
}

.wk-thread-modal-body {
  padding: var(--wk-sp-4);
}

.wk-thread-modal-field {
  margin-bottom: var(--wk-sp-4);
}

.wk-thread-modal-field:last-child {
  margin-bottom: 0;
}

.wk-thread-modal-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--wk-text-secondary);
  margin-bottom: var(--wk-sp-2);
}

.wk-thread-modal-input {
  width: 100%;
  padding: var(--wk-sp-2-5) var(--wk-sp-3);
  background: var(--wk-bg-base);
  border: 1px solid var(--wk-border-default);
  border-radius: var(--wk-r-md);
  font-size: 14px;
  color: var(--wk-text-primary);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.wk-thread-modal-input:focus {
  border-color: var(--wk-brand-primary);
  box-shadow: 0 0 0 2px var(--wk-brand-tint-10);
}

.wk-thread-modal-input::placeholder {
  color: var(--wk-text-tertiary);
}

.wk-thread-modal-input-error {
  border-color: var(--wk-color-error);
}

.wk-thread-modal-error {
  font-size: 12px;
  color: var(--wk-color-error);
  margin-top: var(--wk-sp-1);
}

/* 归档时间选择 */
.wk-thread-modal-archive-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wk-sp-2);
}

.wk-thread-modal-archive-option {
  padding: var(--wk-sp-1-5) var(--wk-sp-3);
  background: var(--wk-bg-base);
  border: 1px solid var(--wk-border-default);
  border-radius: var(--wk-r-full);
  font-size: 13px;
  color: var(--wk-text-secondary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.wk-thread-modal-archive-option:hover {
  background: var(--wk-bg-hover);
}

.wk-thread-modal-archive-option-active {
  background: var(--wk-brand-tint-06);
  border-color: var(--wk-brand-primary);
  color: var(--wk-text-accent);
}

.wk-thread-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--wk-sp-2);
  padding: var(--wk-sp-4);
  border-top: 1px solid var(--wk-border-default);
}

.wk-thread-modal-btn {
  padding: var(--wk-sp-2) var(--wk-sp-4);
  border-radius: var(--wk-r-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.wk-thread-modal-btn-cancel {
  background: var(--wk-bg-hover);
  color: var(--wk-text-secondary);
  border: none;
}

.wk-thread-modal-btn-cancel:hover {
  background: var(--wk-bg-active);
}

.wk-thread-modal-btn-submit {
  background: var(--wk-brand-primary);
  color: white;
  border: none;
}

.wk-thread-modal-btn-submit:hover {
  opacity: 0.9;
}

.wk-thread-modal-btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
