/* ===============================
   Kabelquerschnitt Rechner CSS
   =============================== */

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: #f7f7f7;
  color: #222;
  margin: 0;
  padding: 0;
}

h2 {
  text-align: center;
  color: #003366;
  margin-top: 20px;
  margin-bottom: 10px;
}

form {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  padding: 20px 25px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.field label {
  flex: 0 0 45%;
  font-weight: 600;
  color: #333;
}

.field input,
.field select {
  flex: 0 0 45%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.field input:focus,
.field select:focus {
  border-color: #0078d7;
  outline: none;
}

button {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  font-size: 16px;
  background-color: #0078d7;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #005fa3;
}

.result {
  max-width: 600px;
  margin: 20px auto;
  background: #e9f5ff;
  border: 1px solid #b3d7ff;
  border-radius: 10px;
  padding: 15px 20px;
  line-height: 1.6;
  color: #003366;
}

/* ===============================
   Tooltip Design (rechts neben Feld)
   =============================== */
.tooltip {
  position: relative;
  display: inline-block;
  margin-left: 8px;
  color: #0078d7;
  font-weight: bold;
  cursor: help;
}

.tooltip::after {
  content: attr(title);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  width: 220px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

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

/* ===============================
   Responsive Styles
   =============================== */
@media (max-width: 600px) {
  form {
    padding: 15px;
  }

  .field {
    flex-direction: column;
    align-items: flex-start;
  }

  .field label {
    flex: 1 0 auto;
    margin-bottom: 4px;
  }

  .field input,
  .field select {
    width: 100%;
  }

  .tooltip::after {
    width: 180px;
    font-size: 11px;
  }

  .result {
    width: 90%;
  }
}

/* ===============================
   Footer Styling
   =============================== */
footer {
  text-align: center;
  padding: 15px;
  color: #666;
  font-size: 13px;
  margin-top: 30px;
}