/* ============================================================
   FreeFastPDF — tools.css
   Styles specific to the tools view (sidebar layout pages).
   Supplements main.css and responsive.css.
   ============================================================ */

/* ── TOOL PANEL HEADER ── */
.tp-hdr {
  display: flex; align-items: center; gap: 13px;
  margin-bottom: 20px; padding-bottom: 18px;
  border-bottom: 1px solid var(--bd1);
}
.tp-ico {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.tp-title { font-size: 18px; font-weight: 800; color: var(--t1); margin-bottom: 2px; }
.tp-sub   { font-size: 13px; color: var(--t2); }

/* ── TWO-COLUMN LAYOUT ── */
.tp-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
  align-items: start;
}

/* ── SETTINGS CARD ── */
.scard {
  background: var(--c1); border: 1px solid var(--bd1);
  border-radius: var(--r); padding: 16px 18px;
  margin-bottom: 10px;
}
.scard + .scard { margin-top: 0; }
.sc-lbl {
  font-size: 10.5px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--t3); margin-bottom: 8px;
}

/* ── QUALITY GRID ── */
.qg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.qb {
  background: var(--c1); border: 1px solid var(--bd1);
  border-radius: 8px; padding: 7px 3px; text-align: center;
  cursor: pointer; transition: all .15s; min-height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.qb:hover, .qb.active {
  background: rgba(59,130,246,.12); border-color: var(--blue);
}
.qn { font-size: 12.5px; font-weight: 700; color: var(--t1); display: block; }
.qb span:last-child { font-size: 9.5px; color: var(--t3); }
.qb.active .qn { color: var(--blue); }

/* ── FORMAT ROW ── */
.fmt-row { display: flex; gap: 6px; flex-wrap: wrap; }
.fb {
  flex: 1; min-width: 50px; padding: 8px 5px;
  background: var(--c1); border: 1px solid var(--bd1);
  border-radius: 8px; font-size: 12.5px; font-weight: 600;
  color: var(--t2); cursor: pointer; transition: all .15s;
  text-align: center; min-height: 38px;
}
.fb:hover, .fb.active {
  background: rgba(59,130,246,.12); border-color: var(--blue); color: var(--blue);
}

/* ── COMPRESSION LEVEL BUTTONS ── */
.pq-row { display: flex; flex-direction: column; gap: 6px; }
.pqb {
  padding: 11px 14px; background: var(--c1); border: 1px solid var(--bd1);
  border-radius: 9px; text-align: left; cursor: pointer; transition: all .15s; min-height: 52px;
}
.pqb:hover, .pqb.active {
  background: rgba(59,130,246,.1); border-color: var(--blue);
}
.pqb-t { font-size: 13px; font-weight: 700; color: var(--t1); }
.pqb-s { font-size: 11px; color: var(--t3); margin-top: 2px; }

/* ── ACTION BUTTON ── */
.action-btn {
  width: 100%; padding: 13px 18px;
  background: var(--grad); border: none; border-radius: 11px;
  color: #fff; font-size: 14.5px; font-weight: 700;
  cursor: pointer; margin-top: 12px; min-height: 50px;
  transition: opacity .18s; letter-spacing: .1px;
  -webkit-tap-highlight-color: transparent;
}
.action-btn:disabled { opacity: .42; cursor: not-allowed; }
.action-btn:hover:not(:disabled) { opacity: .9; }
.action-btn:active:not(:disabled) { transform: scale(.99); }

/* ── SIZE BUTTONS ── */
.sz-btns { display: flex; gap: 5px; }
.sz-btn {
  padding: 6px 11px; background: var(--c1); border: 1px solid var(--bd1);
  border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--t2);
  cursor: pointer; transition: all .15s; min-height: 36px;
}
.sz-btn:hover, .sz-btn.active {
  background: rgba(59,130,246,.1); border-color: var(--blue); color: var(--blue);
}

