/* Quick Image Fix - Image Resizer | Brand: #667eea, #764ba2 */

html, body { overflow-x: hidden; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: #667eea;
  color: white;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 1rem;
  outline: 2px solid #764ba2;
  outline-offset: 2px;
}

.header {
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
}

.nav-link {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  color: #2d3748;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover {
  color: #667eea;
  background: rgba(102, 126, 234, 0.08);
}
.nav-link-active {
  color: #667eea !important;
  font-weight: 600;
  background: rgba(102, 126, 234, 0.1);
}
.nav-link-disabled {
  color: #a0aec0 !important;
  cursor: not-allowed;
  pointer-events: none;
}

.dropdown-menu { z-index: 60; }
.dropdown-item { white-space: nowrap; }
.badge-coming { font-size: 0.7rem; color: #718096; margin-left: 0.25rem; }

.mobile-menu[aria-hidden="false"] .mobile-drawer { transform: translateX(0); }
.mobile-menu[aria-hidden="false"] .mobile-overlay { opacity: 1; pointer-events: auto; }
.mobile-menu[aria-hidden="true"] { pointer-events: none; }
.mobile-menu[aria-hidden="false"] { pointer-events: auto; }
.mobile-menu .mobile-overlay { opacity: 0; pointer-events: none; transition: opacity 0.3s; }
@media (max-width: 767px) {
  .mobile-drawer { -webkit-overflow-scrolling: touch; }
  .mobile-nav-list a { min-height: 44px; display: flex; align-items: center; }
  .hamburger { min-width: 44px; min-height: 44px; display: inline-flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
  .hamburger .hamburger-icon { width: 24px; height: 2px; min-height: 2px; background-color: #2d3748; border-radius: 1px; margin: 0; display: block; }
}

/* Upload zone – contained, prominent CTA */
.upload-zone {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2.5rem;
  text-align: center;
  background: #f1f5f9;
  border: 2px dashed #cbd5e1;
  border-radius: 1rem;
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone.over {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.08);
}

.upload-zone-capability {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0 0 0.375rem 0;
}

.upload-zone-status {
  font-size: 0.9375rem;
  color: #475569;
  margin: 0 0 1.25rem 0;
  font-weight: 500;
}

.upload-images-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.upload-images-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
}

.upload-images-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.35);
}

.upload-images-btn:active {
  transform: translateY(0);
}

.upload-zone-hint {
  font-size: 0.8125rem;
  color: #94a3b8;
  margin: 1rem 0 0 0;
}

/* Options panel – grouped, clean, distinguishable */
.options-panel {
  max-width: 100%;
}

.options-group {
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
}

.options-group-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.options-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #2d3748;
  margin-bottom: 0.375rem;
}

.options-hint {
  color: #94a3b8;
  font-weight: 400;
  cursor: help;
}

.options-input,
.options-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  color: #2d3748;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.options-input:focus,
.options-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.dimensions-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr minmax(120px, 140px);
  gap: 0.75rem;
  align-items: end;
}

.dimension-field {
  min-width: 0;
}

.dimension-field-unit .options-select {
  min-width: 0;
}

.dimension-lock-wrap {
  display: flex;
  align-items: flex-end;
  padding-bottom: 0.125rem;
}

.aspect-lock-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  font-size: 1.125rem;
}

.aspect-lock-btn:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.06);
}

.aspect-lock-btn:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.options-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.options-field {
  min-width: 0;
}

.options-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.btn-secondary {
  background: #fff;
}

@media (max-width: 767px) {
  .dimensions-row {
    grid-template-columns: 1fr auto 1fr;
  }
  .dimension-field-unit {
    grid-column: 1 / -1;
  }
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.35);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.45);
}

.preset-btn {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: white;
  color: #2d3748;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.preset-btn:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.08);
  color: #667eea;
}
.preset-btn.selected {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.15);
  color: #667eea;
}

.quality-slider,
#quality-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: #e2e8f0;
  height: 8px;
  border-radius: 4px;
}
.quality-slider::-webkit-slider-thumb,
#quality-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.quality-slider::-moz-range-thumb,
#quality-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #667eea;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.result-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.result-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.result-card .thumb { aspect-ratio: 1; object-fit: contain; background: #f7fafc; }
.result-card .download-btn {
  background: #667eea;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: opacity 0.2s, background 0.2s;
}
.result-card .download-btn:hover { opacity: 0.9; background: #5a67d8; }

.upload-preview-card .upload-preview-thumb { display: block; min-height: 80px; }
.remove-image-btn {
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  line-height: 1;
  font-size: 1.25rem;
}

.faq-question:hover { background: #f7fafc; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .mobile-drawer, .faq-answer, .skip-link { transition: none; }
}
