/* 
- Font sizes (px)
10 / 12 / 14 / 16 / 18 / 20 / 24 / 30 / 36 / 44 / 52 / 62 / 74 / 86 / 98 
*/

button:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
  opacity: 0.6;
  cursor: not-allowed !important;
  transform: none !important;
  background-color: none !important;
  box-shadow: none !important;
}

/* *************** MAP AND CHART STRUCTURE *************** */
.map-chart-section {
  display: flex;
  gap: 3rem;
  height: 100%;
}

#map {
  flex: 2;
  height: 80vh;
}

.chart-section {
  flex: 1 1 0px;
  height: 80vh;
}

/* *************** PREAMBLE *************** */
.preamble-title {
  font-size: 3.6rem;
  margin-bottom: 1rem;
}

.preamble-text {
  font-size: 1.8rem;
  line-height: 2.2rem;
  margin-bottom: 2rem;
}

/* *************** LAYOUT SELECTOR SECTION *************** */
.change-layout-component {
  position: relative;
  display: flex;
  justify-content: end;
  margin-bottom: 2rem;
}

.change-layout-component--inner {
  cursor: pointer;
}

.change-layout-component--inner:hover .layout-options {
  display: block;
}

.change-layout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 500;
  border: none;
  background-color: #91ba91;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  transition: all 0.3s ease;
}

.change-layout-btn:hover {
  transform: scale(1.05) translateY(-3px);
}

.change-layout-btn img {
  height: 2.4rem;
  width: 2.4rem;
}

.change-layout-btn p {
  color: white;
}

.layout-options {
  display: none;
  position: absolute;
  z-index: 10000000;
  background-color: #f9f9f9;
  padding: 1rem;
}

.layout-option {
  display: flex;
  height: 8rem;
  width: 12rem;
  cursor: pointer;
  gap: 0.5rem;
}

.layout-option--two,
.layout-option--three,
.layout-option--four {
  margin: 1rem 0;
}

.layout-option:hover .lo-mini,
.layout-option:hover .lo-mini-2 {
  background-color: #c8ddc8;
}

.lo-mini {
  border: 1px solid #00000014;
  border-radius: 5px;
  background-color: #0000000a;
}

