/* ─── Maler-Preisrechner – Zusätzliche Styles ───────────────────── */

#maler-preisrechner {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Step Transitions */
.mpr-step {
  animation: mpr-slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes mpr-slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mpr-step-exit {
  animation: mpr-slideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes mpr-slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-30px);
  }
}

/* Card Selection */
.mpr-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.mpr-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.mpr-card.selected {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}

/* Progress Bar Animation */
.mpr-progress-fill {
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button Hover Effects */
.mpr-btn-primary {
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.mpr-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.mpr-btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.mpr-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Radio / Checkbox Custom */
.mpr-option {
  transition: all 0.2s ease;
  cursor: pointer;
}

.mpr-option:hover {
  border-color: #93c5fd;
  background-color: #eff6ff;
}

.mpr-option.selected {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

/* Number Input Spinner */
.mpr-number-input::-webkit-outer-spin-button,
.mpr-number-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.mpr-number-input {
  -moz-appearance: textfield;
}

/* Ergebnis Tabelle */
.mpr-result-row {
  animation: mpr-fadeInUp 0.4s ease forwards;
  opacity: 0;
}

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

.mpr-result-row:nth-child(1) { animation-delay: 0.05s; }
.mpr-result-row:nth-child(2) { animation-delay: 0.1s; }
.mpr-result-row:nth-child(3) { animation-delay: 0.15s; }
.mpr-result-row:nth-child(4) { animation-delay: 0.2s; }
.mpr-result-row:nth-child(5) { animation-delay: 0.25s; }
.mpr-result-row:nth-child(6) { animation-delay: 0.3s; }
.mpr-result-row:nth-child(7) { animation-delay: 0.35s; }
.mpr-result-row:nth-child(8) { animation-delay: 0.4s; }

/* Pulse Animation for Price */
.mpr-price-pulse {
  animation: mpr-pricePulse 0.6s ease;
}

@keyframes mpr-pricePulse {
  0% { transform: scale(0.8); opacity: 0; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

/* Tooltip */
.mpr-tooltip {
  position: relative;
}

.mpr-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #1e293b;
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.mpr-tooltip:hover::after {
  opacity: 1;
}

/* Shake for validation */
.mpr-shake {
  animation: mpr-shake 0.4s ease;
}

@keyframes mpr-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ─── Visualizer Styles ───────────────────────────────────────── */

/* Dropzone */
.mpr-dropzone {
  transition: all 0.3s ease;
}

.mpr-dropzone:hover,
.mpr-dropzone-active {
  border-color: #3b82f6 !important;
  background-color: rgba(59, 130, 246, 0.05) !important;
  transform: scale(1.01);
}

.mpr-dropzone-active {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.mpr-dropzone-active .mpr-dropzone-content {
  transform: scale(0.98);
}

/* Color Swatch */
.mpr-color-swatch {
  position: relative;
}

.mpr-color-swatch::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  opacity: 0;
  transition: opacity 0.2s;
  background: conic-gradient(from 0deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
}

.mpr-color-swatch:hover::before {
  opacity: 0.3;
}

/* Custom Scrollbar */
.mpr-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.mpr-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.mpr-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.mpr-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Comparison Slider */
.mpr-comparison-container {
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
}

.mpr-comparison-slider {
  transition: none;
}

.mpr-comparison-slider::before,
.mpr-comparison-slider::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  background: white;
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
}

.mpr-comparison-slider::before {
  top: 0;
  height: calc(50% - 24px);
}

.mpr-comparison-slider::after {
  bottom: 0;
  height: calc(50% - 24px);
}

/* ─── Malerroller Loading Animation ───────────────────────────── */

/* Wand wird angemalt - von links nach rechts füllen */
.mpr-paint-fill {
  animation: mpr-paintFill 8s ease-in-out forwards;
  transform-origin: left;
}

@keyframes mpr-paintFill {
  0% {
    clip-path: polygon(0 0, 0% 0, 0% 100%, 0 100%);
  }
  100% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

/* Container bewegt sich langsam von links nach rechts */
.mpr-roller-icon {
  animation: mpr-rollerMoveX 8s ease-in-out infinite alternate;
  z-index: 10;
  top: 0;
  bottom: 0;
  height: 100%;
  transform: translateX(-100%); /* Right edge of icon aligned to left % */
}

@keyframes mpr-rollerMoveX {
  0% {
    left: 0%;
  }
  100% {
    left: 100%;
  }
}

/* Farbrolle selbst bewegt sich schnell von oben nach unten */
.mpr-roller-icon i {
  position: absolute;
  animation: mpr-rollerMoveY 1s ease-in-out infinite alternate;
}

@keyframes mpr-rollerMoveY {
  0% { top: 10%; }
  100% { top: 75%; }
}

/* Farbspritzer */
.mpr-splatter {
  animation: mpr-splatter 2s ease-in-out infinite alternate;
}

@keyframes mpr-splatter {
  0%, 20% { opacity: 0; transform: scale(0); }
  50% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.5); }
}

.mpr-splatter:nth-child(2) {
  animation-delay: 0.5s;
}

.mpr-splatter:nth-child(3) {
  animation-delay: 1s;
}

/* Print Styles */
@media print {
  .mpr-no-print {
    display: none !important;
  }
  .mpr-card {
    break-inside: avoid;
  }
}