/* ── SIGN TOOL ── */
.sign-canvas-wrap {
  position: relative; border: 1px solid rgba(255,255,255,.1);
  border-radius: 11px; overflow: hidden; background: #111827;
}
.sign-pdf-canvas  { display: block; width: 100%; }
.sign-draw-canvas {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  cursor: crosshair; touch-action: none;
}
.sign-standalone {
  border: 1.5px dashed rgba(255,255,255,.18); border-radius: 11px;
  overflow: hidden; background: rgba(255,255,255,.02);
  touch-action: none;
}
.sig-col {
  width: 26px; height: 26px; border-radius: 50%;
  cursor: pointer; border: 2.5px solid transparent;
  flex-shrink: 0; transition: transform .12s;
}
.sig-col:hover { transform: scale(1.15); }
.sig-col.active { border-color: var(--blue); }
.sign-nav {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 11px; flex-wrap: wrap;
}
.stb {
  padding: 7px 13px; background: rgba(255,255,255,.06);
  border: 1px solid var(--bd1); border-radius: 8px;
  color: var(--t2); font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: all .15s; min-height: 38px;
}
.stb:hover { background: var(--c2); color: var(--t1); }
.stb:disabled { opacity: .35; cursor: not-allowed; }
.sign-dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 12px; }
.dl-pdf-btn {
  padding: 12px; background: var(--grad); border: none;
  border-radius: 10px; color: #fff; font-size: 13.5px; font-weight: 700;
  cursor: pointer; min-height: 48px; transition: opacity .18s;
}
.dl-pdf-btn:disabled { opacity: .38; cursor: not-allowed; }
.dl-png-btn {
  padding: 12px; background: var(--c2); border: 1px solid var(--bd2);
  border-radius: 10px; color: var(--t1); font-size: 13.5px; font-weight: 700;
  cursor: pointer; min-height: 48px;
}

/* ── HOME PANEL ── */
.tools-hero-banner {
  background: linear-gradient(135deg, rgba(8,14,42,.97), rgba(13,20,54,.97));
  border: 1px solid rgba(255,255,255,.07); border-radius: 18px;
  padding: 24px 28px; margin-bottom: 18px;
}
.thb-label { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #60A5FA; margin-bottom: 6px; }
.thb-title { font-size: clamp(18px, 2.5vw, 28px); font-weight: 900; color: #fff; letter-spacing: -.6px; line-height: 1.14; margin-bottom: 8px; }
.thb-title span { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.thb-sub { font-size: 13.5px; color: rgba(255,255,255,.5); max-width: 460px; line-height: 1.6; margin-bottom: 14px; }
.thb-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.thb-chip { font-size: 11.5px; font-weight: 500; padding: 5px 12px; border-radius: 20px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.11); color: rgba(255,255,255,.6); }

.home-sec-title { font-size: 11px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase; color: var(--t3); margin: 16px 0 8px; }
.home-tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.home-tcard {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 11px; padding: 13px 14px; cursor: pointer; transition: all .18s;
  display: flex; align-items: center; gap: 11px;
  width: 100%; font-family: inherit; text-align: left; color: inherit;
  min-height: 58px; -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}
.home-tcard:hover {
  background: rgba(255,255,255,.08); transform: translateX(2px);
  border-color: rgba(59,130,246,.28);
}
.htc-ico { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 17px; }
.htc-name { font-size: 13px; font-weight: 700; color: var(--t1); line-height: 1.3; }
.htc-desc { font-size: 11px; color: var(--t3); line-height: 1.35; }

/* ── ORGANISE DRAG LIST ── */
.org-item {
  background: rgba(255,255,255,.07); border: 1.5px solid var(--bd1);
  border-radius: 9px; padding: 10px 15px;
  font-size: 13px; font-weight: 600;
  cursor: grab; display: flex; align-items: center; gap: 9px;
  user-select: none; touch-action: none; min-height: 44px;
  transition: background .12s, box-shadow .12s;
}
.org-item:hover { background: rgba(255,255,255,.11); }
.org-item.dragging { opacity: .5; cursor: grabbing; }
.org-item.drag-over { box-shadow: 0 0 0 2px var(--blue); }

/* ── TOOLS RESPONSIVE ── */
@media (max-width: 900px) {
  .tp-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .tp-title  { font-size: 16px; }
  .tp-sub    { font-size: 12.5px; }
  .tp-ico    { width: 40px; height: 40px; font-size: 19px; }
  .sign-dl-grid { grid-template-columns: 1fr; }
  .qg { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 480px) {
  .content { padding: 14px; }
  .tp-hdr  { gap: 10px; margin-bottom: 14px; padding-bottom: 14px; }
  .tools-hero-banner { padding: 16px 18px; border-radius: 13px; }
  .scard { padding: 13px 14px; }
  .sign-nav { gap: 6px; }
  .stb { padding: 6px 10px; font-size: 12px; }
}
