/* ==========================================================================
   ReducerImage - Homepage Quick Workspace Styles (workspace.css)
   ========================================================================== */

/* Override hero card for a clean white SaaS layout */
.hero-card {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 16px !important;
  padding: 24px !important;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.02) !important;
  color: #0f172a !important;
}

/* Tabs */
.workspace-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}

.workspace-tab {
  flex: 1;
  text-align: center;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
  border-radius: 6px;
  transition: all var(--t-fast);
  cursor: pointer;
  border: none;
  background: transparent;
}

.workspace-tab:hover {
  color: #0f172a;
}

.workspace-tab.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Upload zone */
.workspace-upload-zone {
  border: 2px dashed rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.02);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t-normal);
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}

.workspace-upload-zone:hover,
.workspace-upload-zone.dragover {
  border-color: #2563eb;
  background: rgba(59, 130, 246, 0.05);
  transform: translateY(-1px);
}

.upload-icon-wrap {
  width: 56px;
  height: 56px;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #2563eb;
  transition: transform var(--t-fast);
}

.workspace-upload-zone:hover .upload-icon-wrap {
  transform: scale(1.08);
}

.workspace-upload-zone h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #0f172a;
}

.workspace-upload-zone p {
  font-size: 0.85rem;
  color: #64748b;
}

.workspace-upload-zone p span {
  color: #2563eb;
  font-weight: 600;
}

.upload-formats-hint {
  font-size: 0.72rem !important;
  margin-top: 8px;
  opacity: 0.8;
}

/* Configuration layouts */
.workspace-configs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.config-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.config-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.config-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
}

.config-checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-checkbox-group input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.config-checkbox-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.config-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Form controls overrides */
.form-input, .form-select {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.88rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  transition: all var(--t-fast);
}

.form-input:focus, .form-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.mode-toggle-group {
  display: flex;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 3px;
  gap: 2px;
}

.mode-toggle-btn {
  flex: 1;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all var(--t-fast);
}

.mode-toggle-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Range slider styling */
.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: #e2e8f0;
  outline: none;
  margin: 10px 0;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
  transition: transform var(--t-fast);
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

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

/* Previews panel for uploaded items */
.workspace-previews {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 12px;
}

.preview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  padding: 8px 12px;
  position: relative;
}

.preview-thumbnail {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  background: #e2e8f0;
  border: 1px solid rgba(0,0,0,0.06);
}

.preview-details {
  flex: 1;
  min-width: 0;
}

.preview-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
}

.preview-info-pct {
  color: #2563eb;
  font-weight: 700;
}

.remove-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

/* Processing Overlay state */
.workspace-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.workspace-processing p {
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  margin-top: 12px;
}

.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 12px;
  max-width: 280px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 9999px;
  transition: width 0.2s ease;
}

/* Results section */
.workspace-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.results-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

/* Action button extensions */
.btn-block {
  width: 100%;
  justify-content: center;
  display: flex;
  align-items: center;
}

.post-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
  border-top: 1px solid #f1f5f9;
  padding-top: 16px;
}

/* Upscale alert warning styling */
.upscale-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
  color: #b45309;
  font-size: 0.78rem;
  font-weight: 600;
}

.upscale-warning svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Button utility overrides */
.btn.btn-ghost {
  background: transparent;
  color: #475569;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.btn.btn-ghost:hover {
  background: #f8fafc;
  color: #0f172a;
}
