/* 既存の calendar_dashboard / events / fullscreen より後に読み込む */
#calendar-dashboard>.row.g-4>section {
  min-width: 0;
}

@media (min-width: 992px) {
  #calendar-dashboard>.row.g-4>section:first-child {
    flex: 0 0 auto;
    width: 60% !important;
  }

  #calendar-dashboard>.row.g-4>section:last-child {
    flex: 0 0 auto;
    width: 40% !important;
  }

  #calendar-dashboard.is-reversed>.row.g-4 {
    flex-direction: row-reverse;
  }
}

#calendar-dashboard #calendar-clock {
  white-space: nowrap;
  letter-spacing: -0.03em;
}

#calendar-dashboard #calendar-upcoming-list .calendar-upcoming-when,
#calendar-dashboard #calendar-upcoming-list .calendar-upcoming-title {
  font-size: clamp(1rem, 1.6vw, 1.35rem);
}

#calendar-dashboard .calendar-upcoming-row {
  padding: 9px 2px;
}

#calendar-dashboard .calendar-upcoming-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

#calendar-dashboard .calendar-weather {
  margin: 12px 0 4px;
}

#calendar-dashboard .calendar-weather-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  max-width: 520px;
}

#calendar-dashboard .calendar-weather-day {
  text-align: center;
  font-size: .8rem;
}

#calendar-dashboard .calendar-weather-icon {
  display: block;
  font-size: 1.8rem;
  line-height: 1.5;
}

#calendar-dashboard .calendar-weather-caption {
  font-size: .7rem;
  color: #a8baac;
}

#calendar-dashboard .calendar-weather-caption a {
  color: inherit;
}

#calendar-dashboard .calendar-screen-status {
  font-size: .7rem;
  color: #a8baac;
  margin-top: 4px;
}

/* Bootstrapの折り返し指定より優先し、時計を常に右へ配置 */
#calendar-dashboard header.calendar-header-fixed {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  align-items: start !important;
  gap: 16px;
  flex-direction: row !important;
}

#calendar-dashboard header.calendar-header-fixed>.calendar-header-left,
#calendar-dashboard header.calendar-header-fixed>.calendar-header-right {
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  margin-top: 0 !important;
}

#calendar-dashboard .calendar-header-left {
  grid-column: 1;
  grid-row: 1;
}

#calendar-dashboard .calendar-header-right {
  grid-column: 2;
  grid-row: 1;
  text-align: right !important;
}

#calendar-dashboard .calendar-header-right #calendar-clock {
  text-align: right !important;
}

#calendar-dashboard .calendar-header-actions {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

#calendar-dashboard .calendar-header-actions>.btn {
  margin: 0 !important;
  white-space: nowrap;
  flex-shrink: 0;
}

#calendar-dashboard .calendar-weather-caption {
  overflow-wrap: anywhere;
}

@media (max-width: 600px) {
  #calendar-dashboard header.calendar-header-fixed {
    gap: 8px;
  }

  #calendar-dashboard #calendar-clock {
    font-size: clamp(30px, 8vw, 48px) !important;
  }

  #calendar-dashboard #calendar-date {
    font-size: 1.05rem;
  }

  #calendar-dashboard .calendar-weather-days {
    gap: 1px;
  }

  #calendar-dashboard .calendar-weather-day {
    font-size: .6rem;
  }

  #calendar-dashboard .calendar-weather-icon {
    font-size: 1.2rem;
  }

  #calendar-dashboard .calendar-header-actions {
    gap: 4px;
  }

  #calendar-dashboard .calendar-header-actions>.btn {
    font-size: .65rem;
    padding: 5px;
  }
}

/* 全画面表示中は天気更新・連携設定ボタンを隠す */
#calendar-dashboard.calendar-focus-active .calendar-header-actions {
  display: none !important;
}
