/* ==========================================================================
   Components Stylesheet: Tool UI, Dropzones, Controls, Cropper & Results
   ========================================================================== */

/* --------------------------------------------------------------------------
   Dropzone Component
   -------------------------------------------------------------------------- */
.dropzone-container {
  border: 2px dashed rgba(99, 102, 241, 0.35);
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.dropzone-container:hover,
.dropzone-container.drag-over {
  border-color: var(--accent-cyan);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.2);
  transform: translateY(-2px);
}

.dropzone-container input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition-fast);
}

.dropzone-container:hover .dropzone-icon-wrap {
  transform: scale(1.08);
}

.dropzone-icon-wrap svg {
  width: 36px;
  height: 36px;
  stroke: var(--accent-cyan);
}

.dropzone-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.dropzone-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.dropzone-browse-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent-primary), #4f46e5);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.6rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px var(--accent-primary-glow);
  pointer-events: none;
}

.dropzone-meta {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

/* --------------------------------------------------------------------------
   Selected File Status Card
   -------------------------------------------------------------------------- */
.file-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
}

.file-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-icon-badge svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-cyan);
}

.file-details {
  overflow: hidden;
}

.file-name {
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}

.file-meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-remove {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: #fb7185;
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-remove:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Settings & Presets Controls
   -------------------------------------------------------------------------- */
.controls-panel {
  background: rgba(10, 15, 29, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-title svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent-primary);
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.preset-chip {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
  position: relative;
}

.preset-chip:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

.preset-chip.active {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.2);
}

.preset-chip.active::after {
  content: '✓';
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 900;
}

.preset-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.preset-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.custom-size-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-glass);
  flex-wrap: wrap;
}

.custom-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  gap: 0.5rem;
}

.custom-input-wrap input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  width: 90px;
  font-family: var(--font-mono);
  outline: none;
}

.custom-input-wrap span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.slider-group {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.custom-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

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

/* --------------------------------------------------------------------------
   Action Buttons
   -------------------------------------------------------------------------- */
.btn-primary-action {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #4f46e5 50%, #06b6d4 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 1.15rem 2rem;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.btn-primary-action:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.45);
  filter: brightness(1.05);
}

.btn-primary-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Progress Meter
   -------------------------------------------------------------------------- */
.progress-card {
  background: rgba(10, 15, 29, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  margin-top: 1.5rem;
}

.progress-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 1.25rem 0 0.75rem;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan), var(--accent-emerald));
  border-radius: var(--radius-full);
  transition: width 0.25s ease;
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.progress-status-text {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Result Summary Card (Before / After)
   -------------------------------------------------------------------------- */
.result-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  margin-top: 2rem;
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.15);
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.result-badge-success {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  background: rgba(9, 13, 22, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  text-align: center;
}

.stat-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.stat-val {
  font-size: 1.65rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
}

.stat-val.highlight {
  color: var(--accent-emerald);
}

.stat-val.savings {
  color: var(--accent-cyan);
}

.result-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-download {
  flex: 2;
  min-width: 220px;
  background: linear-gradient(135deg, var(--accent-emerald) 0%, #059669 100%);
  color: #022c22;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 1rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--accent-emerald-glow);
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.btn-download:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-secondary-action {
  flex: 1;
  min-width: 160px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary-action:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* --------------------------------------------------------------------------
   PDF Pages Grid Previewer
   -------------------------------------------------------------------------- */
.pages-preview-container {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-glass);
}

.pages-header {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pages-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scrollbar-width: thin;
}

.page-thumb-card {
  flex-shrink: 0;
  width: 110px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  text-align: center;
}

.page-thumb-card canvas {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  background: #fff;
}

.page-thumb-num {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Tabs Switcher (For Image Tools Page)
   -------------------------------------------------------------------------- */
.tabs-nav {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.35rem;
  gap: 0.35rem;
  margin-bottom: 2rem;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: #fff;
  background: var(--accent-primary);
  box-shadow: 0 4px 16px var(--accent-primary-glow);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* --------------------------------------------------------------------------
   Passport Photo Cropper Workstation
   -------------------------------------------------------------------------- */
.cropper-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

.cropper-stage {
  background: rgba(9, 13, 22, 0.9);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-height: 420px;
  justify-content: center;
}

.canvas-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 450px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-sm);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#photoCanvas {
  display: block;
  max-width: 100%;
  height: auto;
  cursor: grab;
  touch-action: none;
}

#photoCanvas:active {
  cursor: grabbing;
}

/* Biometric Alignment Guidelines Overlay */
.biometric-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border: 2px solid var(--accent-cyan);
  box-sizing: border-box;
}

.biometric-overlay.hidden {
  display: none;
}

.guideline-oval {
  position: absolute;
  top: 15%;
  left: 20%;
  width: 60%;
  height: 65%;
  border: 1.5px dashed rgba(6, 182, 212, 0.85);
  border-radius: 50% 50% 45% 45%;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
}

.guideline-eye-line {
  position: absolute;
  top: 42%;
  left: 10%;
  width: 80%;
  height: 1px;
  background: rgba(6, 182, 212, 0.6);
}

.guideline-chin-line {
  position: absolute;
  top: 80%;
  left: 25%;
  width: 50%;
  height: 1px;
  background: rgba(244, 63, 94, 0.7);
}

.guideline-label {
  position: absolute;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(9, 13, 22, 0.8);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  right: 5px;
}

.canvas-controls-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  background: rgba(15, 23, 42, 0.7);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
}

