/* 
  rechner.css
  ----------------------------------------
  1) Startseiten-Layout (unverändert)
  2) Danach: Overrides für Snippet #snippetContainer
*/

/* ------------------------------------
   1) STARTSEITEN-LAYOUT
   (unverändert)
------------------------------------ */

/* Allgemeines Seitenlayout */
body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #e0f7fa, #ffffff);
  margin: 0;
  padding: 0;
  color: #333;
  min-height: 100vh;
}

/* Haupt-Container mit Schatten, Abständen etc. */
.container {
  max-width: 1200px;
  width: 95%;
  margin: 40px auto;
  background: #ffffff;
  padding: 40px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Kopfbereich */
header {
  text-align: center;
  margin-bottom: 30px;
}
header h1 {
  font-size: 28px;
  font-weight: 600;
  color: #004a80;
  margin: 0;
}
.logo {
  max-height: 90px;  /* oder so, damit es nicht zu groß wird */
  margin-right: 10px; /* kleiner Abstand rechts */
  vertical-align: middle; /* Logo und Text auf gleicher Höhe */
}

/* Allgemeine Sektionen mit einer Überschrift */
.section {
  margin-bottom: 30px;
}
.section h2 {
  font-size: 20px;
  color: #004a80;
  border-bottom: 2px solid #004a80;
  padding-bottom: 5px;
  margin-bottom: 15px;
  text-align: left;
}

/* Horizontale Gruppe für Produktauswahl (zentriert) */
.button-group-horizontal {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

/* Vertikale Gruppe (links) */
.button-group-vertical {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-start;
  margin-bottom: 30px;
}

/* Gemeinsamer Button-Stil */
.common-btn {
  min-width: 220px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  display: inline-block;
  border-radius: 0; /* keine abgerundeten Ecken */
  background: #f7f7f7; /* hellgrau */
  border: none;
  color: #004a80;
}
.common-btn:hover {
  opacity: 0.9;
}

/* Produktauswahl-Buttons 
   - Unausgewählt: hellgrau (#f7f7f7), dunkles Blau (#004a80) als Text
   - Ausgewählt: vollflächig blau, weißer Text
*/
.btn-product {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  outline: none;
}
.btn-product.selected {
  background: #004a80;
  color: #fff;
}

/* Responsives Verhalten */
@media (max-width: 600px) {
  .container {
    margin: 20px;
    padding: 20px;
  }
  .common-btn {
    font-size: 14px;
    padding: 10px 15px;
  }
}

/* Beispiel: Inhalt-Container, in den Snippets geladen werden */
#mainContent {
  border: 1px solid #ccc;
  min-height: 300px;
  padding: 20px;
  box-sizing: border-box;
}

/* (Optional) Falls du ein Print-View-Bereich hast */
#printView {
  display: none;
}
@media print {
  #printView {
    display: block;
  }
}

/* ------------------------------------
   2) OVERRIDES FÜR DAS SNIPPET
   (wirken nur innerhalb von #snippetContainer)
------------------------------------ */

/* Hintergrund & Innenabstand für den Snippet-Bereich selbst (optional) */
#snippetContainer {
    /* optional anderes BG */
  padding: 20px;
}

/* Falls dein Snippet ein eigenes .container-Element hat,
   bekommt es einen weißen Kasten, Schatten etc.,
   jedoch OHNE abgerundete Ecken. */
#snippetContainer .container {
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 0;
  text-align: left;
  padding: 30px;
  max-width: 900px;
  margin: 0 auto;
}

/* Überschriften nur im Snippet */
#snippetContainer h3 {
  font-size: 22px;
  font-weight: 600;
  color: #004a80;
  margin-bottom: 20px;
  text-align: left;
}

/* Formulare bzw. .form-group und .input-field im Snippet */
#snippetContainer .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 15px;
}

#snippetContainer .input-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0f0f0;
  border: none;
  padding: 10px;
}

/* Input-Feld selbst */
#snippetContainer .input-field input[type="number"] {
  flex: 1;
  padding: 8px;
  border: none;
  font-size: 16px;
  outline: none;
  background: transparent;
  color: #333;
}

/* Button im Snippet anders belegen?
   Falls du willst, dass das Snippet denselben Stil wie die Startseite verwendet,
   kannst du's weglassen. Ansonsten hier z.B.: */
