/* BASISSTILE FÜR DEN BODY */
body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
    background: url("Background.png") no-repeat center center fixed;
    background-size: 100% 100%;
    transition: background-color 0.3s, color 0.3s;
    box-sizing: border-box;
}

#newsTicker{
  width:100%;
  overflow:hidden;
  border-top:1px solid #ccc;
  border-bottom:1px solid #ccc;
  background:#f7f7f9;
  color:#111;
  font-size:0.95rem;
}
#newsTicker .ticker-track{
  display:inline-block;
  white-space:nowrap;
  padding:6px 0;
  will-change: transform;
  animation: ticker-scroll 20s linear infinite;
}
#newsTicker:hover .ticker-track{ animation-play-state: paused; }
@keyframes ticker-scroll{
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
body.dark-mode #newsTicker{
  background:#1f2228;
  color:#e8e8e8;
  border-color:#333;
}
#newsTicker .ticker-sep{ padding:0 1rem; opacity:.6; }
#newsTicker a { color: inherit; text-decoration: underline; }
#newsTicker a:hover { text-decoration: none; }
#newsTicker a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* LOGO */
#logo {
    text-align: center;
    margin: 20px auto;
}
#logo img {
    height: 300px;
    width: 480px; 
}

/* Button-Container (Allg. z.B. index) */
#buttonContainer {
    text-align: center;
    margin-bottom: 20px;
}
#buttonContainer button {
    margin: 0 5px;
}

.license-status {
    position: relative;
    padding-right: 250px; /* Platz für die Hardware-Daten */
}

.hardware-info {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9em;
    color: #333;
    text-align: right;
}

/* Container => index-Frames (left, result, feedback) */
.container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    padding: 0 20px 60px; /* Platz nach unten für Footer */
}

/* Frames in index.html */
#leftFrame, #resultFrame, #feedbackFrame {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 10px;
    background-color: #f9f9f9;
    transition: background-color 0.3s, color 0.3s;
    box-sizing: border-box;
}
#leftFrame {
    flex: 1;
    min-width: 200px;
    background-color: #f1f1f1;
}
#resultFrame {
    flex: 2;
    min-width: 300px;
}
#feedbackFrame {
    flex: 1;
    min-width: 200px;
    background-color: #e7f1ff;
}

/* Tabellen, Textareas, Buttons */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff; /* fester Hintergrund */
}
th, td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: middle;
}
th {
    background-color: #f4f4f4;
}
textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    font-size: 14px;
}
button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
}
button:hover {
    background-color: #0056b3;
}

/* FEHLER & INFO */
.error { color: red; }
.info { color: green; }

/* Dark Mode */
.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}
.dark-mode #leftFrame,
.dark-mode #resultFrame,
.dark-mode #feedbackFrame {
    background-color: #1e1e1e;
    color: #e0e0e0;
}
.dark-mode #feedbackFrame {
    background-color: #2e2e2e;
}
.dark-mode #leftFrame {
    background-color: #2e2e2e;
}
.dark-mode table {
    background-color: #2e2e2e;
    color: #e0e0e0;
}
.dark-mode th {
    background-color: #3a3a3a;
}
.dark-mode textarea {
    background-color: #2e2e2e;
    color: #e0e0e0;
    border: 1px solid #444;
}
.dark-mode button {
    background-color: #333;
    color: #e0e0e0;
}
.dark-mode button:hover {
    background-color: #555;
}

/* POPUPS */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    z-index: 3000 !important;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    max-width: 90%;
}
.popup h2 {
    margin-top: 0;
}
.popup input, .popup textarea {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}
.dark-mode .popup {
    background-color: #1e1e1e;
    color: #e0e0e0;
}
.dark-mode .popup input,
.dark-mode .popup textarea {
    background-color: #2e2e2e;
    color: #e0e0e0;
    border: 1px solid #444;
}

/* OVERLAY */
.overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* *** Loading-Overlay (transparent, Vollbild, zentriert) *** */
#loadingOverlay{
    position: fixed;
    inset: 0;
    display: none;                /* per JS auf 'flex' gesetzt */
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.55); /* transparent drüber */
    color: #fff;
    font-size: 1.1rem;
    z-index: 2500;                /* über Inhalt, unter Popups */
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* FOOTER fixiert */
footer {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    background-color: #f1f1f1;
    text-align: center;
    padding: 10px;
    border-top: 1px solid #ddd;
    font-size: 14px;
    box-sizing: border-box;
}
.footer-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.footer-content img {
    height: 20px;
    vertical-align: middle;
}

