/* Weekly Navigation */
.week-navigation {
  text-align: center;
  margin-bottom: 20px;
}
.week-navigation .nav-arrow {
  font-size: 1.5em;
  text-decoration: none;
  color: #4285F4;
  margin: 0 15px;
  cursor: pointer;
}
.week-navigation select {
  font-size: 1em;
  padding: 5px;
}

/* Weekly Container */
.weekly-container {
  width: 95%;
  margin: 20px auto 40px;
  padding: 10px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Day Container */
.day-container {
  margin-bottom: 30px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 20px;
}
.day-header {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 5px;
  text-align: left;
}

/* Timeline for a single day */
.timeline-container-single {
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: visible;
}
.timeline-header {
  display: flex;
  background-color: #f0f0f0;
}
.room-label-header {
  width: 100px;
  flex-shrink: 0;
  text-align: center;
  font-weight: bold;
  border-right: 1px solid #ccc;
  padding: 10px 0;
}
.hours-scale {
  flex: 1;
  display: flex;
  border-bottom: 1px solid #ccc;
  background-color: #f0f0f0;
}
.hour-cell {
  flex: 1;
  text-align: left;
  padding-left: 5px;
  border-right: 1px solid #ccc;
  padding-top: 10px;
  font-size: 0.9em;
  color: #666;
}

/* Timeline Rows */
.timeline-rows {
  display: flex;
}
.room-labels {
  width: 100px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #ccc;
}
.room-label {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #ccc;
  font-size: 0.95em;
  color: #333;
  background-color: #fafafa;
}
.timeline-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
  overflow: visible;
}
.room-row {
  position: relative;
  height: 40px;
  border-bottom: 1px solid #ccc;
  box-sizing: border-box;
}

/* Extend vertical grid lines */
.timeline-main::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-image: repeating-linear-gradient(
    90deg, 
    transparent, 
    transparent calc(12.5% - 1px), 
    #ebebeb calc(12.5% - 1px), 
    #ebebeb calc(12.5%)
  );
  pointer-events: none;
  z-index: 0;
}

/* Week Event Blocks */
.week-event {
  position: absolute;
  top: 1px;
  bottom: 1px;
  border-left: 5px solid transparent;
  border-right: 1px dotted #BBB;
  border-radius: 2px;
  background-color: #EEEEEE;
  box-sizing: border-box;
  padding: 2px 4px;
  font-size: 0.75em;
  color: #333;
  cursor: pointer;
  z-index: 1;
}
.week-event .event-line {
  text-align: left;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.week-event .event-title { font-weight: bold; }
.week-event .event-teacher { font-style: italic; }

/* Dropdown Card */
.dropdown-card {
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 260px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 2px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  padding: 10px;
  margin-bottom: 2px;
  z-index: 9999;
  font-size: 1em;
}

.dropdown-table {
  width: 100%;
  border-collapse: collapse;
}

.dropdown-table td {
  padding: 2px;
  vertical-align: top;
}

.dropdown-table td:first-child {
  font-weight: bold;
  white-space: nowrap;
}
