/* 2026-11-05 主題課程列表（/online-course）
   - 月曆（預設展開）與點選日期後的提示列（電腦版＋手機版；電腦版右側列出場次）
   - 程度可複選按鈕、類別按鈕選取狀態（電腦版＋手機版）
   - 手機版：一列一張的橫式課程卡片
   圓角與現有課程卡片一致；主色 Charcoal Blue #143D4F、Rusty Spice #AA4C25。 */

/* ---------- 月曆（電腦版、手機版） ---------- */
.nvCalLayout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 20px;
  margin-top: 12px;
}

.nvCalLayout.is-collapsed {
  display: none;
}

.nvMonthCal {
  padding: 20px 20px 16px;
  border-radius: 10px;
  background: #fff;
  color: #143d4f;
}

/* 電腦版右側：選取日期的場次，未選取時列出近期場次 */
.nvCalPanel {
  padding: 22px 24px;
  border-radius: 10px;
  background: #fff;
  color: #143d4f;
}

.nvCalPanel .nvCalPanelTitle {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #aa4c25;
  color: #143d4f;
  font-size: 18px;
  font-weight: 700;
}

.nvCalPanelList {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nvCalPanelList li + li {
  border-top: 1px dashed #dce3e5;
}

.nvCalPanelList a {
  display: flex;
  gap: 14px;
  padding: 11px 2px;
  color: #143d4f;
  text-decoration: none;
}

.nvCalPanelList a:hover .nvCalPanelName {
  color: #aa4c25;
  text-decoration: underline;
}

.nvCalPanelTime {
  flex: 0 0 auto;
  min-width: 48px;
  color: #71858a;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.nvCalPanelName {
  font-size: 15px;
  line-height: 1.55;
}

/* 平板寬度：場次時間放在課名上方，避免課名被擠成好幾行 */
@media (max-width: 1100px) {
  .nvCalPanelList a {
    flex-direction: column;
    gap: 2px;
  }
}

.nvCalHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.nvCalTitle {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .08em;
}

.nvCalNav {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #dce3e5;
  border-radius: 50%;
  background: #fff;
  color: #143d4f;
  font-size: 16px;
}

.nvCalNav:disabled {
  opacity: .3;
}

.nvCalWeek,
.nvCalGrid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.nvCalWeek span {
  padding: 6px 0;
  color: #71858a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}

.nvCalGrid {
  row-gap: 4px;
}

.nvCalDay {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 44px;
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #b9c3c6;
  font-size: 15px;
  line-height: 1;
}

.nvCalDay.has-course {
  color: #143d4f;
  font-weight: 700;
}

.nvCalDay.has-course::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: #aa4c25;
}

.nvCalDay.is-today {
  box-shadow: inset 0 0 0 1.5px #d58e2b;
}

.nvCalDay.is-selected {
  background: #143d4f;
  color: #fff;
}

.nvCalDay.is-selected::after {
  background: #f3e8d7;
}

.nvCalHint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 2px 0;
  color: #71858a;
  font-size: 12px;
}

.nvCalHint::before {
  content: "";
  flex: 0 0 5px;
  height: 5px;
  border-radius: 50%;
  background: #aa4c25;
}

/* ---------- 點選日期後的提示列 ---------- */
.nvDateFilterBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #143d4f;
  color: #fff;
}

.nvDateFilterBar[hidden],
.nvDateEmpty[hidden] {
  display: none;
}

.nvDateFilterText {
  font-size: 14px;
  line-height: 1.5;
}

.nvDateFilterText strong {
  font-weight: 700;
}

.nvDateFilterReset {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #f3e8d7;
  border-radius: 17px;
  background: transparent;
  color: #f3e8d7;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.nvDateEmpty {
  display: block;
  margin: 14px 0 0;
  padding: 22px 16px;
  border-radius: 10px;
  background: #fff;
  color: #344a52;
  font-size: 14px;
  text-align: center;
}

/* ---------- 篩選：程度（可複選）與類別 ---------- */
.nvFilterRow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0 0 12px;
}

.nvFilterLabel {
  flex: 0 0 auto;
  min-width: 40px;
  color: #143d4f;
  font-size: 14px;
  font-weight: 700;
}

.nvLevelChips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nvLevelChip {
  min-width: 56px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background: #fff;
  color: #333;
  font-size: 15px;
  letter-spacing: .02em;
  cursor: pointer;
}

.nvLevelChip.is-active,
.root .selectWrap .categoryButtons .categoryBtn.active {
  border-color: #143d4f;
  background: #143d4f;
  color: #fff;
}

.root .selectWrap .categoryButtons .categoryBtn {
  height: 40px;
}

.root .selectWrap {
  flex-wrap: wrap;
  column-gap: 28px;
}

.root .selectWrap .categoryButtons {
  margin: 0;
}

.root .onlineList .onlineItem.is-date-hidden {
  display: none !important;
}

.nvLevelChip:focus-visible,
.nvCalDay:focus-visible,
.nvCalNav:focus-visible,
.nvDateFilterReset:focus-visible {
  outline: 3px solid #d58e2b;
  outline-offset: 2px;
}