#snippetContainer .common-btn {
  background: #004a80;
  color: #fff;
  border: none;
  border-radius: 0;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  margin-right: 10px;
  cursor: pointer;
  transition: background 0.3s ease-in-out;
}
#snippetContainer .common-btn:hover {
  background: #00335a;
}

/* Tabellen nur im Snippet */
#snippetContainer .table-container {
  overflow-x: auto;
  margin-top: 20px;
}
#snippetContainer table {
  width: 100%;
  border-collapse: collapse;
}
#snippetContainer th,
#snippetContainer td {
  border: 1px solid #ccc;
  padding: 8px;
  font-size: 14px;
  text-align: left;
}
#snippetContainer th {
  background: #eee;
}

/* ========================================
   Kontaktformular im Snippet – wie technische Eingabe
======================================== */
#kontaktForm {
  max-width: 900px;
  margin: 30px auto;
  padding: 0;
}

#kontaktForm .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 15px;
}

#kontaktForm label {
  font-weight: 600;
  color: #004a80;
}

#kontaktForm .input-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0f0f0;
  border: none;
  padding: 10px;
}

#kontaktForm input[type="text"],
#kontaktForm input[type="email"],
#kontaktForm input[type="number"],
#kontaktForm textarea {
  flex: 1;
  padding: 8px;
  font-size: 16px;
  border: none;
  outline: none;
  background: transparent;
  color: #333;
}

#kontaktForm textarea {
  resize: vertical;
  min-height: 100px;
}

#kontaktForm .common-btn {
  background: #004a80;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
}

#kontaktForm .common-btn:hover {
  background: #00335a;
}

#kontaktForm #captchaError {
  color: red;
  font-weight: bold;
}
/* ===============================
   Anlageninhalt-Rechner: Einheitenswitch + Entfernen
================================= */
.unit-switch {
  display: flex;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  font-size: 13px;
}

.unit-switch span {
  padding: 6px 12px;
  background: #eee;
  flex: 1;
  text-align: center;
  user-select: none;
}

.unit-switch span.active {
  background: #004a80;
  color: white;
}

.remove-dim-btn {
  float: right;
  background: #f44336;
  color: white;
  border: none;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 10px;
}

.remove-dim-btn:hover {
  background: #c62828;
}

/* ------------------------------------
   1) Mobile-LAYOUT
   (v1)
------------------------------------ */

@media (max-width: 600px) {
  .container {
    padding: 20px;
    margin: 10px;
  }

  .common-btn {
    width: 100%;
    font-size: 15px;
    padding: 12px;
    margin-bottom: 10px;
  }

  .button-group-horizontal,
  .button-group-vertical {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  #snippetContainer {
    padding: 10px;
  }

  #snippetContainer .form-group {
    margin-bottom: 12px;
  }

  #snippetContainer .input-field {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
  }

  #snippetContainer .input-field input,
  #snippetContainer .input-field textarea,
  #snippetContainer .input-field select {
    width: 100%;
    font-size: 16px;
    padding: 10px;
  }

  #snippetContainer .unit-switch {
    flex-direction: row;
    justify-content: space-between;
  }

  #snippetContainer table {
    font-size: 13px;
    word-break: break-word;
  }

  #snippetContainer th,
  #snippetContainer td {
    padding: 6px;
  }

  #kontaktForm {
    padding: 0;
  }

  #kontaktForm .form-group {
    margin-bottom: 15px;
  }

  #kontaktForm .input-field {
    flex-direction: column;
    padding: 10px;
    gap: 8px;
  }

  #kontaktForm input,
  #kontaktForm textarea {
    width: 100%;
    font-size: 16px;
    padding: 10px;
  }

  #kontaktForm .common-btn {
    width: 100%;
    font-size: 16px;
    padding: 12px;
  }

  header img {
    max-width: 100%;
    height: auto;
  }

  h1, h2, h3 {
    font-size: 18px;
  }
}
/* Desktop: volle Breite, kein Scroll */
.table-container {
  width: 100%;
  overflow-x: visible;
  margin-top: 20px;
}

.table-container table {
  width: 100%;
  border-collapse: collapse;
}

.table-container th,
.table-container td {
  border: 1px solid #ccc;
  padding: 8px;
  font-size: 14px;
  text-align: left;
}

/* Mobil: Scroll + nowrap */
@media (max-width: 768px) {
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-container table {
    min-width: 800px;
  }

  .table-container th,
  .table-container td {
    white-space: nowrap;
  }
}
.button-group-horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1em;
}

.section h3 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-size: 1.1em;
  font-weight: normal;
  color: #444;
}