/* EDIX PDF to Image Plugin Styles — v1.0.0 */
/* All classes prefixed with .epti- to avoid conflicts with themes */

.edix-pti-wrap {
  --epti-bg-deep:    #0b1520;
  --epti-bg-panel:   #111d2e;
  --epti-bg-card:    #162030;
  --epti-bg-hover:   #1c2d42;
  --epti-border:     #1e3048;
  --epti-border-hl:  #2a4a6e;
  --epti-accent:     #FF6B2B;
  --epti-accent-dim: #c4521e;
  --epti-text:       #e8edf3;
  --epti-text-muted: #7a9ab8;
  --epti-text-dim:   #4a6a8a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--epti-bg-deep);
  color: var(--epti-text);
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  box-sizing: border-box;
}

.edix-pti-wrap *, .edix-pti-wrap *::before, .edix-pti-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* TOP BAR */
.epti-topbar {
  background: var(--epti-bg-panel);
  border-bottom: 1px solid var(--epti-border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 48px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.epti-logo { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; letter-spacing: -0.3px; }
.epti-logo span:first-child { color: var(--epti-accent); }
.epti-logo span:last-child  { color: var(--epti-text); }
.epti-logo-sep { color: var(--epti-text-dim); font-weight: 300; font-size: 18px; margin: 0 2px; }
.epti-tool-label { color: var(--epti-text-muted); font-size: 13px; }
.epti-topbar-right { margin-left: auto; }
.epti-btn-dl-top {
  background: var(--epti-accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .15s;
  text-decoration: none;
}
.epti-btn-dl-top:hover { background: var(--epti-accent-dim); color: #fff; }
.epti-btn-dl-top:disabled { opacity: .4; cursor: default; }

/* MAIN LAYOUT */
.epti-main { display: flex; flex: 1; min-height: 0; }

/* SIDEBAR */
.epti-sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--epti-bg-panel);
  border-right: 1px solid var(--epti-border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 20px;
  overflow-y: auto;
}
.epti-sidebar-section { display: flex; flex-direction: column; gap: 8px; }
.epti-sidebar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--epti-text-dim);
  padding: 0 4px;
}
.epti-option-group { display: flex; flex-direction: column; gap: 4px; }
.epti-opt-btn {
  background: transparent;
  border: 1px solid var(--epti-border);
  border-radius: 6px;
  color: var(--epti-text-muted);
  font-size: 13px;
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
  transition: all .12s;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.epti-opt-btn:hover { background: var(--epti-bg-hover); border-color: var(--epti-border-hl); color: var(--epti-text); }
.epti-opt-btn.active { background: rgba(255,107,43,.12); border-color: var(--epti-accent); color: var(--epti-accent); font-weight: 600; }
.epti-fmt-hint { margin-left: auto; font-size: 10px; color: var(--epti-text-dim); }

.epti-dpi-row { display: flex; flex-direction: column; gap: 6px; }
.epti-dpi-label-row { display: flex; justify-content: space-between; align-items: center; }
.epti-dpi-label-row span:first-child { font-size: 12px; color: var(--epti-text-muted); }
.epti-dpi-val { font-size: 13px; font-weight: 700; color: var(--epti-accent); }
.epti-dpi-range-labels { display: flex; justify-content: space-between; }
.epti-dpi-range-labels span { font-size: 10px; color: var(--epti-text-dim); }

.edix-pti-wrap input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--epti-border);
  border-radius: 2px;
  outline: none;
}
.edix-pti-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--epti-accent);
  cursor: pointer;
}

.epti-quality-row { display: flex; flex-direction: column; gap: 6px; }
.epti-quality-label-row { display: flex; justify-content: space-between; }
.epti-quality-label-row span { font-size: 12px; color: var(--epti-text-muted); }

