/* =========================================================
   /xtc/ — complemento do /style.css do site (terracota + cimento).
   Motor e app.js: bigbag/epub-to-xtc-converter (MIT). Aqui só fica o que a
   folha principal não tem; nomes de classe em inglês são os que o app.js cria.
   ========================================================= */

.oculto { display: none; }

/* topbar: aqui as abas são links entre páginas */
.tab-link.is-active {
  background: var(--terracota);
  color: #fff;
}

#fileInput,
#customFontInput { display: none; }

/* ---------- livros ---------- */
.book-info {
  padding: 10px 12px;
  margin-bottom: 12px;
  border-left: 3px solid var(--terracota);
  border-radius: var(--raio-sm);
  background: var(--cimento-850);
}
.book-info .title {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--cimento-100);
  overflow-wrap: anywhere;
}
.book-info .author {
  font-size: 12px;
  color: var(--cimento-400);
  margin-top: 2px;
}

.dropzone { cursor: pointer; }
.dropzone.drag-over {
  border-color: var(--terracota);
  background: rgba(192, 96, 58, 0.08);
}

.file-list:not(:empty) { margin-top: 12px; display: grid; gap: 5px; }
.file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--cimento-700);
  border-radius: var(--raio-sm);
  background: var(--cimento-850);
  font-size: 12.5px;
  color: var(--cimento-300);
  cursor: pointer;
}
.file-item:hover { border-color: var(--cimento-600); color: var(--cimento-100); }
.file-item.active { border-color: var(--terracota); color: var(--cimento-100); }
.file-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .remove {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cimento-400);
  font: inherit;
  font-size: 15px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 5px;
  cursor: pointer;
}
.file-item .remove:hover { color: #fff; background: var(--erro); }

/* ---------- aparelho ---------- */
.orientation-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.orientation-buttons button {
  appearance: none;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 0;
  border: 1px solid var(--cimento-600);
  border-radius: var(--raio-sm);
  background: var(--cimento-850);
  color: var(--cimento-300);
  cursor: pointer;
}
.orientation-buttons button:hover { color: var(--cimento-100); }
.orientation-buttons button.active {
  border-color: var(--terracota);
  background: rgba(192, 96, 58, 0.16);
  color: var(--terracota-claro);
}

.slider-row { display: flex; align-items: center; gap: 8px; }
.slider-row input[type="range"] { flex: 1; min-width: 0; }
.slider-row input[type="number"] {
  width: 66px;
  flex: none;
  padding: 5px 7px;
  font: inherit;
  font-size: 12.5px;
  color: var(--cimento-100);
  background: var(--cimento-850);
  border: 1px solid var(--cimento-600);
  border-radius: var(--raio-sm);
}
#customDimensions .slider-row input[type="number"] { flex: 1; width: auto; }
.vezes { color: var(--cimento-400); }

/* ---------- capítulos ---------- */
.chapter-list { max-height: 260px; overflow-y: auto; display: grid; gap: 2px; }
.chapter-item {
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--cimento-300);
  cursor: pointer;
  overflow-wrap: anywhere;
}
.chapter-item:hover { background: var(--cimento-800); color: var(--cimento-100); }
.chapter-item.active { background: rgba(192, 96, 58, 0.16); color: var(--terracota-claro); }

/* ---------- prévia ---------- */
.device-bezel--xtc {
  width: auto;
  aspect-ratio: auto;
  background: #fff;
}
#previewCanvas {
  display: block;
  width: auto;
  height: auto;
  max-width: min(78vw, 360px);
  max-height: min(66vh, 600px);
  background: #fff;
}

.pager { display: flex; align-items: center; gap: 10px; }
.pager .spec-pill { margin: 0; min-width: 130px; text-align: center; }

.view-xtc .stage-actions { flex-wrap: wrap; justify-content: center; }

.progress-container { width: min(100%, 420px); }
.progress-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--cimento-800);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--terracota);
  transition: width 0.2s;
}
.progress-text {
  margin-top: 6px;
  font-size: 12px;
  text-align: center;
  color: var(--cimento-300);
}

/* ---------- abas de ajuste (o app.js liga/desliga a classe "active") ---------- */
.tabs .tab-sub.active {
  color: var(--terracota-claro);
  border-bottom-color: var(--terracota);
}
.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-content .check { margin-bottom: 9px; }

.grupo-rotulo {
  margin: 12px 0 7px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--cimento-400);
}
.field-hint--topo { margin: 0 0 12px; }

.creditos {
  margin: 0;
  font-size: 11px;
  text-align: center;
  color: var(--cimento-400);
}
.creditos a { color: var(--terracota-claro); }
