/* ============================================================
   PDF to Image — controls.css
   Step 2: output settings — image format, quality, and the two
   "Advanced" toggles (extract specific pages / rename files).
   ============================================================ */


/* ══════════════════════════════════════════
   1. CONTROLS WRAPPER
   ══════════════════════════════════════════ */
.ip-pdf2img-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 26px 0 4px;
  padding-top: 20px;
  border-top: 1.5px solid var(--ip-line);
}

.ip-pdf2img-controls__row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ip-pdf2img-controls__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ip-ink);
}

.ip-pdf2img-controls__hint {
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ip-ink-soft);
}

/* Toggle rows (extract pages / rename) sit label-left, switch-right */
.ip-pdf2img-controls__row--toggle {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

/* Small pill next to a label, flags a control as an advanced feature —
   sets expectations before the user opens it, rather than surprising
   them with a text-input box appearing out of nowhere. */
.ip-pdf2img-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 9999px;
  background: var(--ip-brand-soft);
  color: var(--ip-brand-dark);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}


/* ══════════════════════════════════════════
   2. SEGMENTED CONTROLS (shared look)
   Format / Quality both use the same pill-segmented pattern.
   ══════════════════════════════════════════ */
.ip-pdf2img-format,
.ip-pdf2img-quality {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.ip-pdf2img-quality {
  grid-template-columns: repeat(4, 1fr);
}

.ip-pdf2img-format__btn,
.ip-pdf2img-quality__btn {
  height: 40px;
  padding: 0 10px;
  border-radius: 9999px;
  border: 1.5px solid var(--ip-line);
  background: #fff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ip-ink-soft);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.ip-pdf2img-format__btn.is-active,
.ip-pdf2img-quality__btn.is-active {
  border-color: var(--ip-brand);
  color: var(--ip-brand-dark);
  background: var(--ip-brand-soft);
}


/* ══════════════════════════════════════════
   3. GENERIC OPTION BOX
   Shared shell for the "extract specific pages" / "rename files"
   panels — same footprint/animation as the sibling tool's
   watermark/password/compress boxes.
   ══════════════════════════════════════════ */
.ip-pdf2img-optionbox {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: -6px;
  padding: 14px;
  border-radius: 14px;
  background: var(--ip-bg);
  animation: ipCardIn 0.2s ease both;
}

.ip-pdf2img-optionbox[hidden] {
  display: none;
}

.ip-pdf2img-optionbox input[type="text"] {
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid var(--ip-line);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ip-ink);
  width: 100%;
}

/* Faded placeholder guide text — e.g. "1,2,3,6-8,10,12" — so the
   expected format is obvious without a separate instruction line
   cluttering the box before the user has typed anything. */
.ip-pdf2img-optionbox input[type="text"]::placeholder {
  color: #b3b3bd;
  font-weight: 500;
}

.ip-pdf2img-optionbox input:focus-visible {
  outline: none;
  border-color: var(--ip-brand);
  box-shadow: 0 0 0 4px var(--ip-brand-soft);
}

.ip-pdf2img-optionbox input.is-error {
  border-color: var(--ip-error);
}

.ip-pdf2img-optionbox input.is-error:focus-visible {
  box-shadow: 0 0 0 4px var(--ip-error-soft);
}

.ip-pdf2img-optionbox__hint {
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ip-ink-soft);
}

.ip-pdf2img-optionbox__hint.is-error {
  color: var(--ip-error);
}


/* ══════════════════════════════════════════
   4. DESKTOP ENHANCEMENTS (≥768px)
   ══════════════════════════════════════════ */
@media (min-width: 768px) {
  .ip-pdf2img-format__btn:hover,
  .ip-pdf2img-quality__btn:hover {
    border-color: var(--ip-brand);
    color: var(--ip-brand);
  }

  .ip-pdf2img-controls {
    gap: 22px;
  }
}