/* ANKAUFSLISTE (Angebot.html) */
.offer-container {
    width: 80%;
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: center;
}
.offer-headline {
    color: #33ffff;
    margin-bottom: 20px;
}
.search-container {
    margin-bottom: 20px;
}

/* TEAM-DASHBOARD */
header {
    width: 100%;
    background-color: rgba(0,0,0,0);
    color: #fff;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}
header img {
    height: 100px;
}
.button-container {
    text-align: center;
    margin-bottom: 20px;
}
.button-container button {
    margin: 0 5px;
}
main {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    padding: 0 20px 60px;
}
.section-container {
    display: flex;
    flex: 1;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.left-sections, .middle-section, .right-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.left-sections {
    flex: 2;
}
.middle-section {
    flex: 1;
}
.right-section {
    flex: 2;
}
section {
    background: rgba(255,255,255,0.8);
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
}
.dark-mode main {
    background: rgba(0,0,0,0.8);
}
.dark-mode section {
    background: rgba(30,30,30,0.8);
}
.dark-mode iframe {
    background-color: #1e1e1e;
    border: 1px solid #333;
}
.dark-mode .section-container,
.dark-mode .left-sections,
.dark-mode .right-section {
    background-color: #1e1e1e;
    color: #e0e0e0;
}
.dark-mode .vertical-button-container {
    background: rgba(30,30,30,0.8);
}
.dark-mode .vertical-button-container button {
    background-color: #333;
    color: #e0e0e0;
}
.dark-mode .vertical-button-container button:hover {
    background-color: #555;
}

/* Changelog: Zeilenumbrüche */
#changeLogContent, .changeLogContent {
    white-space: pre-wrap;
}

/* ZUSÄTZLICHE STILE FÜR DIE PREISVERLAUF-SEITE */
.offer-container canvas {
    display: block;
    margin: 20px auto;
    max-width: 100%;
}

/* Sprachumschalter wieder OBEN RECHTS angedockt */
.lang-switch {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 3000;
}

/* Maintenance Overlay */
#maintenanceOverlay {
  background: rgba(0,0,0,0.95);
  z-index: 2000;
}
#maintenanceOverlay h1 {
  font-size: 3em;
  margin-bottom: 0.5em;
}
#maintenanceOverlay p {
  font-size: 1.5em;
  max-width: 80%;
  margin-bottom: 1em;
}
#maintenanceOverlay button {
  margin-top: 1em;
  padding: 0.5em 1.5em;
  font-size: 1em;
}

/* --- Kleine Ergänzungen für Angebot.html --- */
.forecast-meta{
  font-size: 0.75em;
  line-height: 1.25;
  text-align: right;
  opacity: .9;
  white-space: nowrap;
}
.forecast-meta span{
  opacity: .85;
  padding-right: .35em;
}

/* ===== Angebot.html spezifische Feinanpassungen ===== */

/* Chart flacher darstellen */
.inline-chart {
  width: 100%;
  height: 80px; /* vorher 150px */
}

/* Forecast-Tabelle kompakter + kleinere Schrift
   (greift sowohl bei .forecast-cell als auch bei id="forecast_*") */
#offerTable td.forecast-cell table,
#offerTable td[id^="forecast_"] table {
  font-size: 0.85em;
  border-collapse: collapse;
  width: 100%;
}
#offerTable td.forecast-cell th,
#offerTable td.forecast-cell td,
#offerTable td[id^="forecast_"] th,
#offerTable td[id^="forecast_"] td {
  padding: 4px 6px;
  line-height: 1.2;
}
#offerTable td.forecast-cell th,
#offerTable td[id^="forecast_"] th {
  font-size: 0.9em;
  font-weight: 600;
}

/* Meta (Last/Next calculation) dezenter */
#offerTable td.forecast-cell > div,
#offerTable td[id^="forecast_"] > div {
  margin-top: 3px;
  font-size: 0.75em;
  color: #555;
}

/* Spaltenverteilung für bessere Balance */
#offerTable { width: 140%; margin:0 auto; table-layout: fixed; }
#offerTable thead tr th:nth-child(1),
#offerTable tbody tr td:nth-child(1) { width:22%; }
#offerTable thead tr th:nth-child(2),
#offerTable tbody tr td:nth-child(2) { width:18%; }
#offerTable thead tr th:nth-child(3),
#offerTable tbody tr td:nth-child(3) { width:40%; }
#offerTable thead tr th:nth-child(4),
#offerTable tbody tr td:nth-child(4) { width:20%; }

/* Ende */
