/* ==========================================================================
   LIVE VISUAL CALENDAR — component styles
   Used on calendar-only.html. Uses the same CSS variables (--surface,
   --border, --primary, --accent2, --text, --text-muted, etc.) already
   defined in assets/common.css, so it automatically matches whichever
   theme (light/dark) is active — no separate light/dark rules needed here.
   ========================================================================== */

/* "Live ক্যালেন্ডার ভিউ" scroll-to button, next to the back-home link */
.lc-view-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; text-decoration: none;
  font-size: .82rem; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 4px 14px rgba(21,128,61,.3);
  transition: transform .15s, box-shadow .15s;
}
.lc-view-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(21,128,61,.4); }

/* Section wrapper */
.live-cal-section {
  margin: 28px 0 20px; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 6px 26px rgba(21,128,61,.07);
  scroll-margin-top: 74px;
}
.live-cal-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.live-cal-head h2 { font-family: 'Ekushey Lal Sabuj', sans-serif; font-size: 1.02rem; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 9px; }
.live-cal-head h2 i { color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: .8rem; }
.live-cal-hint { font-size: .74rem; color: var(--text-muted); margin: 4px 0 14px; line-height: 1.6; }

/* Month navigation */
.live-cal-nav { display: flex; align-items: center; gap: 6px; padding: 3px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--border); }
.lc-nav-btn { width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--text); cursor: pointer; display: grid; place-items: center; font-size: .74rem; transition: background .2s, color .2s; }
.lc-nav-btn:hover { background: var(--primary); color: #fff; }
.lc-month-label { font-weight: 800; font-size: .86rem; color: var(--text); min-width: 118px; text-align: center; }

/* Weekdays */
.live-cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.live-cal-weekdays span { text-align: center; font-size: .68rem; font-weight: 800; color: var(--text-muted); padding: 5px 0; border-radius: 8px; background: var(--bg2); }
.live-cal-weekdays span:first-child, .live-cal-weekdays span:last-child { color: var(--accent2); }

/* Day grid */
.live-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.lc-day {
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  min-height: 92px; min-width: 0; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface2); padding: 6px; display: flex; flex-direction: column; gap: 4px; overflow: hidden;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.lc-day:hover { border-color: var(--primary-hi); transform: translateY(-1px); }
.lc-day.lc-empty { background: transparent; border-color: transparent; cursor: default; pointer-events: none; }
.lc-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.lc-daynum { font-size: .8rem; font-weight: 800; color: var(--text-muted); line-height: 1; }
.lc-badge { display: none; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: var(--primary); color: #fff; font-size: .62rem; font-weight: 800; align-items: center; justify-content: center; }

/* Today */
.lc-day.lc-today { border-color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--primary); }
.lc-day.lc-today .lc-daynum { color: #fff; background: var(--primary); border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; font-size: .72rem; }

/* Exam days */
.lc-day.has-exam { background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 13%, var(--surface)), color-mix(in srgb, var(--accent) 8%, var(--surface))); border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.lc-day.has-exam .lc-daynum { color: var(--primary-hi); }
.lc-day.has-exam.lc-today .lc-daynum { color: #fff; }
.lc-day.lc-selected { border-color: var(--accent2); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent2) 55%, transparent); }

/* Tags (desktop/tablet) */
.lc-tags { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lc-tag { font-size: .62rem; line-height: 1.3; font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); border-radius: 6px; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-more { font-size: .6rem; font-weight: 700; color: var(--primary-hi); padding: 0 2px; }
.lc-dots { display: none; gap: 3px; margin-top: auto; }
.lc-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); display: block; }

/* Selected-day detail card */
.lc-detail { margin-top: 14px; padding: 14px; border-radius: 16px; background: var(--surface2); border: 1px solid var(--border); }
.lc-detail.lc-pop { animation: lcPop .25s ease both; }
@keyframes lcPop { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.lcd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.lcd-head b { font-size: .92rem; color: var(--text); }
.lcd-count { font-size: .7rem; font-weight: 800; color: var(--primary-hi); background: color-mix(in srgb, var(--primary) 14%, transparent); padding: 3px 10px; border-radius: 99px; }
.lcd-empty { font-size: .8rem; color: var(--text-muted); }
.lcd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.lcd-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary); }
.lcd-dot { display: none; }
.lcd-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lcd-name { font-size: .86rem; font-weight: 700; color: var(--text); line-height: 1.35; overflow-wrap: anywhere; }
.lcd-unit { align-self: flex-start; font-size: .7rem; font-weight: 700; color: var(--primary-hi); background: color-mix(in srgb, var(--primary) 12%, transparent); padding: 2px 9px; border-radius: 99px; }
.lcd-time { flex-shrink: 0; font-size: .72rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.lcd-time i { color: var(--accent2); }

/* Mobile: compact cells (count + dots); full names appear in the detail card */
@media (max-width: 700px) {
  .live-cal-section { padding: 12px; border-radius: 16px; }
  .live-cal-grid, .live-cal-weekdays { gap: 4px; }
  .lc-day { min-height: 54px; padding: 5px 4px; border-radius: 10px; align-items: center; gap: 3px; }
  .lc-top { width: 100%; justify-content: center; position: relative; }
  .lc-daynum { font-size: .76rem; }
  .lc-badge { display: none; }
  .lc-tags { display: none; }
  .lc-dots { display: flex; margin-top: 0; }
  .live-cal-weekdays span { font-size: .6rem; padding: 4px 0; }
  .lc-month-label { min-width: 96px; font-size: .8rem; }
  .live-cal-head { justify-content: center; }
  .live-cal-head h2 { font-size: .94rem; }
  .lcd-list { grid-template-columns: 1fr; }
  .lc-detail { padding: 12px; }
}

/* Live clock row + "today" button */
.lc-live-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 6px 0 10px; }
.lc-now { display: inline-flex; align-items: center; gap: 7px; font-size: .76rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.lc-now b { color: var(--text); font-weight: 800; }
.lc-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,.6); animation: lcPulse 1.6s infinite; flex-shrink: 0; }
@keyframes lcPulse { 70% { box-shadow: 0 0 0 7px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); } }
.lc-today-btn { border: 1px solid var(--border); background: var(--surface2); color: var(--primary-hi); font: inherit; font-size: .74rem; font-weight: 800; padding: 6px 14px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.lc-today-btn:hover { background: var(--primary); color: #fff; }
