/* Data Conversion — left conversion / right tabbed input */

.dc-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 28px;
}

.dc-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Right column height follows the left Conversion card */
.dc-panel--input {
  height: 0;
  min-height: 100%;
}

.dc-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.dc-card--conversion {
  height: auto;
}

.dc-card--input {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: 12px;
  overflow: hidden;
}

.dc-card__title {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.dc-formats {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.dc-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.dc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dc-status {
  min-height: 1.35em;
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.dc-status.is-error {
  color: #b91c1c;
}

.dc-status.is-ok {
  color: var(--theme-deep);
}

/* Input split: upload left, paste right */
.dc-input-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

@media (min-width: 720px) {
  .dc-input-split {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

.dc-input-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 10px;
}

.dc-input-col__label {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.dc-input-col .dc-tab-panel {
  flex: 1;
  min-height: 220px;
  display: flex;
}

.dc-input-col .dc-tab-panel[hidden] {
  display: none !important;
}

/* Tabs (legacy single-row, kept for compatibility) */
.dc-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 16px;
  padding: 4px;
  border-radius: 10px;
  background: #f1f5f9;
}

.dc-tabs__btn {
  flex: 1;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.dc-tabs__btn:hover {
  color: var(--text);
}

.dc-tabs__btn.is-active {
  background: #fff;
  color: var(--theme-deep);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.dc-tab-panel {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.dc-tab-panel.is-active {
  display: flex;
}

.dc-tab-panel[hidden] {
  display: none !important;
}

.dc-textarea {
  width: 100%;
  flex: 1;
  min-height: 0;
  height: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  resize: none;
  outline: none;
}

.dc-textarea:focus {
  border-color: var(--theme);
  box-shadow: 0 0 0 3px var(--theme-dim);
}

.dc-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-height: 0;
  height: 100%;
  padding: 20px 16px;
  border: 2px dashed #93c5fd;
  border-radius: 12px;
  background: var(--theme-dim);
  text-align: center;
  cursor: pointer;
  overflow: auto;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.dc-drop.is-dragover {
  border-color: var(--theme);
  background: #dbeafe;
}

.dc-drop__icon {
  position: relative;
  margin-bottom: 6px;
}

.dc-drop__plus {
  position: absolute;
  right: -8px;
  bottom: -4px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--theme);
  color: #fff;
  border: 3px solid var(--theme-dim);
}

.dc-drop__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.dc-drop__or {
  font-size: 0.85rem;
  color: var(--muted);
}

.dc-upload-btn {
  pointer-events: auto;
  min-height: 40px;
  margin-top: 2px;
}

.dc-drop__hint {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.dc-file-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  width: 100%;
  text-align: left;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.dc-file-list li {
  padding: 4px 0;
  border-bottom: 1px solid rgba(37, 99, 235, 0.12);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Popular links — single line, no wrap */
.dc-links.ic-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.dc-links .ic-seo-link {
  display: block;
  padding: 12px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--theme);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s ease;
}

.dc-links .ic-seo-link:hover {
  background: var(--theme);
  color: #fff;
  border-color: var(--theme);
}

@media (max-width: 900px) {
  .dc-layout {
    grid-template-columns: 1fr;
  }

  .dc-panel--input {
    height: auto;
    min-height: 0;
  }

  .dc-card--input {
    height: auto;
  }

  .dc-textarea,
  .dc-drop {
    min-height: 220px;
    height: auto;
  }
}