.lo-mini--right {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lo-mini-2 {
  height: 5rem;
  border: 1px solid #00000014;
  border-radius: 5px;
  background-color: #0000000a;
}

.layout-option--one .lo-mini {
  flex: 1;
}

.layout-option--two .lo-mini {
  flex: 1;
}

.layout-option--two .lo-mini--right {
  flex: 2;
}

.layout-option--three .lo-mini {
  flex: 1;
}

.layout-option--three .lo-mini--right {
  flex: 1;
}

.layout-option--four .lo-mini {
  flex: 2;
}

.layout-option--four .lo-mini--right {
  flex: 1;
}

.layout-option--five .lo-mini--right {
  flex: 1;
}

/* *************** MAP SECTION *************** */
#map {
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.marker--Airly,
.marker--PurpleAir,
.marker--EarthSense,
.marker--DefraAURN {
  background-color: #969696;
  text-align: center;
  height: 2.5rem;
  width: 2.5rem;
  border: 2px solid black;
  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: 700;
  font-size: 1.2rem;
}

.marker--PurpleAir {
  border-radius: 50%;
}

.marker--EarthSense {
  transform: rotate(45deg);
}

.marker--EarthSense span {
  transform: rotate(-45deg);
}

.marker--DefraAURN {
  width: 3.5rem;
}

.marker--DefraAURN.marker--selected {
  height: 3rem;
  width: 4rem;
  font-size: 1.4rem;
}

.marker--selected {
  height: 3rem;
  width: 3rem;
  font-size: 1.4rem;
}

.marker--1 {
  background-color: #91ff91;
}

.marker--2 {
  background-color: #2bff00;
}

.marker--3 {
  background-color: #2bc800;
}

.marker--4 {
  background-color: #ffff00;
}

.marker--5 {
  background-color: #ffc800;
}

.marker--6 {
  background-color: #ff8f00;
}

.marker--7 {
  background-color: #ff5959;
}

.marker--8 {
  background-color: #ff0000;
}

.marker--9 {
  background-color: #8e0000;
}

.marker--10 {
  background-color: #c72aff;
}

.marker--error {
  background-color: #969696;
}

.leaflet-popup-content {
  margin: 1rem !important;
}

.metadata-card p {
  margin: 0.2rem !important;
  font-size: 1rem;
}

.marker-popup p {
  margin: 0.2rem !important;
  font-size: 1.4rem;
  font-weight: 600;
}

/* Pollutants Menu */
.leaflet-top.leaflet-right .pollutants-menu {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #f1efe7;
  padding: 5px;
  border-radius: 5px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.pollutants-btn {
  background: #91ba91;
  color: white;
  border: none;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
}

.pollutants-btn:hover {
  background: #577057;
}

/* *************** CHART SECTION *************** */
.chart-container {
  padding: 0.3rem;
  background-color: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.chart-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-self: center;
}

.chart-btns {
  display: flex;
  justify-content: space-around;
}

.chart-btn {
  color: white;
  background-color: #577057;
  font-size: 1.4rem;
  padding: 1rem 2rem;
  border-radius: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
  border: none;
}

.chart-btn:hover {
  cursor: pointer;
  background-color: #2c3a4b;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Chart button popup styling */
.chart-btn {
  position: relative; /* Required for absolute positioning of the popup */
}

.chart-btn-popup {
  position: absolute;
  top: -30px; /* Position above the button */
  left: 50%;
  transform: translateX(-50%); /* Center horizontally */
  background-color: #333;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

/* Add a small triangle pointer at the bottom of popup */
.chart-btn-popup::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 5px 0;
  border-style: solid;
  border-color: #333 transparent transparent;
}

/* Show popup on hover */
.chart-btn:hover .chart-btn-popup {
  opacity: 1;
  visibility: visible;
}

/* Chart export buttons styling */
.highcharts-contextmenu {
  font-size: 10px !important;
}

.highcharts-menu-item {
  font-size: 10px !important;
}

/* *************** METADATA SECTION *************** */
.metadata-card {
  background-color: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  min-height: 10%;
}

.metadata-card .header {
  text-align: center;
  border-radius: 10px 10px 0 0;
  background-color: #91ba91;
  width: 100%;
  color: white;
  padding: 0.5rem 0;
  font-size: 1.8rem;
}

.metadata-card .main {
  padding: 1rem;
}

.metadata-card .main .preamble {
  font-weight: 700;
}

.metadata-card p {
  font-size: 1.4rem;
}

.metadata-card .extra-info {
  font-size: 1.2rem;
  color: #505050;
}

/* *************** POLLUTANTS KEY SECTION *************** */
.pollutants-key-overlay {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.8);
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  width: fit-content; /* Adjust width dynamically */
}

.pk-row {
  display: flex;
  width: 100%;
}

.pk-row:first-child {
  justify-content: space-between;
}

.pk-column {
  flex: 1;
  padding: 10px;
  text-align: center;
  border: 1px solid black;
  background: lightgray;
  cursor: pointer;
  position: relative;
}

.pk-popup {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px;
  background: black;
  color: white;
  border-radius: 3px;
  white-space: nowrap;
  display: none;
}

.pk-column:hover .pk-popup {
  display: block;
}

/* Ensure the second row's column takes the full width */
.pk-row:last-child {
  width: 100%;
}

.pk-row:last-child .pk-column {
  flex: none;
  width: 100%;
}

/* *************** MARKER KEY SECTION *************** */
.marker-key-overlay {
  border-radius: 5px;
  padding: 1rem;
  font-family: sans-serif;
  width: fit-content; /* Adjust width dynamically */

  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.mk-row {
  display: flex;
  gap: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.mk-column {
  text-align: center;
  border-radius: 3px;
}

.center-text {
  display: flex;
  justify-content: center;
  align-items: center;
}

.auto-width {
  flex: 0 1 auto; /* Column size based on content */
}

.fill-space {
  flex: 1; /* Column fills remaining space */
}

/* *************** POSTAMBLE *************** */
.postamble-text {
  font-size: 1.8rem;
  color: #505050;
  margin-top: 2rem;
}
