/* Haupt-Container mit ID für maximale Spezifität */
/* Dies isoliert den Rechner vom Rest der WordPress-Seite */
#vp-calculator-tool {
  /* Reset Box Model */
  box-sizing: border-box;
  
  /* Layout Reset */
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 30px;
  
  /* Design Reset */
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  
  /* Font Reset - Verhindert Vererbung ungewollter Theme-Styles */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  text-align: left;
}

/* Lokaler Reset für ALLE Elemente im Rechner */
#vp-calculator-tool *,
#vp-calculator-tool *::before,
#vp-calculator-tool *::after {
  box-sizing: border-box;
  float: none; /* Verhindert Float-Probleme */
}

/* Header Styles - Isoliert */
#vp-calculator-tool .vp-calc-header {
  text-align: center;
  margin-bottom: 25px;
}

#vp-calculator-tool .vp-calc-header h2 {
  margin-top: 0;
  color: #1d2327;
  font-size: 1.8em; /* Relativ zur Basisgröße */
  margin-bottom: 10px;
  font-weight: 700;
  line-height: 1.2;
  border: none;
  text-transform: none;
  padding: 0;
}

#vp-calculator-tool .vp-calc-header p {
  color: #646970;
  font-size: 1em;
  margin: 0;
  padding: 0;
  font-weight: normal;
}

/* Formular Layout */
#vp-calculator-tool .vp-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  align-items: flex-start;
}

@media (max-width: 600px) {
  #vp-calculator-tool .vp-row { flex-direction: column; gap: 15px; }
}

#vp-calculator-tool .vp-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%; /* Wichtig für Mobile */
}

#vp-calculator-tool .vp-group label {
  font-weight: 600;
  margin-bottom: 8px;
  color: #2c3338;
  font-size: 0.95em;
  display: block;
  line-height: 1.3;
}

/* Input Styling - Aggressiver Reset gegen Theme-Defaults */
#vp-calculator-tool .vp-group input[type="number"], 
#vp-calculator-tool .vp-group select {
  width: 100% !important;
  max-width: 100%;
  padding: 10px 12px !important;
  border: 2px solid #dcdcde !important;
  border-radius: 8px !important;
  font-size: 1em !important;
  background-color: #fff !important;
  color: #333 !important;
  height: auto !important; /* Fix für Themes mit festen Höhen */
  min-height: 45px; /* Touch-freundlich */
  margin: 0 !important;
  box-shadow: none !important;
  display: block;
}

#vp-calculator-tool .vp-group input:focus, 
#vp-calculator-tool .vp-group select:focus {
  border-color: #2271b1 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1) !important;
}

#vp-calculator-tool .vp-group small {
  margin-top: 6px;
  color: #787c82;
  font-size: 0.85em;
  display: block;
  line-height: 1.3;
  font-style: normal;
}

/* Button Styling - Überschreibt Theme Buttons */
#vp-calculator-tool button#vpCalcBtn {
  width: 100%;
  background-color: #2271b1;
  color: white;
  border: none;
  padding: 15px;
  font-size: 1.1em;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  margin-top: 15px;
  box-shadow: 0 4px 6px rgba(34, 113, 177, 0.2);
  text-transform: none;
  line-height: normal;
  text-shadow: none;
}

#vp-calculator-tool button#vpCalcBtn:hover {
  background-color: #135e96;
  transform: translateY(-1px);
  color: white; /* Verhindert Hover-Farben des Themes */
}

#vp-calculator-tool button#vpCalcBtn:active {
  transform: translateY(1px);
}

/* Ergebnis Box */
#vp-calculator-tool .vp-result-box {
  margin-top: 30px;
  background: #f6f7f7;
  border-radius: 10px;
  border: 1px solid #dcdcde;
  overflow: hidden;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#vp-calculator-tool .vp-result-header {
  background: #2271b1;
  color: white;
  padding: 15px 20px;
  font-weight: bold;
  font-size: 1.1em;
  line-height: 1.4;
}

#vp-calculator-tool .vp-result-content {
  padding: 20px;
}

#vp-calculator-tool .vp-res-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.95em;
  color: #3c434a;
  align-items: center;
}

#vp-calculator-tool .vp-res-row:last-child {
  border-bottom: none;
}

#vp-calculator-tool .vp-res-row span:nth-child(2) {
  font-family: monospace; /* Damit Zahlen sauber untereinander stehen */
  font-size: 1.1em;
  color: #000;
  font-weight: 600;
  text-align: right;
}

#vp-calculator-tool .vp-res-highlight {
  background-color: #e6f0f5;
  margin: 15px -20px;
  padding: 15px 20px;
  border-top: 1px solid #c3c4c7;
  border-bottom: 1px solid #c3c4c7;
  font-weight: bold;
  color: #101517;
}

#vp-calculator-tool .vp-tax-estimation {
  margin-top: 20px;
  text-align: center;
  background: #fff8e5;
  border: 1px solid #f0c33c;
  border-radius: 8px;
  padding: 15px;
}

#vp-calculator-tool .vp-tax-estimation h4 {
  margin: 0 0 10px 0;
  font-size: 0.9em;
  color: #b38600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: bold;
  border: none;
}

#vp-calculator-tool .vp-tax-final {
  font-size: 2em;
  font-weight: 800;
  color: #d63638;
  display: block;
  margin-bottom: 5px;
  line-height: 1.2;
}

/* Hilfsklassen - mit !important um Theme Styles zu überschreiben */
#vp-calculator-tool .hidden {
  display: none !important;
}