/* ==========================================================================
   استایل‌های ابزار تغییر سایز و ابعاد آنلاین عکس
   ========================================================================== */

.resize-workspace {
  padding: 24px;
}

.file-input-hidden {
  display: none;
}

/* دراپ‌زون آپلود */
.upload-dropzone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  background-color: var(--bg-card);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: #f59e0b;
  background-color: #fffbeb;
}

.dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.dropzone-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.dropzone-icon-box.bg-amber {
  background: #fef3c7 !important;
  color: #f59e0b !important;
}

.dropzone-icon-box svg {
  width: 32px;
  height: 32px;
}

.dropzone-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.dropzone-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

.btn-select-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(25, 75, 251, 0.25);
}

.btn-select-file:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(25, 75, 251, 0.35);
}

.panel-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}

.file-meta-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.file-name-tag {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  background: var(--bg-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-dim-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.btn-reset-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.btn-reset-tool:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
  color: var(--text-main);
}

.preview-and-actions-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

.preview-container {
  width: 100%;
  display: flex;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
}

.actions-container {
  width: 100%;
}

/* ورودی‌های عددی ابعاد و قفل تناسب */
.dimension-inputs-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  flex-wrap: wrap;
}

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

.dim-input-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.dim-num-input {
  width: 130px;
  padding: 10px 40px 10px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  background: #ffffff;
  outline: none;
  transition: var(--transition);
  direction: ltr;
  text-align: left;
}

.dim-num-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.unit-label {
  position: absolute;
  right: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  pointer-events: none;
}

.btn-aspect-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  color: var(--text-muted);
  margin-top: 20px;
}

.btn-aspect-lock.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-aspect-lock:hover {
  border-color: var(--primary);
}

.lock-text {
  font-size: 10px;
  font-weight: 700;
}

/* پریست‌ها */
.presets-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.presets-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.preset-chips-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip,
.preset-scale-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.preset-chip:hover,
.preset-scale-chip:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.preset-scale-chip {
  background: #f8fafc;
  color: #0f172a;
}

/* پیش‌نمایش و دانلود */
.resized-preview-image {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  display: block;
}

.btn-download-resized {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #f59e0b;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 28px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.btn-download-resized:hover {
  background: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

@media (max-width: 640px) {
  .resize-workspace {
    padding: 16px;
  }
  .dimension-inputs-card {
    padding: 14px;
    gap: 12px;
  }
  .dim-num-input {
    width: 110px;
  }
  .btn-aspect-lock {
    margin-top: 0;
  }
}
