/**
 * PicDriver Image Straightener - Tool Specific Styling
 */

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

#straightener-canvas {
  max-width: 100%;
  max-height: 520px;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease-out;
}

.leveling-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  display: grid;
  z-index: 5;
}

.leveling-grid-overlay.density-thirds {
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

.leveling-grid-overlay.density-fine {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
}

.leveling-grid-overlay.density-dense {
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(12, 1fr);
}

.leveling-grid-cell {
  border: 1px dashed rgba(99, 102, 241, 0.35);
}

.angle-readout-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.angle-input-box {
  width: 72px;
  padding: 4px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #a855f7;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: right;
}

.angle-quick-pills {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.btn-angle-quick {
  flex: 1;
  padding: 6px 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-angle-quick:hover {
  border-color: var(--brand-primary);
  color: #fff;
}

.straighten-options-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.switch-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.switch-btn {
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.switch-btn.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}