.epti-select {
  background: var(--epti-bg-card);
  border: 1px solid var(--epti-border);
  border-radius: 6px;
  color: var(--epti-text);
  font-size: 13px;
  padding: 8px 10px;
  width: 100%;
  outline: none;
  cursor: pointer;
}
.epti-select:focus { border-color: var(--epti-accent); }

/* CONTENT */
.epti-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* DROP ZONE */
.epti-drop-zone {
  border: 2px dashed var(--epti-border-hl);
  border-radius: 12px;
  background: var(--epti-bg-card);
  padding: 52px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all .18s;
  text-align: center;
}
.epti-drop-zone:hover, .epti-drop-zone.epti-drag-over {
  border-color: var(--epti-accent);
  background: rgba(255,107,43,.06);
}
.epti-drop-icon { width: 52px; height: 52px; opacity: .55; }
.epti-drop-title { font-size: 16px; font-weight: 600; color: var(--epti-text); }
.epti-drop-sub   { font-size: 13px; color: var(--epti-text-muted); }
.epti-drop-privacy { font-size: 11px; color: var(--epti-text-dim); display: flex; align-items: center; gap: 5px; margin-top: 4px; }

.epti-btn-browse {
  background: var(--epti-accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: background .15s;
}
.epti-btn-browse:hover { background: var(--epti-accent-dim); color: #fff; }

/* STATS BAR */
.epti-stats-bar {
  display: none;
  background: var(--epti-bg-card);
  border: 1px solid var(--epti-border);
  border-radius: 8px;
  padding: 12px 18px;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.epti-stats-bar.epti-visible { display: flex; }
.epti-stat-item { display: flex; flex-direction: column; gap: 2px; }
.epti-stat-key  { font-size: 10px; color: var(--epti-text-dim); text-transform: uppercase; letter-spacing: .8px; }
.epti-stat-val  { font-size: 14px; font-weight: 700; color: var(--epti-text); }
.epti-stat-val.epti-accent { color: var(--epti-accent); }
.epti-stat-range { margin-left: auto; }
.epti-page-range-input {
  background: var(--epti-bg-panel);
  border: 1px solid var(--epti-border);
  border-radius: 6px;
  color: var(--epti-text);
  font-size: 13px;
  padding: 6px 10px;
  width: 130px;
  outline: none;
}
.epti-page-range-input:focus { border-color: var(--epti-accent); }
.epti-page-range-hint { font-size: 11px; color: var(--epti-text-dim); }

/* PROGRESS */
.epti-progress-wrap { display: none; flex-direction: column; gap: 8px; }
.epti-progress-wrap.epti-visible { display: flex; }
.epti-progress-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--epti-text-muted); }
.epti-progress-bar-bg { height: 6px; background: var(--epti-border); border-radius: 3px; overflow: hidden; }
.epti-progress-bar-fill { height: 100%; background: var(--epti-accent); border-radius: 3px; width: 0%; transition: width .2s; }

/* ACTION ROW */
.epti-action-row { display: none; gap: 10px; align-items: center; }
.epti-action-row.epti-visible { display: flex; }
.epti-btn-convert {
  background: var(--epti-accent);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 11px 28px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .15s;
}
.epti-btn-convert:hover { background: var(--epti-accent-dim); color: #fff; }
.epti-btn-convert:disabled { opacity: .5; cursor: default; }
.epti-btn-secondary {
  background: transparent;
  border: 1px solid var(--epti-border-hl);
  color: var(--epti-text-muted);
  border-radius: 7px;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.epti-btn-secondary:hover { border-color: var(--epti-text-muted); color: var(--epti-text); }

/* PREVIEW */
.epti-preview-header { display: none; align-items: center; justify-content: space-between; gap: 12px; }
.epti-preview-header.epti-visible { display: flex; }
.epti-preview-title { font-size: 14px; font-weight: 700; color: var(--epti-text); }
.epti-preview-count { font-size: 12px; color: var(--epti-text-muted); }
.epti-btn-dl-all {
  background: rgba(255,107,43,.15);
  border: 1px solid var(--epti-accent);
  color: var(--epti-accent);
  border-radius: 7px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: all .15s;
}
.epti-btn-dl-all:hover { background: rgba(255,107,43,.25); color: var(--epti-accent); }

.epti-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.epti-page-card {
  background: var(--epti-bg-card);
  border: 1px solid var(--epti-border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.epti-page-card:hover { border-color: var(--epti-border-hl); transform: translateY(-2px); }
.epti-page-card img { width: 100%; display: block; background: #fff; }
.epti-page-card-footer {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--epti-border);
}
.epti-page-num { font-size: 12px; color: var(--epti-text-muted); font-weight: 600; }
.epti-btn-dl-page {
  background: transparent;
  border: 1px solid var(--epti-border-hl);
  color: var(--epti-text-muted);
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
}
.epti-btn-dl-page:hover { border-color: var(--epti-accent); color: var(--epti-accent); }

/* STATUS BAR */
.epti-statusbar {
  background: var(--epti-bg-panel);
  border-top: 1px solid var(--epti-border);
  padding: 6px 20px;
  font-size: 12px;
  color: var(--epti-text-dim);
  display: flex;
  gap: 20px;
}

/* MOBILE CONTROLS */
.epti-mobile-controls {
  display: none;
  background: var(--epti-bg-panel);
  border-bottom: 1px solid var(--epti-border);
  padding: 14px 16px;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.epti-mobile-ctrl-group { display: flex; flex-direction: column; gap: 5px; min-width: 120px; flex: 1; }
.epti-mobile-ctrl-label { font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--epti-text-dim); }
.epti-fmt-pills { display: flex; gap: 6px; }
.epti-fmt-pill {
  background: var(--epti-bg-card);
  border: 1px solid var(--epti-border);
  border-radius: 20px;
  color: var(--epti-text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  transition: all .12s;
}
.epti-fmt-pill.active { background: rgba(255,107,43,.15); border-color: var(--epti-accent); color: var(--epti-accent); }

/* RESPONSIVE */
@media (max-width: 700px) {
  .epti-sidebar     { display: none; }
  .epti-tool-label  { display: none; }
  .epti-mobile-controls { display: flex; }
  .epti-statusbar   { display: none; }

  .epti-topbar { padding: 0 14px; height: 44px; gap: 10px; }
  .epti-logo   { font-size: 14px; }
  .epti-btn-dl-top { padding: 6px 12px; font-size: 12px; }

  .epti-main    { flex-direction: column; }
  .epti-content { padding: 14px; gap: 16px; }

  .epti-drop-zone  { padding: 32px 16px; gap: 12px; }
  .epti-drop-title { font-size: 14px; }
  .epti-drop-sub   { font-size: 12px; }
  .epti-btn-browse { padding: 9px 20px; font-size: 13px; }

  .epti-stats-bar { gap: 12px; padding: 12px; }
  .epti-stat-range { margin-left: 0; width: 100%; }
  .epti-page-range-input { width: 100%; }

  .epti-action-row  { flex-wrap: wrap; }
  .epti-btn-convert { flex: 1; justify-content: center; font-size: 13px; padding: 11px 16px; }
  .epti-btn-secondary { font-size: 13px; padding: 11px 14px; }

  .epti-preview-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .epti-page-card-footer { padding: 8px 10px; }
  .epti-preview-header { flex-wrap: wrap; gap: 8px; }
  .epti-btn-dl-all { font-size: 12px; padding: 7px 14px; }

  .edix-pti-wrap input[type=range] { height: 5px; }
  .edix-pti-wrap input[type=range]::-webkit-slider-thumb { width: 18px; height: 18px; }
}

@media (max-width: 380px) {
  .epti-preview-grid { grid-template-columns: 1fr; }
  .epti-fmt-pills    { flex-wrap: wrap; }
}
