/* ShutterDeck Batch Image Resizer - Dark mode (matches other ShutterDeck tools) */

.sd-batch-resizer-root {
  --sd-resizer-bg: #0f0f12;
  --sd-resizer-surface: #18181c;
  --sd-resizer-surface-elevated: #1f1f24;
  --sd-resizer-border: #2a2a30;
  --sd-resizer-text: #e8e8ec;
  --sd-resizer-muted: #8a8a94;
  --sd-resizer-accent: #6366f1;
  --sd-resizer-accent-hover: #818cf8;
  --sd-resizer-radius: 12px;
  --sd-resizer-radius-lg: 16px;
  --sd-resizer-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --sd-resizer-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 720px;
  margin: 24px auto;
  padding: 24px;
  background: var(--sd-resizer-surface);
  border: 1px solid var(--sd-resizer-border);
  border-radius: var(--sd-resizer-radius-lg);
  box-shadow: var(--sd-resizer-shadow-sm);
  color: var(--sd-resizer-text);
}

.sd-batch-resizer-root *,
.sd-batch-resizer-root *::before,
.sd-batch-resizer-root *::after {
  box-sizing: border-box;
}

.sd-batch-resizer-loading {
  color: var(--sd-resizer-muted);
  margin: 0;
}

.sd-batch-resizer-root.sd-batch-resizer-ready .sd-batch-resizer-loading {
  display: none;
}

/* Header */
.sd-batch-resizer-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--sd-resizer-text);
}

.sd-batch-resizer-subtitle {
  font-size: 0.875rem;
  color: var(--sd-resizer-muted);
  margin: 0 0 24px 0;
}

/* Drop zone */
.sd-batch-resizer-dropzone {
  border: 2px dashed var(--sd-resizer-border);
  border-radius: var(--sd-resizer-radius);
  padding: 32px 24px;
  text-align: center;
  background: var(--sd-resizer-bg);
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 20px;
}

.sd-batch-resizer-dropzone.sd-batch-resizer-dragover {
  border-color: var(--sd-resizer-accent);
  background: rgba(99, 102, 241, 0.15);
}

.sd-batch-resizer-dropzone-text {
  font-size: 0.9375rem;
  color: var(--sd-resizer-muted);
  margin: 0 0 12px 0;
}

.sd-batch-resizer-dropzone-btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--sd-resizer-accent);
  background: transparent;
  border: 1px solid var(--sd-resizer-accent);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.sd-batch-resizer-dropzone-btn:hover {
  background: var(--sd-resizer-accent);
  color: #fff;
}

.sd-batch-resizer-dropzone-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.sd-batch-resizer-dropzone input[type="file"] {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

/* File list */
.sd-batch-resizer-files {
  margin-bottom: 20px;
}

.sd-batch-resizer-files-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sd-resizer-muted);
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sd-batch-resizer-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--sd-resizer-border);
  border-radius: 8px;
  background: var(--sd-resizer-bg);
}

.sd-batch-resizer-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--sd-resizer-border);
}

.sd-batch-resizer-file-item:last-child {
  border-bottom: none;
}

.sd-batch-resizer-file-name {
  color: var(--sd-resizer-text);
  word-break: break-all;
}

.sd-batch-resizer-file-dims {
  color: var(--sd-resizer-muted);
  font-size: 0.8125rem;
  margin-left: 8px;
  flex-shrink: 0;
}

.sd-batch-resizer-file-status {
  font-size: 0.75rem;
  color: var(--sd-resizer-muted);
  margin-left: 8px;
}

.sd-batch-resizer-file-status.sd-batch-resizer-done {
  color: #34d399;
}

.sd-batch-resizer-file-status.sd-batch-resizer-error {
  color: #f87171;
}

/* Options grid */
.sd-batch-resizer-options {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}

.sd-batch-resizer-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--sd-resizer-text);
  margin-bottom: 6px;
}

.sd-batch-resizer-field select,
.sd-batch-resizer-field input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.9375rem;
  border: 1px solid var(--sd-resizer-border);
  border-radius: 8px;
  background: var(--sd-resizer-bg);
  color: var(--sd-resizer-text);
}

.sd-batch-resizer-field select:focus,
.sd-batch-resizer-field input[type="number"]:focus {
  outline: none;
  border-color: var(--sd-resizer-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.sd-batch-resizer-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sd-batch-resizer-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sd-batch-resizer-checkbox input {
  width: auto;
}

.sd-batch-resizer-checkbox span {
  font-size: 0.875rem;
  color: var(--sd-resizer-text);
}

.sd-batch-resizer-quality-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sd-batch-resizer-quality-wrap input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: var(--sd-resizer-accent);
}

.sd-batch-resizer-quality-value {
  font-size: 0.875rem;
  color: var(--sd-resizer-muted);
  min-width: 48px;
}

/* Progress */
.sd-batch-resizer-progress-wrap {
  margin-bottom: 20px;
  display: none;
}

.sd-batch-resizer-root.sd-batch-resizer-busy .sd-batch-resizer-progress-wrap {
  display: block;
}

.sd-batch-resizer-progress-current {
  font-size: 0.8125rem;
  color: var(--sd-resizer-muted);
  margin-bottom: 6px;
}

.sd-batch-resizer-progress-bar {
  height: 8px;
  background: var(--sd-resizer-bg);
  border-radius: 4px;
  overflow: hidden;
}

.sd-batch-resizer-progress-fill {
  height: 100%;
  background: var(--sd-resizer-accent);
  border-radius: 4px;
  width: 0%;
  transition: width 0.2s;
}

/* Buttons */
.sd-batch-resizer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.sd-batch-resizer-btn {
  padding: 12px 20px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background 0.2s, opacity 0.2s;
}

.sd-batch-resizer-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sd-batch-resizer-btn-primary {
  background: var(--sd-resizer-accent);
  color: #fff;
}

.sd-batch-resizer-btn-primary:hover:not(:disabled) {
  background: var(--sd-resizer-accent-hover);
}

.sd-batch-resizer-btn-secondary {
  background: var(--sd-resizer-bg);
  color: var(--sd-resizer-text);
  border: 1px solid var(--sd-resizer-border);
}

.sd-batch-resizer-btn-secondary:hover:not(:disabled) {
  border-color: var(--sd-resizer-muted);
  background: var(--sd-resizer-surface-elevated);
}

.sd-batch-resizer-btn-success {
  background: #059669;
  color: #fff;
}

.sd-batch-resizer-btn-success:hover:not(:disabled) {
  background: #047857;
}

/* Privacy note */
.sd-batch-resizer-privacy {
  font-size: 0.75rem;
  color: var(--sd-resizer-muted);
  margin: 0;
}

@media (max-width: 640px) {
  .sd-batch-resizer-root {
    margin: 16px;
    padding: 16px;
  }
  .sd-batch-resizer-field-row {
    grid-template-columns: 1fr;
  }
}
