/* Base reset & font */
body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  background-color: #ffffff;
  color: #333;
  padding: 2rem;
}

/* Header styling */
.main-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.2rem 0;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 2rem;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-img {
  width: 40px;
  height: auto;
  margin-right: 0.8rem;
}

.main-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: rgb(20, 56, 127);
}

/* Chart container */
.chart-container {
  max-width: 1000px;
  margin: 0 auto;
  background-color: #f9f9f9;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Ensure the chart gets a proper height */
#chart {
  width: 100%;
  height: 350px; /* Set a fixed height */
}

/* Style for the range buttons container */
.range-buttons {
  display: flex;
  justify-content: center; /* Center the buttons */
  gap: 10px; /* Space between the buttons */
  margin: 20px 0; /* Margin above and below */
}

/* Style for each button */
.range-buttons button {
  background-color: #4caf50; /* Green background */
  color: white; /* Text color */
  font-size: 16px;
  padding: 5px 10px; /* Vertical and horizontal padding */
  border: none;
  border-radius: 8px; /* Rounded corners */
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s ease-in-out; /* Smooth transition */
  font-weight: bold;
}

/* Hover effect */
.range-buttons button:hover {
  background-color: #45a049; /* Slightly darker green on hover */
  transform: translateY(-2px); /* Lift the button */
}

/* Active button state */
.range-buttons button.active {
  background-color: #ff5733; /* Red color for active */
  transform: translateY(0); /* Reset transform */
}

/* Optional: focus state for accessibility */
.range-buttons button:focus {
  outline: none; /* Remove the default focus outline */
  box-shadow: 0 0 5px rgba(255, 87, 51, 0.7); /* Glow effect */
}

.min-max-container {
  margin: 2rem auto;
  padding: 1rem 2rem;
  max-width: 900px;
  background-color: #f4f4f4;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  font-family: "Poppins", sans-serif;
}

.min-max-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
  color: #333;
}

.min-max-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  border-bottom: 1px solid #ccc;
  padding: 0.5rem 0;
}

.min-max-label {
  flex: 1 1 30%;
  font-weight: 500;
  color: #444;
}

.min-max-values {
  flex: 1 1 65%;
  text-align: right;
  color: #222;
}

/* widgety čidel */
.widget-container {
  display: flex;
  flex-wrap: wrap; /* Allows widgets to wrap on smaller screens */
  justify-content: center;
  gap: 1rem;
  margin: 1rem auto;
  padding: 1rem 0;
}

.widget {
 
  border-radius: 2rem;
  padding: 1.2rem;
  width: 150px;
  height: 150px; /* Ensuring the widget is square */
  text-align: center;
  font-family: "Poppins", sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
   transition: background-color 0.3s;
}

