.jszahz-topic-hidden {
  display: none;
}

.jszahz-topic-drawer-loading.jszahz-topic-hidden {
  display: none;
}

.jszahz-topic {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.jszahz-topic-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: #f8fbff;
  border: 1px solid #d9e5f3;
  border-radius: 8px;
}

.jszahz-topic-batch,
.jszahz-topic-tip {
  color: #475569;
  font-size: 13px;
}

.jszahz-topic-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.jszahz-topic-upload-stack {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.jszahz-topic-upload-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #d9e5f3;
  border-radius: 8px;
}

.jszahz-topic-upload-label {
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.jszahz-topic-upload input[type="file"] {
  max-width: 280px;
}

.jszahz-topic-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: #334155;
}

.jszahz-topic-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.jszahz-topic-actions {
  flex-direction: row;
  align-items: flex-end;
  gap: 10px;
}

.jszahz-topic-table th:last-child,
.jszahz-topic-table td:last-child {
  text-align: center;
}

.jszahz-topic-link {
  border: none;
  background: transparent;
  color: #1976d2;
  cursor: pointer;
  font-weight: 700;
  padding: 0;
}

.jszahz-topic-link:hover {
  text-decoration: underline;
}

.jszahz-topic-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
  z-index: 120;
}

.jszahz-topic-drawer.open {
  pointer-events: auto;
}

.jszahz-topic-drawer-mask {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(15, 23, 42, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.jszahz-topic-drawer.open .jszahz-topic-drawer-mask {
  opacity: 1;
}

.jszahz-topic-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(var(--jszahz-topic-drawer-width, 960px), min(75vw, calc(100vw - 24px)));
  min-width: min(640px, calc(100vw - 24px));
  max-width: min(75vw, calc(100vw - 24px));
  height: 100%;
  background: #fff;
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.jszahz-topic-drawer.open .jszahz-topic-drawer-panel {
  transform: translateX(0);
}

.jszahz-topic-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fbff;
}

.jszahz-topic-drawer-title {
  font-size: 16px;
  font-weight: 700;
}

.jszahz-topic-drawer-subtitle {
  font-size: 12px;
  color: #64748b;
}

.jszahz-topic-drawer-body {
  position: relative;
  flex: 1;
  min-height: 0;
}

.jszahz-topic-drawer-loading {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(248, 250, 252, 0.94);
  z-index: 2;
}

.jszahz-topic-drawer-loading-card {
  min-width: min(420px, 100%);
  max-width: 520px;
  padding: 20px 22px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
  text-align: center;
}

.jszahz-topic-drawer-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 14px;
  border: 3px solid #dbeafe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: jszahz-topic-spin 0.8s linear infinite;
}

.jszahz-topic-drawer-loading-title {
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
}

.jszahz-topic-drawer-loading-hint {
  margin-top: 8px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
}

.jszahz-topic-drawer iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

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

.jszahz-topic-upload-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.jszahz-topic-upload-overlay.jszahz-topic-hidden {
  display: none;
}

.jszahz-topic-upload-overlay-card {
  min-width: min(380px, 90vw);
  max-width: 480px;
  padding: 28px 32px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
  text-align: center;
}

.jszahz-topic-upload-overlay-title {
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
}

.jszahz-topic-upload-overlay-detail {
  margin-top: 8px;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
  min-height: 22px;
}

@media (max-width: 960px) {
  .jszahz-topic-toolbar {
    align-items: stretch;
  }

  .jszahz-topic-upload,
  .jszahz-topic-upload-stack,
  .jszahz-topic-actions {
    width: 100%;
  }

  .jszahz-topic-upload-group {
    width: 100%;
    box-sizing: border-box;
  }

  .jszahz-topic-drawer-panel {
    width: calc(100vw - 12px);
    min-width: calc(100vw - 12px);
    max-width: calc(100vw - 12px);
  }
}
