@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600&family=Permanent+Marker&display=swap');

html {
  font-family: sans-serif;
}
  
table {
  border-collapse: collapse;
  /*margin: 25px 0;*/
  letter-spacing: 1px;
  font-size: 0.8rem;
  width: 300px;
  border-radius: 5px 5px 0 0;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  table-layout: fixed; /* Fix column width regardless of content length */
}

table a {
  color: black;
  text-decoration: none;
  position: relative;
}

table a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: currentColor;
  transition: width 0.2s ease;
}

table a:hover::after {
  width: 100%;
}


td, th {
  padding: 10px 20px;
}

th {
  background-color: rgb(255, 248, 150);
  text-align: left;
  font-weight: bold;
}

/* Set fixed widths for columns */
th:nth-child(1), td:nth-child(1) {
  width: 195px; /* Fixed width for first column */
}

th:nth-child(2), td:nth-child(2) {
  width: 105px; /* Fixed width for second column */
}



tr {
  height: 45px; /* Set the row height */
}

td {
  text-align: left;
  height: 45px;
  padding-bottom: 0px;
  padding-top: 0px;
}


tr:nth-child(even) td {
  background-color: rgb(250,250,250);
}

tr:nth-child(odd) td {
  background-color: rgb(245,245,245);
}

caption {
  padding: 10px;
}


* {
  box-sizing: border-box;
}
/* Create three equal columns that floats next to each other */

.top-row {
  width: auto;
  background-color: rgb(255, 248, 150);
  border-radius: 15px;
  padding: 10px;
  margin: 10px;
}

.top-row h2,
.news-row h2 {
  font-family: 'Caveat', cursive;
  text-align: center;
}

.news-row h2 {
  /*font-size: 18px;*/
  margin-top: 0px;
  margin-bottom: 0px;
  margin-right: 15px;
  margin-left: 0px;
}

.top-row p {
  text-align: center;
}


.row {
  display: flex;
  width: auto;
  justify-content: center;
  flex-wrap: wrap;
}

.news-row {
  display: flex;
  width: auto;
  justify-content: center;
  text-align: center;
  align-items: center;

  /*background-color: rgb(255, 193, 78);*/
  background-color: rgb(40, 46, 78);
  color: white;
  border-radius: 15px;
  padding: 5px 10px;

  margin-right: 10px;
  margin-left: 10px;
}


.column {
  position: relative;
  padding: 10px;
}

.column h2 {
  font-family: 'Caveat', cursive;
  text-align: center;
}


/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}

body {
  background-image: url('IMG_4106.jpg');
}

.wrapper {
  margin-top: 5%;
  margin-right: auto;
  margin-left: auto;
  margin-bottom: 5%;

  max-width: 980px;

  padding-right: 10px;
  padding-left: 10px;
  padding-top: 10px;
  padding-bottom: 10px;

  background-color: rgba(105, 158, 189, 0.8);
  border-radius: 20px;
  box-shadow: 5px 5px 25px rgba(0, 0, 0, 0.25);

}

.wrapper h1 {
  text-align: center;
  font-family: 'Permanent Marker', cursive;
  font-size: 52px;
}

.button-right {
    background-color: rgb(255, 248, 150);
    border-style: none;
    border-color: black;
    /*border-radius: 5px;*/
    border-bottom-right-radius: 5px;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-right: 15px;
    padding-left: 15px;
}

.button-left {
    background-color: rgb(255, 248, 150);
    border-style: none;
    border-color: black;
    /*border-radius: 5px;*/
    border-bottom-left-radius: 5px;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-right: 15px;
    padding-left: 15px;
}

button:hover {
    background-color: rgb(255, 239, 97);
    color: black;
}

/*
.button-container {
  position: absolute;
  bottom: -40px; 
  right: 0;
  display: flex;
  gap: 10px; 
  margin-bottom: 25px;
}
*/

.button-container {
  display: flex;
  height: 40px;
  /*gap: 10px; /* Space between buttons */
  margin-top: 0px; /* Adds spacing between table and buttons */
  margin-bottom: 25px;
  justify-content: flex-end; /* Align buttons to the right */
  background-color: rgb(245,245,245);
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;

}

.button-container .button {
  margin-left: 10px; /* Space between buttons */
}

.location-menu {
  position: sticky;
  top: 0;
  z-index: 9999;

  display: flex;
  flex-direction: column;
  align-items: left;

  color: white;
  background-color: rgb(40, 46, 78);
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  padding: 10px 30px;
  margin-top: 0px;
  margin-bottom: 20px;
  margin-left: -10px;
  margin-right: -10px;

  align-items: left;
}

.location-menu-top {
  display: flex;
  height: 15px;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  margin-left: -10px;
  margin-right: -10px;
  background-color: rgb(40, 46, 78);
}


.location-menu > ul {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
  /*overflow: hidden;*/
  background-color: none;
}


.location-menu ul li a,
.dropdown-toggle {
  display: flex;
  align-items: center;
  /*display: block;*/
  color: white;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

.location-menu ul li a:hover {
  background-color: rgb(255, 239, 97);
  color: black;
}



.location-menu h2 {
  font-size: 20px;
  margin-top: 12px;
  margin-bottom: 5px;
}



/*- Dropdown -*/

.location-menu ul.menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;

  flex-direction: column;

  background-color: rgb(40, 46, 78);
  padding: 10px 0;
  border-radius: 10px;
  min-width: 160px;
  max-height: min(600px, calc(100vh - 120px));
  overflow-y: auto;
  scroll-behavior: smooth;

  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.4) transparent;

  z-index: 10000;
}

/* Chrome / Edge / Safari */
.dropdown-menu::-webkit-scrollbar {
  width: 8px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
  background-color: rgba(255,255,255,0.4);
  border-radius: 4px;
}

.dropdown-menu.open {
  display: flex;
}


.location-menu a,
.dropdown-toggle {
  display: flex;            /* treat text like flex item */
  align-items: center;      /* vertically center the text */
  justify-content: center;  /* optional, horizontal centering inside button */
  height: 100%;             /* match parent li height */
  padding: 14px 16px;       /* same as other <a> items */
  font: inherit;            /* same font size and weight */
  line-height: 1;           /* normalize line height */
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  text-align: left;
}

.dropdown-menu a {
  padding: 10px 20px;
  white-space: nowrap;
  justify-content: flex-start; /* left align inside flex */
  text-align: left;            /* left-align text */
  
}

.dropdown-menu a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}


/*- Dropdown end-*/



.chart-row {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.chart-card {
  width: 900px;
  display: flex;
  flex-direction: column;
  border-radius: 15px;
  overflow: hidden; /* ensures rounded corners work */
}

.chart-header {
  padding: 2px;
  background-color: rgb(255, 248, 150);
  text-align: center;
}

.chart-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  background-color: white;
}

/* Chart sizes */
#curve_chart_temp,
#curve_chart_snow_depth {
  width: 100%;
  height: 300px;
}

#column_chart_snow_history {
  width: 100%;
  height: 200px;
}

#forecast_table {
  width: 100%;
  height: 550px;
  border: none;
}
