/* tool-base.css
   Scope: Kun gamle tools (tilføj class="converter tool-legacy")
*/

/* ---- Base card / container ---- */
.converter.tool-legacy {
  width: 95%;
  padding: 24px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  margin: 30px auto;
  font-family: Inter, Roboto, Arial, sans-serif;
  position: relative;
  box-sizing: border-box;
  border: 1px solid rgba(209, 213, 219, 0.85);
}

/* ---- “Vice versa” link ---- */
.converter.tool-legacy > a {
  display: block;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #111;
  text-decoration: none;
}

.converter.tool-legacy > a:hover,
.converter.tool-legacy > a:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* ---- Titel tidligere <p style="...">) ---- */
.converter.tool-legacy > p {
  margin: 0 0 16px;
  text-align: center;
  border-radius: 10px;
  padding: 12px 14px;
  line-height: 1.2;
}

/* Den “sorte bar” til titlen */
.converter.tool-legacy > p[style*="background-color:black"],
.converter.tool-legacy > p[style*="background-color: black"] {
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px;
}

/* ---- Inputs / selects ---- */
.converter.tool-legacy .input-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

/* label ved siden af input */
.converter.tool-legacy .input-container label {
  margin-left: 0;
  font-size: 14px;
  color: #333;
  white-space: nowrap;
  font-weight: 600;
}

/* Input field */
.converter.tool-legacy input[type="text"],
.converter.tool-legacy input[type="number"],
.converter.tool-legacy input[type="tel"],
.converter.tool-legacy input[type="email"],
.converter.tool-legacy input[type="search"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Select dropdown */
.converter.tool-legacy select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  background: #fff;
  margin-bottom: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Focus state (samme “aktive” lilla som currencyconverter) */
.converter.tool-legacy input[type="text"]:focus,
.converter.tool-legacy input[type="number"]:focus,
.converter.tool-legacy input[type="tel"]:focus,
.converter.tool-legacy input[type="email"]:focus,
.converter.tool-legacy input[type="search"]:focus,
.converter.tool-legacy select:focus {
  border-color: #4f46e5;
  box-shadow: none;
}

/* ---- Resultat ---- */
.converter.tool-legacy #result {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin: 16px 0 10px;
  padding: 12px;
  border-radius: 8px;
  background-color: #f3f4f6;
  color: #111;
}

/* Hvis #result står inde i <b><p id="result"></p></b> */
.converter.tool-legacy b #result,
.converter.tool-legacy b > #result {
  font-weight: 700;
}

/* ---- Disclaimer (midlertidig for legacy tools) ---- */
.disclaimer {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  margin-top: 12px;
  line-height: 1.4;
  font-style: italic;
}

.disclaimer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.disclaimer a:hover {
  opacity: 0.9;
}

/* ---- Disclaimer (fælles for alle tools) ---- */
.tool-disclaimer {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  margin-top: 12px;
  line-height: 1.4;
  font-style: italic;
}

.tool-disclaimer a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tool-disclaimer a:hover {
  opacity: 0.9;
}

/* ---- Små forbedringer til mobil ---- */
@media (max-width: 480px) {
  .converter.tool-legacy {
    padding: 18px;
    border-radius: 12px;
  }

  .converter.tool-legacy > p[style*="background-color:black"],
  .converter.tool-legacy > p[style*="background-color: black"] {
    font-size: 18px !important;
    padding: 10px 12px;
  }

  .converter.tool-legacy input[type="text"],
  .converter.tool-legacy select {
    font-size: 16px; /* undgår iOS zoom */
  }
}