@media (max-width: 768px) {
  /* ---------- 手機版月曆：只顯示月曆，不顯示右側場次 ---------- */
  .root .calendar {
    margin-bottom: 24px !important;
  }

  .nvCalLayout {
    display: block;
  }

  .nvMonthCal {
    padding: 16px 12px 14px;
  }

  .nvCalPanel {
    display: none;
  }

  /* ---------- 手機版篩選 ---------- */
  .nvFilterRow {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
  }

  .nvLevelChips,
  .root .selectWrap .categoryButtons {
    gap: 6px;
  }

  .nvLevelChip {
    min-width: 44px;
    height: 38px;
    padding: 0 10px;
    font-size: 14px;
  }

  .root .selectWrap .categoryButtons .categoryBtn {
    height: 38px;
    margin: 0;
    padding: 0 14px;
    font-size: 14px;
  }

  /* ---------- 手機版課程卡片：一列一張，圖片在左 ---------- */
  .root .threeItemList.onlineList {
    display: block !important;
    margin-top: 16px;
  }

  .root .onlineList .mOnlineItem {
    width: auto !important;
    margin: 0 0 12px !important;
    padding: 12px !important;
    border-radius: 10px !important;
  }

  .root .onlineList .mOnlineItem.is-date-hidden {
    display: none !important;
  }

  .root .onlineList .mOnlineItem .cellLeft {
    display: grid !important;
    grid-template-columns: 47% minmax(0, 1fr);
    grid-template-areas:
      "fig meta"
      "fig sel"
      "fig btns"
      "title title"
      "desc desc";
    grid-template-rows: auto auto 1fr auto auto;
    column-gap: 12px;
    row-gap: 8px;
    height: auto !important;
  }

  .root .onlineList .mOnlineItem figure {
    grid-area: fig;
    align-self: stretch;
    width: 100% !important;
    height: auto !important;
    min-height: 112px;
    margin: 0 !important;
    border-radius: 13px !important;
    background-position: center;
  }

  .root .onlineList .mOnlineItem .noteList {
    grid-area: fig;
    align-self: end;
    justify-self: end;
    width: auto !important;
    margin: 0 4px 4px 0 !important;
    gap: 2px;
    z-index: 2;
  }

  .root .onlineList .mOnlineItem .noteList .note {
    width: 22px !important;
    height: 22px !important;
    font-size: 11px !important;
    line-height: 22px !important;
  }

  .root .onlineList .mOnlineItem .tags {
    grid-area: fig;
    align-self: start;
    justify-self: start;
    z-index: 2;
  }

  .root .onlineList .mOnlineItem .featuredCourseBadge {
    grid-area: fig;
    position: relative !important;
    top: 0 !important;
    right: auto !important;
    align-self: start;
    justify-self: end;
    width: 64px !important;
    height: 64px !important;
    overflow: hidden;
    border-top-right-radius: 13px;
    z-index: 2;
  }

  .root .onlineList .mOnlineItem .featuredCourseBadgeBand {
    scale: .75;
  }

  .root .onlineList .mOnlineItem .courseMetaLine {
    grid-area: meta;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin: 0 !important;
  }

  .root .onlineList .mOnlineItem .courseMetaLine .schoolLabel {
    font-size: 13px;
  }

  .root .onlineList .mOnlineItem .onlineCourseSelect {
    grid-area: sel;
    width: 100% !important;
    height: 38px !important;
    margin: 0 !important;
    padding: 0 6px !important;
    font-size: 12px !important;
  }

  /* [課程介紹｜搶先預約] 合併成一顆膠囊按鈕 */
  .root .onlineList .mOnlineItem .roundBtns {
    grid-area: btns;
    align-self: end;
    display: flex !important;
    flex-direction: row !important;
    gap: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    border-radius: 19px;
    background: #143d4f;
  }

  .root .onlineList .mOnlineItem .roundBtns button {
    flex: 1 1 0;
    width: auto !important;
    height: 38px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: #143d4f;
    color: #fff;
    font-size: 13px !important;
    font-weight: 700;
    letter-spacing: .04em;
  }

  .root .onlineList .mOnlineItem .roundBtns button:disabled {
    opacity: 1;
    color: rgba(255, 255, 255, .45);
  }

  .root .onlineList .mOnlineItem .roundBtns .divider {
    display: block !important;
    flex: 0 0 1px;
    align-self: stretch;
    margin: 9px 0;
    background: rgba(243, 232, 215, .45);
  }

  .root .onlineList .mOnlineItem .title {
    grid-area: title;
    margin: 4px 0 0 !important;
  }

  .root .onlineList .mOnlineItem .title h2 {
    color: #aa4c25 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
  }

  .root .onlineList .mOnlineItem .desc {
    grid-area: desc;
    display: -webkit-box !important;
    margin: 0 !important;
    overflow: hidden;
    color: #344a52 !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2 !important;
  }
}