.canvas-tool-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.canvas-tool-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.canvas-tool-btn.active {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.15);
}

/* --------------------------------------------------------------------------
   SVG to WebP Workspace
   -------------------------------------------------------------------------- */
.svg-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.preview-box {
  background: rgba(9, 13, 22, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.preview-box.checkerboard {
  background-image: linear-gradient(45deg, #161f30 25%, transparent 25%), 
                    linear-gradient(-45deg, #161f30 25%, transparent 25%), 
                    linear-gradient(45deg, transparent 75%, #161f30 75%), 
                    linear-gradient(-45deg, transparent 75%, #161f30 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.preview-box.white-bg {
  background: #ffffff;
}

.preview-box img,
.preview-box svg {
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
}

.scale-selector {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.scale-btn {
  flex: 1;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.scale-btn:hover {
  border-color: var(--accent-cyan);
  color: #fff;
}

.scale-btn.active {
  background: rgba(6, 182, 212, 0.2);
  border-color: var(--accent-cyan);
  color: #fff;
}

/* ==========================================================================
   Comprehensive Mobile Responsive Enhancements for Components
   ========================================================================== */

@media (max-width: 900px) {
  .cropper-layout,
  .svg-workspace {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  /* Dropzone on Tablets & Phones */
  .dropzone-container {
    padding: 2.25rem 1.25rem;
    border-radius: var(--radius-md);
  }

  .dropzone-icon-wrap {
    width: 56px;
    height: 56px;
    margin-bottom: 1rem;
    border-radius: 16px;
  }

  .dropzone-icon-wrap svg {
    width: 28px;
    height: 28px;
  }

  .dropzone-title {
    font-size: 1.15rem;
  }

  .dropzone-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .dropzone-browse-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    font-size: 0.88rem;
  }

  .dropzone-meta {
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.75rem;
  }

  /* File Card on Mobile */
  .file-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding: 1rem;
  }

  .file-name {
    max-width: 100%;
    font-size: 0.92rem;
  }

  .file-actions {
    width: 100%;
  }

  .btn-remove {
    width: 100%;
    justify-content: center;
    padding: 0.6rem;
  }

  /* Controls & Presets */
  .controls-panel {
    padding: 1.25rem 1rem;
  }

  .presets-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .preset-chip {
    padding: 0.75rem 0.85rem;
    min-height: 58px;
  }

  .preset-title {
    font-size: 0.88rem;
  }

  .preset-desc {
    font-size: 0.7rem;
  }

  .custom-size-row {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .custom-input-wrap {
    justify-content: center;
    padding: 0.5rem 1rem;
  }

  .slider-group {
    width: 100%;
    min-width: 100%;
  }

  /* Touch-optimized Slider Thumb */
  .custom-range {
    height: 8px;
  }

  .custom-range::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
  }

  /* Action Buttons */
  .btn-primary-action {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }

  /* Result Summary Cards */
  .result-card {
    padding: 1.5rem 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .stat-val {
    font-size: 1.45rem;
  }

  .result-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn-download,
  .btn-secondary-action {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.25rem;
  }

  /* Tabs Switcher */
  .tabs-nav {
    flex-direction: column;
    gap: 0.4rem;
  }

  .tab-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
  }

  /* Cropper Stage on Mobile */
  .cropper-stage {
    padding: 1rem 0.5rem;
    min-height: 320px;
  }

  .canvas-wrapper {
    max-height: 340px;
  }

  .canvas-controls-bar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-md);
  }

  .canvas-tool-btn {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
  }

  /* Scale Selector (SVG) */
  .scale-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .scale-btn {
    padding: 0.65rem 0.5rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  .presets-grid {
    grid-template-columns: 1fr;
  }

  .cropper-stage {
    min-height: 280px;
  }

  .canvas-wrapper {
    max-height: 280px;
  }

  .stat-val {
    font-size: 1.3rem;
  }
}

/* ==========================================================================
   ₹5 Locked Micro-Donation Modal & Supporter Badge Styles
   ========================================================================== */
.donation-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.donation-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.donation-modal {
  background: #0f172a;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-lg);
  max-width: 460px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(99, 102, 241, 0.2);
  position: relative;
  text-align: center;
  transform: scale(0.95);
  transition: transform var(--transition-base);
}

.donation-modal-overlay.active .donation-modal {
  transform: scale(1);
}

.btn-close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 1.4rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-close-modal:hover {
  background: rgba(244, 63, 94, 0.2);
  color: #fff;
}

.locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.85rem;
}

.donation-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
}

.donation-statement {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0.75rem 0 1.25rem;
  background: rgba(9, 13, 22, 0.6);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  text-align: left;
}

.donation-statement strong {
  color: var(--accent-emerald);
}

.qr-card-display {
  background: #ffffff;
  border-radius: 14px;
  padding: 0.5rem;
  display: inline-block;
  max-width: 250px;
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.qr-image-render {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

.upi-details-card {
  margin-top: 1.25rem;
  background: rgba(9, 13, 22, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  text-align: left;
}

.upi-id-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.upi-id-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.upi-id-text {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 700;
  word-break: break-all;
}

.btn-copy-upi {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.btn-copy-upi:hover {
  background: var(--accent-primary);
}

.donation-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn-upi-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--accent-emerald) 0%, #059669 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: 0 4px 20px var(--accent-emerald-glow);
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.btn-upi-mobile:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-supporter-confirm {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-supporter-confirm:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.donation-footer-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Nav & Floating Donation Buttons */
.nav-donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-donate-btn:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

.nav-donate-btn.is-supporter {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}