/* Škála teplot -15°C až 30°C, prodloužená studená část, rychlý přechod 20-30°C */
.widget.temp-15 { background: linear-gradient(to bottom, #800080 0%, #5a005a 100%); color: white; }
.widget.temp-14 { background: linear-gradient(to bottom, #660066 0%, #4d004d 100%); color: white; }
.widget.temp-13 { background: linear-gradient(to bottom, #001a40 0%, #000f28 100%); color: white; }
.widget.temp-12 { background: linear-gradient(to bottom, #00204d 0%, #001433 100%); color: white; }
.widget.temp-11 { background: linear-gradient(to bottom, #00264d 0%, #001a33 100%); color: white; }
.widget.temp-10 { background: linear-gradient(to bottom, #003366 0%, #001f33 100%); color: white; }
.widget.temp-9  { background: linear-gradient(to bottom, #003d80 0%, #00295c 100%); color: white; }
.widget.temp-8  { background: linear-gradient(to bottom, #004299 0%, #002f66 100%); color: white; }
.widget.temp-7  { background: linear-gradient(to bottom, #004d99 0%, #003366 100%); color: white; }
.widget.temp-6  { background: linear-gradient(to bottom, #0059b3 0%, #003d80 100%); color: white; }
.widget.temp-5  { background: linear-gradient(to bottom, #0066cc 0%, #004d99 100%); color: white; }
.widget.temp-4  { background: linear-gradient(to bottom, #339966 0%, #1a6640 100%); color: white; }
.widget.temp-3  { background: linear-gradient(to bottom, #339966 0%, #1a6640 100%); color: white; }
.widget.temp-2  { background: linear-gradient(to bottom, #66cc66 0%, #339933 100%); color: black; }
.widget.temp-1  { background: linear-gradient(to bottom, #66cc66 0%, #339933 100%); color: black; }
.widget.temp0   { background: linear-gradient(to bottom, #99d699 0%, #66b366 100%); color: black; }
.widget.temp1   { background: linear-gradient(to bottom, #99d699 0%, #66b366 100%); color: black; }
.widget.temp2   { background: linear-gradient(to bottom, #cce5cc 0%, #99cc99 100%); color: black; }
.widget.temp3   { background: linear-gradient(to bottom, #cce5cc 0%, #99cc99 100%); color: black; }
.widget.temp4   { background: linear-gradient(to bottom, #ccf2ff 0%, #99e6ff 100%); color: black; }
.widget.temp5   { background: linear-gradient(to bottom, #ccf2ff 0%, #99e6ff 100%); color: black; }
.widget.temp6   { background: linear-gradient(to bottom, #99e6ff 0%, #66ccff 100%); color: black; }
.widget.temp7   { background: linear-gradient(to bottom, #99e6ff 0%, #66ccff 100%); color: black; }
.widget.temp8   { background: linear-gradient(to bottom, #66ccff 0%, #3399ff 100%); color: black; }
.widget.temp9   { background: linear-gradient(to bottom, #66ccff 0%, #3399ff 100%); color: black; }
.widget.temp10  { background: linear-gradient(to bottom, #66d9ff 0%, #3399cc 100%); color: black; }
.widget.temp11  { background: linear-gradient(to bottom, #66d9ff 0%, #3399cc 100%); color: black; }
.widget.temp12  { background: linear-gradient(to bottom, #99ffcc 0%, #66cc99 100%); color: black; }
.widget.temp13  { background: linear-gradient(to bottom, #99ffcc 0%, #66cc99 100%); color: black; }
.widget.temp14  { background: linear-gradient(to bottom, #99ffcc 0%, #66cc99 100%); color: black; }
.widget.temp15  { background: linear-gradient(to bottom, #99ffcc 0%, #66cc99 100%); color: black; }
.widget.temp16  { background: linear-gradient(to bottom, #99ffcc 0%, #66cc99 100%); color: black; }
.widget.temp17  { background: linear-gradient(to bottom, #99ffcc 0%, #66cc99 100%); color: black; }
.widget.temp18  { background: linear-gradient(to bottom, #99ffcc 0%, #66cc99 100%); color: black; }
.widget.temp19  { background: linear-gradient(to bottom, #99ffcc 0%, #66cc99 100%); color: black; }
.widget.temp20  { background: linear-gradient(to bottom, #ccff99 0%, #99cc66 100%); color: black; }
.widget.temp21  { background: linear-gradient(to bottom, #ccff99 0%, #99cc66 100%); color: black; }
.widget.temp22  { background: linear-gradient(to bottom, #ccff99 0%, #99cc66 100%); color: black; }
.widget.temp23  { background: linear-gradient(to bottom, #ffe066 0%, #cc9900 100%); color: black; }
.widget.temp24  { background: linear-gradient(to bottom, #ff9933 0%, #cc6600 100%); color: white; }
.widget.temp25  { background: linear-gradient(to bottom, #ff3300 0%, #660000 100%); color: white; }
.widget.temp26  { background: linear-gradient(to bottom, #cc0000 0%, #660000 100%); color: white; }
.widget.temp27  { background: linear-gradient(to bottom, #cc0000 0%, #660000 100%); color: rgb(255, 228, 139); }
.widget.temp28  { background: linear-gradient(to bottom, #b30000 0%, #660000 100%); color: rgb(255, 215, 39); }
.widget.temp29  { background: linear-gradient(to bottom, #ff0000 0%, #800000 100%); color: rgb(255, 180, 42); }
.widget.temp30  { background: linear-gradient(to bottom, #d81bc8 0%, #3b083d 100%); color: rgb(11, 186, 255); }


.widget h2 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.widget .temp {
  font-size: 2rem;
  font-weight: 600;
  margin: 0.2rem 0;
}

.widget .hum {
  font-size: 1.5rem;
  font-weight: 400;
  margin-top: 0.2rem;
}

.widget-timestamp {
  text-align: center;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1rem;
  margin-top: -1rem;
}

@media (max-width: 600px) {
  .min-max-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .min-max-values {
    text-align: left;
    margin-top: 0.3rem;
  }
  .widget {
    width: 45vw; /* Adjust width to 45% of the viewport width */
    height: 45vw; /* Keep height equal to width to maintain the square shape */
  }
}
