/* =========================================================
   ResoShift – Zentrales Stylesheet
   ========================================================= */

/* --- Basis --- */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f2f2f2;
  color: #333;
}

a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Header --- */
header {
  background: #222;
  color: white;
  padding: 1em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

header a.logo-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #333;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

header a.logo-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-title {
  flex-grow: 1;
  text-align: center;
}

.header-title h1 {
  font-size: 2em;
  margin: 0;
  display: inline;
}

.header-title span {
  font-size: 0.8em;
  color: #ccc;
  margin-left: 0.5em;
}

header h1 {
  font-size: 1.5em;
  margin: 0;
  padding-left: 1em;
  flex: 1;
  text-align: center;
}

header .menu-toggle {
  font-size: 1.8em;
  color: white;
  cursor: pointer;
  display: block;
}

/* --- Sprachumschalter --- */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.3em;
  margin-right: 0.8em;
}

.lang-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75em;
  font-weight: bold;
  padding: 0.25em 0.55em;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  width: auto;
  margin-bottom: 0;
  letter-spacing: 0.05em;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-color: rgba(255, 255, 255, 0.7);
}

.lang-btn.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.lang-btn.active:hover {
  background: #0056b3;
  border-color: #0056b3;
}

/* --- Seitennavigation --- */
nav {
  position: fixed;
  top: 0;
  right: -250px;
  width: 250px;
  height: 100%;
  background-color: #222;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2em;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: right 0.3s ease;
}

nav a {
  color: white;
  text-decoration: none;
  margin: 1em 0;
  font-size: 1.2em;
}

nav a:hover {
  color: #007bff;
}

nav a.active {
  color: #007bff;
  font-weight: bold;
  border-left: 3px solid #007bff;
  padding-left: 0.5em;
}

nav.open {
  right: 0;
}

/* --- Main / Seiteninhalt --- */
main {
  max-width: 900px;
  margin: 2em auto;
  padding: 1em 2em;
  background: white;
  border-radius: 8px;
  box-shadow: 0 0 10px #ccc;
}

main h1,
main h2 {
  margin-top: 0;
}

/* --- Buttons / CTAs --- */
.cta,
.btn {
  display: inline-block;
  padding: 0.7em 1.2em;
  margin-top: 1em;
  background: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.cta:hover,
.btn:hover {
  background: #0056b3;
  text-decoration: none;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 1em;
  font-size: 0.9em;
  background: #eee;
  margin-top: 3em;
  color: #666;
}

/* --- Formulare --- */
form {
  display: flex;
  flex-direction: column;
}

label {
  margin-bottom: 0.5em;
  font-weight: bold;
}

input,
textarea,
button {
  font-size: 1em;
  margin-bottom: 1em;
  padding: 0.8em;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
  width: 100%;
}

textarea {
  resize: vertical;
  height: 150px;
}

button[type="submit"],
button[type="button"] {
  background: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

button[type="submit"]:hover,
button[type="button"]:hover {
  background: #0056b3;
}

/* --- Alert-Boxen --- */
.alert {
  padding: 1em;
  margin-bottom: 1em;
  border-radius: 5px;
  font-size: 1em;
  text-align: center;
}

.alert.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* --- ResoCalc --- */
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2em;
}

.tool {
  background: white;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  padding: 2em;
  width: 100%;
  max-width: 640px;
}

.tool label {
  display: block;
  margin-bottom: 0.3em;
}

.tool input[type="number"] {
  width: 100%;
  margin-bottom: 0.8em;
}

.result {
  margin-top: 1em;
  font-weight: bold;
  font-size: 1.1em;
  color: #007700;
}

.result ul {
  list-style: none;
  padding: 0;
  margin: 0.5em 0 0;
}

.result ul li {
  padding: 0.25em 0;
  border-bottom: 1px solid #e0ffe0;
}

.infobox {
  display: none;
  background: #fff3cd;
  border: 1px solid #ffeeba;
  border-radius: 8px;
  padding: 1.5em;
  margin-top: 1em;
  font-size: 0.95em;
  color: #856404;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.infobox.open {
  display: block;
}

.special-cases {
  margin-top: 1.5em;
  background: #f0f8ff;
  border: 1px solid #b8d4f0;
  border-radius: 8px;
  padding: 1em 1.5em;
  font-size: 0.9em;
}

.special-cases h3 {
  margin-top: 0;
  color: #0056b3;
}

.special-cases table {
  border-collapse: collapse;
  width: 100%;
}

.special-cases th,
.special-cases td {
  text-align: left;
  padding: 0.3em 0.6em;
  border-bottom: 1px solid #d0e8ff;
}

.special-cases th {
  color: #004080;
}

/* --- Formelbox / Phasendifferenz --- */
.formula-box {
  font-size: 1.2em;
  font-family: monospace;
  background: #f0f8ff;
  padding: 0.8em;
  border-radius: 6px;
}

.phasendiff-display {
  font-weight: normal;
  color: #555;
}

/* --- Impressum / Textseiten --- */
main h1,
main h2,
main h3 {
  color: #222;
}

main h2 {
  margin-top: 2em;
}

p,
ul {
  line-height: 1.6;
}

ul {
  margin-left: 1.5em;
}

blockquote {
  margin-left: 1.5em;
}

/* --- Select / Dropdown --- */
select {
  font-size: 1em;
  margin-bottom: 1em;
  padding: 0.8em;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
  width: 100%;
  background: white;
  cursor: pointer;
}

select:focus {
  outline: none;
  border-color: #007bff;
}

/* --- Readonly-Inputs --- */
input[readonly] {
  background: #f0f0f0;
  color: #666;
  cursor: not-allowed;
}

.readonly-group {
  margin-bottom: 0.5em;
}

.readonly-hint {
  font-size: 0.8em;
  color: #888;
  font-weight: normal;
}

/* --- Tool-Abschnittstrennungen --- */
.tool-section {
  border-top: 2px solid #e0e8f0;
  margin-top: 1.5em;
  padding-top: 1.2em;
}

.tool-section-title {
  margin-top: 0;
  color: #0056b3;
  font-size: 1.1em;
}

/* --- Detektierbarkeit (ResoSchrödinger) --- */
.detect-yes {
  color: #155724;
  font-weight: bold;
}

.detect-no {
  color: #721c24;
  font-weight: bold;
}

/* --- Fehlermeldungen --- */
.error-text {
  color: #cc0000;
}

/* --- Scan-Hint --- */
.scan-hint {
  font-size: 0.9em;
  color: #666;
  font-style: italic;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  header h1,
  .header-title h1 {
    font-size: 1.3em;
  }

  header a.logo-button {
    width: 50px;
    height: 50px;
  }

  main {
    margin: 1em;
    padding: 1em;
  }

  .tool {
    padding: 1em;
  }

  .lang-btn {
    font-size: 0.7em;
    padding: 0.2em 0.45em;
  }
}

@media print {
  header, footer, nav, .menu-toggle, .cta, button[type="submit"], .lang-switcher {
    display: none !important;
  }
  main, .container, .tool {
    box-shadow: none;
    margin: 0;
    padding: 0;
    max-width: 100%;
  }
  body {
    background: white;
    color: black;
  }
}
