/* Dark Theme */
body {
  margin: 0;
  padding: 0;
  background-color: #212121;
  color: #CCCCCC;
  font-family: "Segoe UI", Arial, sans-serif;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Dashboard grid */
#dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* 2 columns */
  grid-template-rows: repeat(12, 1fr); /* 12 flexible rows */
  grid-gap: 30px;
  width: 600px;
  height: 1024px;
  transform-origin: top left;
}


/* Card styling */
.card {
  background-color: #181818;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 1.1em;
  border-bottom: 1px solid #333;
  padding-bottom: 5px;
}

/* Grid positioning for each widget */
.clock {
  grid-column: 1;        /* left side */
  grid-row: 1 / span 2;  /* taller block */
}


/* #region Maps Styles */
.maps {
  grid-column: 2;        /* right side */
  grid-row: 1 / span 5;  /* large block */
  display: flex;
  flex-direction: column;
  position: relative; /* required for absolute overlay inside card */
}

#maps-banner {
  width: 100%;
  height: 80px;        /* make the banner thinner */
  overflow: hidden;
  margin-top: -10px;       /* push closer to top */
  margin-bottom: -10px;
  border-radius: 8px 8px 0 0; /* keep rounded corners */

  display: flex;
  justify-content: center; /* horizontal center */
  align-items: center;     /* vertical center */
}

/* Specific styling for UH logo */
#maps-banner img.uh-logo {
  height: 62%;            /* smaller than Leonardo */
  width: auto;            /* maintain aspect ratio */
  object-fit: contain;    /* fit inside container without cropping */
}

#maps-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* scales image to fill container, crops if needed */
  display: block;
}

#maps-route {
  width: 100%;
  height: 250px;           /* larger display area */
  overflow: hidden;        /* crop excess */
  border-radius: 8px;
  position: relative;
}

#maps-route img {
  width: 130%;             /* scale up 15% on each side */
  height: 100%;
  object-fit: cover;       /* fill container while cropping edges */
  object-position: center; /* keep center in view */
  display: block;
  margin-left: -15%;       /* shift left to crop evenly on both sides */
}

#maps-container hr {
  border: none;
  border-top: 1px solid #444;
  margin: 0.5em 0;
}

#maps-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between; /* top content stays at top, info at bottom */
  padding: 0.5em; /* optional spacing */
}
#maps-info {
  display: flex;
  justify-content: space-between; /* Travel left, ETA right */
  align-items: center;
  font-size: 1em;
  padding: 0.3em 0 0 0;
  white-space: nowrap; /* Prevent wrapping */
  font-weight: bold;
}

#maps-info span {
  flex: 0 1 auto; /* Prevent stretching, keep content width */
}

#maps-info .divider {
  margin: 0 0.5em;
}

#maps-inactive {
  display: none;
  position: absolute;         /* overlay inside the map card */
  top: 50%;                   /* vertical center */
  left: 50%;                  /* horizontal center */
  transform: translate(-50%, -50%); /* true center */
  text-align: center;
  z-index: 5;
}

#maps-inactive p {
  margin-bottom: 0.5em;
  font-size: 1.2em;
}

#maps-inactive button {
  background-color: orange;
  color: white;
  border: none;
  padding: 0.5em 1em;
  border-radius: 4px;
  cursor: pointer;
}



/* #endregion */



/* Container card */
.todo {
  grid-column: 1;
  grid-row: 3 / span 4;
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: sans-serif;
}

/* Header */
.todo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-weight: bold;
  font-size: 1rem;
  border-bottom: 1px solid #555;
  padding-bottom: 4px;
}

/* Circle indicators container */
#todo-list-indicators {
  display: flex;
  gap: 4px;
}

/* Individual task list */
#todo-tasks {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  flex-grow: 1;
  flex: 1;           /* take remaining vertical space */
  overflow-y: hidden; /* hide overflow if we do manual paging */

}

#todo-tasks li {
  padding: 6px 8px;
  margin-bottom: 4px;
  border-radius: 4px;
  background-color: #1e1e1e;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
  transition: background-color 0.2s;
}

#todo-tasks li:hover {
  background-color: #2b2b2b;
}

/* Page indicator at bottom right */
#todo-page-indicator {
  text-align: right;
  font-size: 0.85rem;
  color: #ccc;
  margin-top: auto;
  flex-shrink: 0;
}

/* Circle colors */
#todo-list-indicators span {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #ccc;
}

/* Colors for active/loaded/spare */
#todo-list-indicators span.active {
  background-color: orange;
  border-color: orange;
}

#todo-list-indicators span.loaded {
  background-color: white;
  border-color: #ccc;
}

#todo-list-indicators span.spare {
  background-color: #555;
  border-color: #555;
}



.calendar {
  grid-column: 2;
  grid-row: 6 / span 7;  /* large block under maps */
}

.calendar {
  font-size: 0.9em;
}

#calendar-header {
  text-align: center;
  margin-bottom: 8px;
  font-weight: bold;
}

.calendar-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #444;
  padding: 4px 8px;
  min-height: 65px;
}

.events-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.event-item {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  font-size: 0.85em;
  margin-bottom: 2px;
}


.date-container {
  width: 60px;
  text-align: right;
  font-weight: bold;
}

.calendar-row.highlight {
  color: orange;
  font-weight: bold;
}


.email {
  grid-column: 1;
  grid-row: 7 / span 4;  /* same height as todo */
}

.weather {
  grid-column: 1;
  grid-row: 11 / span 2;
}

#weather {
  display: flex;
  flex-direction: column; /* stack children vertically */
  justify-content: flex-start;
}


/* Forecast rows into 7 columns */
#forecast-table > div {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 5px;
  margin-bottom: 6px;
  margin-top: 7px;
}

/* Highlight only text colour */
#forecast-table .highlight {
  color: orange;
  font-weight: bold;
}

/* Summary underneath, centered */
#summary {
  text-align: center;
  margin-top: 6px;
  font-size: 0.9em;
}







/* Special styling per widget */
.clock #clock {
  font-size: 3em;
  text-align: center;
  margin: 7px 0;
}
#day-tracker {
  display: flex;
  justify-content: center; /* center the letters */
  gap: 18px;                /* spacing between letters */
  font-size: 1.2em;
}
#day-tracker span {
  color: #CCCCCC;          /* default color */
}
#day-tracker span.active {
  color: orange;           /* highlight current day */
}


#todo-list {
  list-style: none;
  padding: 0;
}
#todo-list li {
  padding: 5px 0;
  border-bottom: 1px solid #333;
}

#calendar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}
#calendar div {
  border-bottom: 1px solid #333;
  padding: 5px;
}

#email-list div {
  border-bottom: 1px solid #333;
  padding: 5px 0;
  font-size: 0.9em;
}

.weather #weather {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1em;
}
