/* Tilføj denne CSS for at style klokken */
#clock, #dato {
  font-size: 24px;
  color: peru;
}

header {
  width: 80%; /* Justeret til 80% for at fylde 80% af bredden */
  background-color: tomato; /* Sikrer, at hele headeren får baggrundsfarven */
  display: flex; /* Brug flexbox til at centrere indholdet */
  justify-content: center; /* Centrerer indholdet vandret */
  align-items: center; /* Centrerer indholdet lodret */
  border-radius: 24px;
  padding: 25px;
  box-sizing: border-box;
  margin: 0 auto; /* Centrerer headeren */
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-wrap: wrap;
}

h1 {
  text-align: center;
  margin: 0;
  color: white; /* Valgfrit, men forbedrer læsbarheden */
  flex: 1; /* Tillader h1 at tage op tilgængelig plads */
}

.power-symbol {
  width: 70px; /* Juster bredden på ikonerne efter behov */
  height: auto;
  border-radius: 24px;
}

.left {
  margin-right: 20px; /* Afstand mellem venstre ikon og h1 */
}

.right {
  margin-left: 20px; /* Afstand mellem højre ikon og h1 */
}

#dato {
  font-size: 24px;
}

body {
  display: flex;
  flex-direction: column;
  font-family: Arial, sans-serif;
  background: #f8f8f8;
  color: #320808;
  padding: 20px;
  margin: 0;
  background-color: khaki;
  padding-top: 150px; /* Gør plads til den faste header */
}



.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

nav {
  margin-bottom: 20px;
  
}

nav ul {
  list-style-type: none;
  padding: 0;
  display: flex;
  gap: 20px;
}

nav ul li {
  position: relative;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  padding: 10px 20px;
  border-radius: 5px;
  background-color: #80bc10;
  transition: background-color 0.3s;
}

nav ul li a:hover {
  background-color: #d4d4d4;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;

}

.dropdown-content a:hover {
  transition: background-color 1.6s;
  border-radius: 22px;
  background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.datocontainer {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

input[type="date"], button {
  padding: 8px;
  margin: 5px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
}

button {
  background-color: #4CAF50;
  color: white;
  border: none;
  cursor: pointer;
  padding: 10px 20px; /* Tilføj padding for at gøre knapperne større */
  font-size: 16px; /* Juster skriftstørrelse efter behov */
  border-radius: 4px;
  margin: 10px 0; /* Tilføj margin for afstand mellem knapper */
  transition: background-color 1.6s;
  
}

button:hover {
  background-color: #1518cc;
}

#chartContainer {
  background-color: antiquewhite;
  margin: 55px 100px;
  max-width: 50%;
  height: 400px; /* Juster denne værdi for at ændre højden */
  border-radius: 24px;
  position: relative;
}

#forbrugsChart {
  display: block;
  width: 100%;
  height: 100%;
}

#skiftJsonBtn {
  max-width: 150px;
}

#rawJson {
  background-color: #f4f4f4;
  padding: 10px;
  margin-top: 20px;
  white-space: pre;
  overflow-x: auto;
}

h1, h2 {
  color: #333;
}

div {
  margin-bottom: 20px;
}

.text-red {
  margin-top: 200px;
  color: red;
}

.text-green {
  color: green;
}

.text-yellow {
  color: goldenrod;
}

.dato-text {
  font-weight: bold;
  color: goldenrod;
}

#totalCost {
  font-size: 20px;
  color: #333;
  margin-top: 20px;
}

/* Responsiv CSS */
@media (max-width: 768px) {
  .header-container {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  img {
    display: none;
  }

  .header-right {
    align-items: flex-start;
  }

  .datocontainer {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 80%;
    margin: 0 auto; /* Center .datocontainer within its parent */
  }

  #clock, #dato {
    font-size: 18px;
    margin-top: 10px;
  }

  #forbrugsChart {
    margin: 20px 0;
    width: 100%;
    border-radius: 12px;
  }

  button, input[type="date"] {
    width: 100%;
  }

  nav ul {
    flex-direction: column;
    gap: 10px;
  }

  nav ul li {
    display: block;
  }

  nav ul li a {
    display: block;
    text-align: center;
  }

  .dropdown-content {
    position: static;
    box-shadow: none;
  }

  .dropdown-content a {
    display: block;
  }

  .text-under-menu {
    flex-basis: 100%;
    margin-top: 20px; /* Juster denne værdi for at ændre mellemrummet */
  }

  #chartContainer {
    background-color: antiquewhite;
    margin: 3px 3px;
    max-width: 90%;
    height: 400px; /* Juster denne værdi for at ændre højden */
    border-radius: 24px;
    position: relative;
  }

  #forbrugsChart {
    display: block;
    width: 100%;
    height: 100%;
  }
}
