/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Description: Ein Child Theme basierend auf Astra.
Author: Dein Name
Author URI: https://deine-website.de
Template: astra
Version: 1.0
*/

/* ========== Globales Box-Sizing ========== */
*,
*:before,
*:after {
    box-sizing: border-box;
}

canvas {
  touch-action: none;
}


body, html {
  touch-action: manipulation;
}

/* ========== Helles Design ========== */
body {
    background-color: #ffffff;
    color: #000000;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 1rem;
}

/* ========== Chart Styles ========== */
#chart-container {
    width: 100%;
	max-width: 1300px;
    margin: 0 auto 2rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    padding: 1rem;

}

@media (max-width: 600px) {
  #chart-container {
    aspect-ratio: 4 / 4;
  }
}

#myChart {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
}


/* ========== Range Buttons ========== */
#range-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#range-buttons button {
    padding: 6px 12px;
    border: 1px solid #ccc;
    background-color: #baeaff;
    cursor: pointer;
    border-radius: 6px;
    font-size: 1rem;
}

#range-buttons button:hover {
    background-color: #a4ddff;
}

#range-buttons button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* ========== Anzeige der letzten Werte ========== */
#latest-values, #average-values {
    font-size: 1.1rem;
    background-color: #f5faff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* ========== Dark Mode ========== */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode #myChart {
    background-color: #1e1e1e;
    box-shadow: 0 0 12px rgba(255,255,255,0.05);
}

body.dark-mode #chart-container {
    background-color: #1e1e1e;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
	
}

body.dark-mode #range-buttons button {
    background-color: #333;
    color: #eee;
    border-color: #555;
}

body.dark-mode #range-buttons button.active {
    background-color: #007bff;
    color: #fff;
}

body.dark-mode #range-buttons button:hover {
    background-color: #555;
}

body.dark-mode #latest-values, body.dark-mode #average-values {
    background-color: #222;
    color: #ccc;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #e0e0e0;
}

body.dark-mode a {
    color: #4dabf7;
}

/* ========== Dark Mode Toggle Button (fixed unten rechts) ========== */
#theme-toggle {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 1000;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: background-color 0.3s ease;
}

#theme-toggle:hover {
    background-color: #0056b3;
}

body.dark-mode #theme-toggle {
    background-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(255,255,255,0.3);
}
