html {
  font-size: 100%;
}

body {
  background-image: url("../images/page_background.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: white;
  font-family: Arial, sans-serif;
  margin: 0;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

main {
  background-color: rgba(0, 0, 0, 0.6);
  flex: 1;
  width: 100%;
  margin: 0 auto;
}

header {
  align-items: center;
  background-color: rgb(50, 120, 120);
  display: flex;
  justify-content: center;
}

header img {
  width: 35px;
  margin-right: 15px;
}

.city-name {
  font-size: 28px;
  font-weight: bold;
}

nav {
  background-color: rgb(255, 255, 255);
  display: flex;
  justify-content: center;
  padding-top: 10px;
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 30px;
  width: 100%;
}

a {
  color: rgb(0, 0, 0);
}

caption {
  font-size: 20px;
  margin-bottom: 15px;
  font-weight: bold;
}

.weather-table,
#stats {
  background-color: rgba(218, 230, 234, 0.75);
  border-collapse: collapse;
  border-radius: 5px;
  margin: auto;
  margin-bottom: 30px;
  overflow: hidden;
  table-layout: fixed;
  text-align: left;
  width: 75%;
}

#stats {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

#stats thead th:first-child {
  border-top-left-radius: 5px;
}

#stats thead th:last-child {
  border-top-right-radius: 5px;
}

th {
  background-color: rgb(50, 120, 120) !important;
  text-align: center;
}

td {
  color: rgb(0, 0, 0);
  padding: 10px;
  vertical-align: middle;
  text-align: center;
}

label {
  align-items: center;
  font-size: 18px;
}

.date-label {
  display: block;
}

input[type="datetime-local"] {
  padding: 12px 16px;
  font-size: 18px;
  border: 3px solid #59c1d4a4;
  border-radius: 5px;
  background: #f9fafc;
  color: #000000;
  transition: all 0.3s ease;
}

input[type="datetime-local"]:hover {
  border-color: #59c2d4;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  background-image: url("../images/calendario.png");
  cursor: pointer;
  filter: invert(0.2);
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
  filter: invert(0);
}

.date-container {
  display: grid;
  column-gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.date-container input {
  margin-top: 10px;
  padding: 5px;
}

#date-btns {
  display: flex;
  justify-content: left;
  column-gap: 20px;
}

#date-btns button {
  background: #59c2d4;
  border-radius: 5px;
  color: white;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  height: 35px;
  margin-top: 15px;
  min-width: 100px;
  transition:
    transform 120ms ease,
    filter 120ms ease,
    box-shadow 120ms ease;
}

.label,
.stats_label {
  align-items: center;
  display: flex;
  font-weight: bold;
  gap: 10px;
  width: 40%;
}

.label img,
.stats_label img {
  width: 28px;
  height: 28px;
}

.status {
  font-size: 18px;
  white-space: nowrap;
}

.stats-btn-wrap {
  display: flex;
  justify-content: center;
  margin: 20px;
}

.g_btn,
.stats-btn {
  background: rgb(50, 120, 120);
  color: rgb(255, 255, 255);
  height: 35px;
  min-width: auto;
  min-height: auto;
  border-radius: 5px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 120ms ease,
    filter 120ms ease,
    box-shadow 120ms ease;
}

.g_btn img,
#date-btns button img {
  display: none;
  width: 100%;
  height: 100%;
}

.hid-txt {
  display: none;
}

/* Modale grafico fullscreen */
#chart-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: flex-start;
  z-index: 999;
  overflow-y: auto;
}

#chart-container {
  background: rgba(255, 255, 255, 0.95);
  padding: 30px 20px 20px 20px;
  border-radius: 10px;
  color: black;
  width: 90%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 40px auto;
}

#chart-container canvas {
  width: 90%;
  max-height: 400px;
  margin-bottom: 25px;
}

#chart2 {
  width: 90%;
  max-height: 350px;
}

#outside-wrap {
  display: flex;
  justify-content: center;
  height: 100%;
}

#form-wrap {
  align-self: center;
  background-color: rgba(255, 255, 255);
  border-radius: 5px;
  border-top-right-radius: 10px;
  border-top-left-radius: 10px;
  color: rgb(0, 0, 0);
  justify-self: center;
  margin: 20px;
  text-align: center;
  width: 75%;
}

#form-wrap h2 {
  background: rgb(50, 120, 120);
  border-top-right-radius: 5px;
  border-top-left-radius: 5px;
  color: rgb(255, 255, 255);
  margin: 0;
  padding: 5px;
}

#form-wrap form {
  align-items: center;
  display: grid;
  grid-template-columns: 150px 1fr;
  margin: 0 auto;
  padding-top: 10px;
  row-gap: 5px;
}

.form-row {
  align-items: center;
  display: contents;
  width: 100%;
}

#form-top {
  padding-top: 30px;
}

.form-row label {
  text-align: right;
  padding: 10px;
}

.red-text {
  color: rgb(255, 0, 0);
  grid-column: 1 / -1;
}

#form-sub {
  display: flex;
  grid-column: 1 / -1;
  justify-content: center;
  padding-bottom: 10px;
}

#sub {
  background: rgb(50, 120, 120);
  border-radius: 5px;
  color: rgb(255, 255, 255);
  display: inline-block;
  font-size: 18px;
  font-weight: 600;
  height: fit-content;
  padding: 5px;
  width: fit-content;
}

footer {
  background-color: rgba(255, 255, 255, 0.8);
  color: rgb(0, 0, 0);
}

/* Index */
@media (max-width: 768px) {
  .status {
    display: none;
  }

  .date-container {
    grid-template-columns: 1fr;
    row-gap: 10px;
  }

  .date-container :nth-child(3) {
    grid-row: 2;
  }

  .date-container input {
    margin: 0;
  }
}

/* Index */
@media (max-width: 480px) {
  .weather-table {
    width: 80%;
  }

  .label {
    justify-self: center;
  }

  .label_txt {
    display: none;
  }

  .g_btn {
    background-color: rgb(255, 255, 255);
    min-width: 40px;
    min-height: 40px;
  }

  #date-btns button {
    background-color: rgb(255, 255, 255);
    min-width: 50px;
    min-height: 50px;
  }

  .g_btn_txt,
  #date-btns span {
    display: none;
  }

  .g_btn img,
  #date-btns button img {
    display: inline-block;
  }
}

/* Stats */
@media (max-width: 768px) {
  .stats_label {
    justify-self: center;
  }

  .stats_label_txt {
    display: none;
  }
}

/* Stats */
@media (max-width: 480px) {
  #stats {
    table-layout: auto;
  }

  .stats-btn {
    height: auto;
  }

  .show-txt {
    display: none;
  }

  .hid-txt {
    display: inline-block;
  }
}

/* St-name */
@media (max-width: 768px) {
  #form-wrap form {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .form-row label {
    padding: 5px 0 2px 0;
    text-align: center;
  }

  .form-row input,
  .form-row select {
    justify-self: center;
    width: 80%;
  }
}
