/* ===== Bitcut Free Tools — section styles (dark theme, reuses /style.css tokens) ===== */

.tool-main { padding-top: 96px; min-height: 60vh; }

/* ---------- Hero ---------- */
.tool-hero { padding: 48px 0 24px; }
.tool-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 16px; }
.tool-hero .section-sub { max-width: 720px; }
.tool-breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }
.tool-breadcrumb a { color: var(--text-dim); }
.tool-breadcrumb a:hover { color: var(--text); }

/* ---------- The tool widget ---------- */
.tool-widget {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 28px;
  margin: 28px 0 12px;
}
.tool-row { display: flex; gap: 12px; flex-wrap: wrap; }
.tool-input {
  flex: 1 1 320px;
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  padding: 16px 18px;
  font-family: inherit;
}
.tool-input:focus { outline: none; border-color: var(--accent); }
.tool-input::placeholder { color: var(--text-muted); }

.tool-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  color: #fff; font-weight: 700; font-size: 1rem;
  border: none; border-radius: var(--radius-sm);
  padding: 16px 28px; cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
.tool-btn:hover { transform: translateY(-1px); }
.tool-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.tool-btn-ghost {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}

.tool-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 12px; }

/* ---------- Textarea / select (text-only generators) ---------- */
.tool-textarea { width: 100%; resize: vertical; min-height: 88px; line-height: 1.5; }
.tool-select { flex: 0 1 220px; cursor: pointer; appearance: none; }
.tool-select option { background: var(--bg); color: var(--text); }

/* ---------- Dropzone (file tools) ---------- */
.tool-drop {
  border: 2px dashed rgba(255,255,255,0.18);
  border-radius: var(--radius-sm);
  padding: 44px 24px; text-align: center; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.tool-drop:hover, .tool-drop.dragover { border-color: var(--accent); background: rgba(108,92,231,0.06); }
.tool-drop svg { margin: 0 auto 12px; color: var(--text-dim); }

/* ---------- Status / progress ---------- */
.tool-status { margin-top: 18px; font-size: 0.95rem; color: var(--text-dim); display: none; }
.tool-status.active { display: block; }
.tool-bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 100px; overflow: hidden; margin-top: 10px; }
.tool-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-end)); transition: width .4s ease; }
.tool-error { color: var(--hot-start); margin-top: 14px; display: none; }
.tool-error.active { display: block; }
.spinner { display:inline-block; width:14px; height:14px; border:2px solid rgba(255,255,255,.25); border-top-color:#fff; border-radius:50%; animation: spin .7s linear infinite; vertical-align:-2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Results: transcript ---------- */
.tool-results { margin-top: 24px; display: none; }
.tool-results.active { display: block; }
.transcript-box {
  background: var(--bg); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm); padding: 20px; max-height: 460px; overflow-y: auto;
  font-size: 0.95rem; line-height: 1.75; white-space: pre-wrap;
}
.transcript-line { display: flex; gap: 14px; padding: 3px 0; }
.transcript-line .ts { color: var(--blue); font-variant-numeric: tabular-nums; flex-shrink: 0; cursor: pointer; }
.tool-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Results: shorts (range player) ---------- */
.rp-stage { position: relative; aspect-ratio: 16/9; max-width: 760px; margin: 0 auto 24px; background: #000; border-radius: var(--radius-sm); overflow: hidden; }
.rp-stage > div, .rp-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.shorts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 8px; }
.short-card {
  background: var(--surface); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm); overflow: hidden; display: flex; flex-direction: column;
}
.short-card .short-frame { position: relative; aspect-ratio: 16/9; background: #000; }
.short-card .short-frame iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
.short-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.short-hook { font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.short-meta { font-size: 0.8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.short-play {
  margin-top: auto; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.85rem; font-weight: 600; color: var(--accent-end);
  background: rgba(108,92,231,0.1); border: 1px solid rgba(108,92,231,0.25);
  border-radius: 100px; padding: 6px 14px; cursor: pointer;
}

/* ---------- Results: article / summary (markdown) ---------- */
.article-box {
  background: var(--bg); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm); padding: 28px; max-height: 620px; overflow-y: auto;
  line-height: 1.75; font-size: 1rem;
}
.article-box h2, .article-box h3, .article-box h4 { margin: 22px 0 10px; line-height: 1.3; }
.article-box .article-title { margin-top: 0; font-size: 1.5rem; }
.article-box h3 { font-size: 1.2rem; }
.article-box p { margin: 0 0 14px; color: var(--text-dim); }
.article-box ul { margin: 0 0 14px; padding-left: 22px; color: var(--text-dim); }
.article-box li { margin: 4px 0; }
.article-box .summary-tldr { font-size: 1.08rem; color: var(--text); font-weight: 500; }

/* ---------- Results: item list (hooks / hashtags / captions) ---------- */
.items-box { display: flex; flex-direction: column; gap: 10px; }
.item-row {
  display: flex; gap: 12px; align-items: flex-start; justify-content: space-between;
  background: var(--bg); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm); padding: 14px 16px;
}
.item-text { line-height: 1.55; white-space: pre-wrap; }
.item-copy {
  flex-shrink: 0; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-dim); border-radius: var(--radius-sm); padding: 6px 10px; cursor: pointer;
}
.item-copy:hover { color: var(--text); border-color: var(--accent); }

/* ---------- Upsell CTA ---------- */
.tool-upsell {
  margin: 32px 0; padding: 28px;
  background: linear-gradient(135deg, rgba(108,92,231,0.12), rgba(168,85,247,0.10));
  border: 1px solid rgba(108,92,231,0.25); border-radius: var(--radius);
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap; justify-content: space-between;
}
.tool-upsell h3 { margin: 0 0 4px; }
.tool-upsell p { color: var(--text-dim); margin: 0; max-width: 540px; }
.tool-upsell .tool-btn { white-space: nowrap; }

/* ---------- How it works ---------- */
.tool-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 24px; }
.tool-step { background: var(--surface); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius-sm); padding: 22px; }
.tool-step .num { font-size: 0.85rem; font-weight: 800; color: var(--accent-end); margin-bottom: 10px; }

/* ---------- FAQ ---------- */
.tool-faq { margin-top: 40px; }
.tool-faq details { border-bottom: 1px solid rgba(255,255,255,0.08); padding: 18px 0; }
.tool-faq summary { font-weight: 600; cursor: pointer; list-style: none; font-size: 1.05rem; }
.tool-faq summary::-webkit-details-marker { display: none; }
.tool-faq .faq-answer { color: var(--text-dim); margin-top: 12px; line-height: 1.7; }

/* ---------- Hub (tools index) ---------- */
.tools-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 32px 0; }
.tool-tile {
  display: block; background: var(--surface); border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius); padding: 26px; transition: border-color .15s ease, transform .15s ease;
}
.tool-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tool-tile .tile-icon { color: var(--accent-end); margin-bottom: 14px; }
.tool-tile h3 { margin-bottom: 8px; }
.tool-tile p { color: var(--text-dim); font-size: 0.92rem; line-height: 1.6; }
.tool-tile .soon { font-size: 0.7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }

.tools-section-title { margin: 40px 0 4px; font-size: 1.4rem; }

@media (max-width: 600px) {
  .tool-widget { padding: 18px; }
  .tool-upsell { padding: 20px; }
}
