/* Global Styles */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Roboto', sans-serif;
  color: #333;
  overflow: hidden;
}
h2, h3 {
  margin-top: 5px;
  margin-bottom: 10px;
  font-size: 1.4em;
}

/* Background slideshow */
#background-slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-size: cover;
  background-position: center;
  animation: slideshow 30s infinite;
}

@keyframes slideshow {
  0% {
    background-image: url('/images/image1.webp');
  }

  33% {
    background-image: url('/images/image2.webp');
  }

  66% {
    background-image: url('/images/image3.webp');
  }

  100% {
    background-image: url('/images/image1.webp');
  }
}

/* Dashboard grid layout */
#dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "today tomorrow events"
    "date  .        events"
    "time  .        events";
  gap: 20px;
  width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
}

/* Common widget styling */
.widget {
  background: rgba(255, 255, 255, 0.8);
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Grid Areas */
#today-weather {
  grid-area: today;
}

#tomorrow-weather {
  grid-area: tomorrow;
}

#date {
  grid-area: date;
}

#time {
  grid-area: time;
}

/* Calendar specific styling */
#calendar {
  grid-area: events;
  max-height: calc(100vh - 40px); /* Account for padding */
  overflow-y: auto;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(0, 0, 0, 0.3) transparent; /* Firefox */
}

/* Webkit (Chrome, Safari, Edge) scrollbar styling */
#calendar::-webkit-scrollbar {
  width: 8px;
}

#calendar::-webkit-scrollbar-track {
  background: transparent;
}

#calendar::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

#calendar::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.5);
}

/* Weather Widget Layout */
.weather-widget {
  display: flex;
  align-items: center;
  gap: 10px;
}

.weather-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.weather-details {
  flex: 1;
}

.temp-row {
  font-size: 2.5em;
  /* Actual temperature very large */
  font-weight: bold;
  display: flex;
  align-items: baseline;
}

.temp-row .feels-like {
  font-size: 0.5em;
  margin-left: 10px;
  color: #555;
}

.rain-row,
.wind-row {
  font-size: 1.2em;
  margin-top: 5px;
}

/* Date & Time Styling */
.datetime {
  text-align: center;
  font-size: 1.7em;
  color: #222;
}

#current-date sup {
  font-size: 0.8em !important;
  /*font-style: italic;*/
}

#time {
  font-size: 3em;
  font-weight: bold;
}

.high-low-temp {
  font-size: 1em;
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
}

.sun-times {
  font-size: 1em;
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
}

.sunrise img,
.sunset img {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

/* Calendar events card styling */
.event-icon {
  width: 32px;
  /* Make icon bigger */
  height: 32px;
  /* Make icon bigger */
  margin-right: 5px;
  vertical-align: middle;
  float: left;
  /* Float to the left */
}

/* Calendar events card styling */
.card {
  background: rgba(255, 255, 255, 0.9);
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 5px;
  position: relative;
  overflow: hidden;

}

/* Event icon styling */
.event-icon {
  width: 40px;
  height: 40px;
  margin-right: 5px;
  vertical-align: middle;
}

/* Example event classifications */
.event-bin {
  border-left: 5px solid grey;
}

.event-plastics {
  border-left: 5px solid blue;
}

.event-cardboard {
  border-left: 5px solid darkblue;
}

.event-garden {
  border-left: 5px solid green;
}

.event-kids {
  border-left: 5px solid pink;
}

.birthdays {
  margin-top: 30px;
  text-align: left;
  font-size: 0.6em;
}

.birthday {
  margin: 2px 0;
  color: #555;
}

.birthday-icon {
  width: 40px;
  height: 40px;
  vertical-align: middle;
  margin-right: 5px;
}

/* Sign-in button styles */
#sign-in-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 15px 30px;
  font-size: 1.5em;
  background-color: #4285f4;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#sign-in-button:hover {
  background-color: #357abd;
}

.hidden {
  display: none !important;
}

/* Event section styling */
.events-section {
  margin-bottom: 20px;
}

.events-section h3 {
  color: #333;
  margin-bottom: 10px;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

.no-events {
  color: #666;
  font-style: italic;
  margin: 5px 0;
}

.event-time {
  color: #666;
  font-size: 0.9em;
  margin-left: 10px;
}

.card {
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Bottom menu styles */
#bottom-menu {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 10px;
  z-index: 9999;
  text-align: center;
}

.menu-trigger {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  background: rgba(255,255,255,0.9);
  border-radius: 50px;
  padding: 5px 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.menu-trigger:hover {
  background: rgba(255,255,255,1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.menu-trigger .circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  margin-right: 15px;
  border: 2px solid rgba(0, 0, 0, 0.1);
}

.menu-trigger .circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-trigger .line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-trigger .title {
  font-weight: bold;
  font-size: 1.1em;
  color: #333;
}

.menu-trigger .dropdown-arrow {
  transition: transform 0.3s ease;
  color: #555;
  font-size: 0.9em;
  display: flex;
  align-items: center;
}

.menu-trigger.menu-open .dropdown-arrow {
  transform: rotate(180deg);
}

#menu-options {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  list-style: none;
  margin: 0 0 10px 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  display: block;
  width: auto;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(10px);
  transition: all 0.3s ease;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

#menu-options.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

#menu-options li {
  margin: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#menu-options li:last-child {
  border-bottom: none;
}

#menu-options a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 12px 20px;
  display: block;
  transition: background-color 0.2s;
}

#menu-options a:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.hidden {
  display: none !important;
}

.emoji-img {
  width: 40px;
  height: 40px;
  cursor: pointer;
  margin: 5px;
}