/**
 * PicDriver Before-After Photo Frame - Styles
 */

.dual-drop-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .dual-drop-container {
    grid-template-columns: 1fr;
  }
}

.dropzone-box {
  background: var(--bg-surface);
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.dropzone-box:hover, .dropzone-box.dragover {
  border-color: var(--brand-primary);
  background: rgba(99, 102, 241, 0.05);
}

.dropzone-box.loaded {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.04);
}

.dropzone-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 9999px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
}

.dropzone-box.loaded .dropzone-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.dropzone-thumb-preview {
  max-width: 120px;
  max-height: 90px;
  border-radius: 4px;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  object-fit: cover;
}

.demo-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.stage-wrapper {
  position: relative;
  min-height: 480px;
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.98) 100%);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
  user-select: none;
}

#preview-canvas {
  display: block;
  max-width: 100%;
  max-height: 520px;
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  background-image: 
    linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%), 
    linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%), 
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
}

.control-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.control-section:last-child {
  border-bottom: none;
}

.control-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-group-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.btn-option {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.btn-option:hover, .btn-option.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--brand-primary);
  color: #fff;
}

.frame-color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

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

.badge-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.text-input-field {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  width: 100%;
}

.text-input-field:focus {
  outline: none;
  border-color: var(--brand-primary);
}

.palette-dots {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.mat-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease;
}

.mat-dot:hover, .mat-dot.active {
  transform: scale(1.15);
  border-color: var(--brand-primary);
}

.split-slider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #fff;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  cursor: ew-resize;
  pointer-events: auto;
  z-index: 10;
}

.split-slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  background: #fff;
  border: 2px solid var(--brand-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  color: #1e293b;
  font-size: 12px;
}
