/* Image compressor: only what the shared tools.css does not cover */

/* ---------- Drop zone ---------- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 1.75rem 1rem;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.dropzone:focus-within,
.dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

@media (hover: hover) {
  .dropzone:hover {
    border-color: var(--accent);
  }
}

.dropzone-icon {
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.25rem;
  fill: none;
  stroke: var(--accent-text);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Settings ---------- */
.settings-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .settings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

.range-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.range-label output {
  color: var(--accent-text);
  font-weight: 800;
}

.range {
  display: block;
  width: 100%;
  min-height: 2rem;
  accent-color: var(--accent);
  cursor: pointer;
}

.range:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- Actions ---------- */
.actions-bar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.actions-summary {
  font-size: 0.875rem;
}

/* Keep the main actions reachable while scrolling a long list on a phone */
@media (max-width: 640px) {
  .actions-bar {
    position: sticky;
    bottom: calc(0.5rem + env(safe-area-inset-bottom));
    z-index: 5;
    box-shadow: var(--shadow);
  }
}

/* ---------- Results ---------- */
.thumb-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
}

.thumb {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
}

.thumb-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
}

.thumb-name {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thumb-sizes {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8125rem;
  text-align: start;
}

.thumb-sizes.is-bigger {
  color: var(--warning);
}

.thumb .badge {
  align-self: flex-start;
}

.thumb-error {
  color: var(--danger);
  font-size: 0.8125rem;
}

.thumb-actions {
  margin-top: auto;
}

.thumb-actions .btn {
  flex: 1;
}
