/* ==========================================================================
   JPG ke PDF — tool.css
   Hero + antarmuka konverter: dropzone, opsi, antrean file, hasil.
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-8) var(--space-9);
  background:
    radial-gradient(60rem 40rem at 15% -10%, rgba(87, 93, 199, 0.35), transparent 60%),
    radial-gradient(50rem 40rem at 100% 0%, rgba(247, 72, 205, 0.22), transparent 55%),
    var(--slate-900);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000 40%, transparent 100%);
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; text-align: center; max-width: 1080px; margin-inline: auto; }
.hero__copy { max-width: 760px; margin-inline: auto; }
.hero__title {
  font-size: var(--fs-hero);
  line-height: 1.14;
  color: var(--white);
  margin-bottom: var(--space-3);
}
.hero__title .kw { color: #B7BCFF; }
.hero__lead {
  font-size: var(--fs-lead);
  color: var(--text-on-dark);
  max-width: 58ch;
  margin: 0 auto var(--space-4);
}
.hero__trust {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-2);
  color: var(--text-on-dark);
  font-size: 0.88rem;
}
.hero__trust-item { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero__trust-item svg { width: 1.1em; height: 1.1em; color: #67E191; }
.hero__actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }

/* ---------- Kartu konverter ---------- */
.converter {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: var(--space-6) auto 0;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
}
.converter__bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.7rem 1.15rem;
  background: var(--slate-100);
  border-bottom: 1px solid var(--border);
}
.converter__dots { display: inline-flex; gap: 6px; }
.converter__dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--slate-200); }
.converter__dots i:nth-child(1) { background: #F76D6D; }
.converter__dots i:nth-child(2) { background: #F7C948; }
.converter__dots i:nth-child(3) { background: var(--green); }
.converter__bar-title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}
.converter__shield {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-deep);
  background: var(--green-soft);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
}
.converter__shield svg { width: 14px; height: 14px; }

.converter__body { padding: var(--space-6); }

/* Dua kolom: pengaturan di kiri, unggah + pratinjau + aksi di kanan.
   Keduanya meregang sama tinggi lewat align-items: stretch. */
.converter__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: var(--space-5);
  align-items: stretch;
}
.converter__pane { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.converter__pane-title,
.queue-head__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin: 0;
}
.converter__pane-step {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--indigo-soft);
  color: var(--indigo-deep);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ---------- Dropzone (ringkas, tinggi tetap) ---------- */
.dropzone {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px dashed var(--slate-200);
  border-radius: var(--radius-md);
  background: var(--slate-100);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.dropzone:hover { border-color: var(--indigo); background: var(--indigo-soft); }
.dropzone:hover .dropzone__icon { box-shadow: var(--shadow-md); }
.dropzone.is-drag { border-color: var(--indigo); background: var(--indigo-soft); box-shadow: 0 0 0 4px rgba(87, 93, 199, 0.12) inset; }
.dropzone__icon {
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--indigo);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-3);
}
.dropzone__icon svg { width: 24px; height: 24px; }
.dropzone__title { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--navy); margin-bottom: 0.15rem; }
.dropzone__hint { font-size: 0.82rem; color: var(--text-muted); margin-bottom: var(--space-3); }
.dropzone__hint kbd {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1rem 0.4rem;
  color: var(--navy);
}
.dropzone__hint span { margin-inline: 0.15rem; }
.dropzone__btn { margin-bottom: var(--space-4); }
.dropzone__chips {
  display: inline-flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.dropzone__chips li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--slate-500);
  background: var(--white);
  border: 1px solid var(--border);
  padding: 0.22rem 0.55rem;
  border-radius: 5px;
}
.dropzone__chips .is-out {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--green-deep);
  border-color: #B7E7C6;
  background: var(--green-soft);
}
.dropzone__chips .is-out svg { width: 13px; height: 13px; }
.dropzone__drophint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--indigo-deep);
  background: rgba(236, 237, 251, 0.9);
  border-radius: var(--radius-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}
.dropzone.is-drag .dropzone__drophint { opacity: 1; }

/* ---------- Opsi ---------- */
.converter__options {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  flex: 1;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--slate-100);
}
.field { display: flex; flex-direction: column; gap: 0.45rem; flex: 0 0 auto; }
.field + .field { padding-top: var(--space-4); border-top: 1px solid var(--border); }

/* Catatan kecil yang menutup panel pengaturan di bagian bawah */
.field-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}
.field-tip svg { width: 18px; height: 18px; color: var(--indigo); flex-shrink: 0; margin-top: 1px; }
.field-tip p { font-size: 0.78rem; line-height: 1.55; }
.field-tip b { color: var(--navy); font-weight: 600; }
.field__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--navy);
}
.field__label svg { width: 17px; height: 17px; color: var(--indigo); flex-shrink: 0; }
.field__hint { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }

.select-wrap { position: relative; }
.select-wrap select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  padding: 0.65rem 2.4rem 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  text-overflow: ellipsis;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.select-wrap select:hover { border-color: var(--indigo); }
.select-wrap select:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-soft); outline: none; }
.select-wrap__arrow { position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--slate-500); pointer-events: none; }

