/* ---------------------------------------------------------
   GLOBAL REFRESH BANNER
--------------------------------------------------------- */
.global-refresh-banner {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 15px;
  color: #333;
}

/* ---------------------------------------------------------
   PER-DAY "NOT UPDATED" BANNER
--------------------------------------------------------- */
.update-note {
  font-size: 14px;
  font-weight: 500;
  margin: 10px 0 15px 0;
  color: #b00;
}

/* ---------------------------------------------------------
   DAILY VIEW CONTAINER
--------------------------------------------------------- */
#calendar {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: flex-start;
  width: 100%;
}

/* ---------------------------------------------------------
   WEEKLY VIEW CONTAINER
--------------------------------------------------------- */
#weekly-view {
  display: none;
  flex-direction: row;
  gap: 20px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 20px;
}

/* ---------------------------------------------------------
   WEEKLY DAY
--------------------------------------------------------- */
.weekly-day {
  flex: 0 0 650px;
  min-width: 650px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  box-sizing: border-box;
}

.weekly-day-header {
  background: #f5f8fc;
  border-bottom: 1px solid #dce5ef;

  margin: -10px -10px 12px -10px;
  padding: 12px;

  text-align: center;
  font-size: 18px;
  font-weight: 700;
}
.weekly-day.today {
  border: 2px solid #1976d2;
  box-shadow: 0 0 6px rgba(25, 118, 210, 0.4);
}

/* ---------------------------------------------------------
   WEEKLY COMPLEX ROW
--------------------------------------------------------- */
.weekly-complex-row {
  display: flex;
  gap: 8px;
  width: 100%;
  align-items: flex-start;
}

/* ---------------------------------------------------------
   COMPLEX COLUMN
--------------------------------------------------------- */
.complex {
  flex: 1 1 0;
  min-width: 420px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  box-sizing: border-box;
}

.complex-header {
  font-weight: bold;
  margin-bottom: 8px;
}

/* ---------------------------------------------------------
   WEEKLY OVERRIDE
   Allows TURF and SUMNER to appear side-by-side
--------------------------------------------------------- */
.weekly-day .complex {
  min-width: 300px;
  flex: 1 0 300px;
}

/* ---------------------------------------------------------
   TIMELINE CONTAINER
--------------------------------------------------------- */
.timeline {
  position: relative;
  height: calc((21 - 8) * 60px);
}

/* ---------------------------------------------------------
   HOURS COLUMN
--------------------------------------------------------- */
.hours {
  position: absolute;
  left: 0;
  width: 80px;
  height: 100%;
}

.hour {
  position: absolute;
  left: 0;
  font-size: 12px;
  color: #555;
}

/* ---------------------------------------------------------
   EVENTS TRACK
--------------------------------------------------------- */
.events-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
}

/* Daily view still needs room for hours */
.timeline:has(.hours) .events-track {
  left: 80px;
}

/* ---------------------------------------------------------
   BLOCKS
--------------------------------------------------------- */
.block {
  position: absolute;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px 8px;
  box-sizing: border-box;

  font-size: clamp(12px, 1vw, 16px);
  line-height: 1.25;

  white-space: normal;
  overflow-wrap: break-word;

  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;

  background: #fff;
}

/* ---------------------------------------------------------
   EVENT COLORS
--------------------------------------------------------- */
.event-block.practice {
  background: #e0e0e0;
}

.event-block.game {
  background: #d0e4ff;
}

/* ---------------------------------------------------------
   AVAILABILITY BLOCK
--------------------------------------------------------- */
.avail-block {
  background: #d9ffd9;
  border-color: #4caf50;
  padding: 8px 10px;

  font-size: clamp(10px, 1.2vw, 14px);

  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------------------------------------------------------
   BLOCK CONTENT
--------------------------------------------------------- */
.block-title {
  font-weight: bold;
  margin-bottom: 3px;
}

.block-fields {
  font-size: 12px;
  margin-bottom: 3px;
}

.block-time {
  font-size: 10px;
  color: #555;
}

/* ---------------------------------------------------------
   TOOLTIP
--------------------------------------------------------- */
.block-main {
  pointer-events: auto;
}

.block-tooltip {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 4px;

  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 4px;

  padding: 6px 8px;
  font-size: 11px;
  color: #333;

  z-index: 10;
  max-width: 260px;

  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);

  white-space: normal;
  line-height: 1.3;
}

.block:hover .block-tooltip {
  display: block;
}

/* ---------------------------------------------------------
   LEGEND
--------------------------------------------------------- */
#legend {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.legend-color {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid #ccc;
}

.legend-color.practice {
  background: #e0e0e0;
}

.legend-color.game {
  background: #d0e4ff;
}

.legend-color.available {
  background: #d9ffd9;
}

/* ---------------------------------------------------------
   CONFLICT INDICATOR
--------------------------------------------------------- */
.block.conflict {
  border: 2px solid red !important;
  box-shadow: 0 0 6px red;
  position: relative;
}

.block.conflict::after {
  content: "⚠";
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 14px;
  color: red;
}

/* ---------------------------------------------------------
   VIEW TOGGLE BUTTONS
--------------------------------------------------------- */
.view-toggle {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}

.view-toggle button {
  background: #444;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.view-toggle button:hover {
  background: #333;
}

.view-toggle button:active {
  background: #222;
}

/* ---------------------------------------------------------
   DAY NAVIGATION BUTTONS
--------------------------------------------------------- */
.day-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.day-nav button {
  background: #1976d2;
  color: white;
  border: none;
  border-radius: 10px;

  padding: 14px 22px;
  min-width: 140px;

  font-size: 18px;
  font-weight: 600;

  cursor: pointer;
  touch-action: manipulation;

  white-space: nowrap;

  transition: background 0.15s ease;
}

.day-nav button:hover {
  background: #0f5cad;
}

.day-nav button:active {
  background: #0a3f7a;
}

/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */
@media (max-width: 768px) {
  #calendar {
    flex-direction: column;
  }

  .complex {
    min-width: auto;
    width: 100%;
  }

  .hours {
    width: 60px;
  }

  .events-track {
    left: 60px;
  }

  .day-nav button {
    padding: 18px 26px;
    font-size: 20px;
    min-width: 180px;
  }

  #weekly-view {
    flex-direction: column;
  }

  .weekly-day {
    min-width: auto;
    width: 100%;
  }

  .weekly-complex-row {
    flex-direction: column;
  }

  .weekly-day .complex {
    width: 100%;
  }
}

/* ---------------------------------------------------------
   SUNSET LINE
--------------------------------------------------------- */
.sunset-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #ff7043;
  opacity: 0.85;
  pointer-events: none;
  z-index: 5;
}

.sunset-label {
  position: absolute;
  left: 0;
  font-size: 11px;
  color: #ff7043;
  background: rgba(255, 255, 255, 0.9);
  padding: 2px 4px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 6;
}


.complex-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.complex-btn {
  padding: 8px 14px;
  border: 1px solid #1976d2;
  border-radius: 20px;
  background: white;
  color: #1976d2;
  cursor: pointer;
  font-weight: 600;
}

.complex-btn.active {
  background: #1976d2;
  color: white;
}


.calendar-toolbar {
  background: white;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;

  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

#calendar-date {
  font-size: 16px;
  padding: 8px 12px;
}

.legend-sunset {
  display: inline-block;
  width: 18px;
  height: 3px;
  background: #ff7043;
  margin-top: 7px;
}



.event-block {
  z-index: 20;
}

.avail-block {
  z-index: 10;
}