/* toggle set */
.toggleset { display: flex; flex-direction: column; gap: 0.5rem; }
.togglebtn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  text-align: left;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.togglebtn:hover { border-color: var(--indigo); }
.togglebtn[aria-pressed="true"] { border-color: var(--indigo); background: var(--indigo-soft); }
.togglebtn__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--slate-100); color: var(--indigo); flex-shrink: 0; }
.togglebtn[aria-pressed="true"] .togglebtn__icon { background: var(--indigo); color: var(--white); }
.togglebtn__icon svg { width: 18px; height: 18px; }
.togglebtn__label { display: flex; flex-direction: column; font-weight: 600; font-size: 0.9rem; color: var(--navy); flex: 1; }
.togglebtn__label small { font-weight: 400; font-size: 0.76rem; color: var(--text-muted); }
.togglebtn__state {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--slate-500);
  background: var(--slate-100);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}
.togglebtn[aria-pressed="true"] .togglebtn__state { color: var(--white); background: var(--indigo); }

/* ---------- Ringkasan hasil ---------- */
.converter__summary {
  margin-top: auto;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--indigo-soft);
}
.converter__summary-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--indigo-deep);
  margin-bottom: 0.3rem;
}
.converter__summary-text { font-size: 0.84rem; line-height: 1.6; color: var(--slate-700); }
.converter__summary-text b { color: var(--navy); }

/* ---------- Antrean file (pratinjau di kolom kiri) ---------- */
.converter__queue {
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  min-height: 0;
  gap: var(--space-3);
}
.queue-head { display: flex; align-items: center; gap: var(--space-3); }
.queue-head__count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--indigo-deep);
  background: var(--indigo-soft);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}
.queue-empty {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.4rem;
  min-height: 76px;
  padding: var(--space-4) var(--space-4);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--slate-100);
  color: var(--text-muted);
}
.queue-empty[hidden], .queue-list[hidden], .converter__progress[hidden], .queue-head__count[hidden] { display: none !important; }
.queue-empty svg { width: 26px; height: 26px; color: var(--slate-400); }
.queue-empty p { font-size: 0.8rem; line-height: 1.5; max-width: 38ch; }

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
  min-height: 0;
  max-height: 230px;
  overflow-y: auto;
  padding-right: 4px;
  /* bilah gulir disembunyikan, gulir tetap jalan */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.queue-list::-webkit-scrollbar { width: 0; height: 0; }
.queue-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  flex-shrink: 0;
}
.queue-item__thumb {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--slate-100);
  border: 1px solid var(--border);
}
.queue-item__info { min-width: 0; }
.queue-item__name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-item__meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.queue-item__meta .arrow { color: var(--indigo); margin-inline: 0.35rem; }
.queue-item__status { font-size: 0.78rem; font-weight: 600; }
.queue-item__status.is-done { color: var(--green-deep); }
.queue-item__actions { display: inline-flex; gap: 0.3rem; align-items: center; }
.queue-item__remove {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  color: var(--slate-500);
  border: 1px solid var(--border);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.queue-item__remove:hover { color: var(--error); border-color: var(--error); }
.queue-item__remove svg { width: 18px; height: 18px; }

/* handle drag reorder */
.queue-item__handle { cursor: grab; color: var(--slate-400); display: grid; place-items: center; width: 26px; }
.queue-item__handle svg { width: 18px; height: 18px; }
.queue-item.is-dragging { opacity: 0.5; }

/* ---------- Catatan privasi di kaki kartu ---------- */
.converter__footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--slate-100);
}

/* ---------- Blok aksi (di bawah ringkasan) ---------- */
.converter__run {
  margin-top: 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}
.converter__progress { margin-bottom: var(--space-3); }
.converter__progress-track {
  display: block;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--slate-200);
  overflow: hidden;
}
.converter__progress-track i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--indigo), var(--magenta));
  border-radius: var(--radius-pill);
  transition: width 0.3s var(--ease);
}
.converter__progress-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.4rem; text-align: center; }

.converter__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: stretch; }
.converter__actions #btn-convert { flex: 1 1 220px; }
.converter__actions #btn-clear { flex: 0 0 auto; }
.converter__hint {
  width: 100%;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.converter__hint svg { width: 15px; height: 15px; color: var(--indigo); }

/* toast */
.toast-region {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--slate-900);
  color: var(--white);
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  animation: toast-in 0.3s var(--ease);
}
.toast svg { width: 16px; height: 16px; color: #67E191; }
.toast.is-error svg { color: #FF9B92; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Statistik cepat ---------- */
.quickstats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-7);
  position: relative;
  z-index: 1;
}
.quickstat { text-align: center; color: var(--text-on-dark); display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.quickstat__num { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--white); line-height: 1; }
.quickstat__label { font-size: 0.85rem; }

/* ---------- Spinner tombol ---------- */
.btn__spinner {
  width: 1.05em; height: 1.05em;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
