/* ============================================================
   Styles OWNED by the Task Calendar module
   (convention: css/modules/<module-name>.css)
   ============================================================ */

/* ---------- Month grid ---------- */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-left: 1px solid var(--lc-border);
  border-top: 1px solid var(--lc-border);
}

.cal-grid-head {
  border-bottom: 0;
}

.cal-head {
  background: #f8f9fb;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  padding: 6px 2px;
  border-right: 1px solid var(--lc-border);
}

.cal-cell {
  min-height: 104px;
  background: #fff;
  border-right: 1px solid var(--lc-border);
  border-bottom: 1px solid var(--lc-border);
  padding: 4px 6px;
  cursor: pointer;
  overflow: hidden;
}

.cal-cell.cal-other {
  background: #fafbfc;
}

.cal-cell.cal-other .cal-day {
  color: #c2c9d4;
}

.cal-day {
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.cal-cell.cal-today .cal-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0d6efd;
  color: #fff;
}

/* Task chip inside a day cell */
.cal-chip {
  display: block;
  font-size: 0.72rem;
  line-height: 1.3;
  padding: 1px 6px;
  margin-bottom: 2px;
  border-radius: 6px;
  background: #eef2ff;
  border-left: 3px solid #0d6efd;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-chip.cal-overdue {
  background: #fdedee;
  border-left-color: #dc3545;
}

.cal-chip.cal-done {
  background: #f1f3f5;
  border-left-color: #198754;
  text-decoration: line-through;
  color: #98a2b3;
}

/* ---------- Week view ---------- */
.cal-week-day {
  border-bottom: 1px solid var(--lc-border);
  padding: 8px 0;
}

.cal-week-day:last-child {
  border-bottom: 0;
}

.cal-week-head {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.cal-today-row .cal-week-head {
  color: #0d6efd;
}

.cal-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0 3px 4px;
}

.cal-row-title {
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
}

.cal-row.cal-overdue .cal-row-title {
  color: #dc3545;
  font-weight: 600;
}

.cal-row.cal-done .cal-row-title {
  text-decoration: line-through;
  color: #98a2b3;
}

/* Phones: shorter month cells, smaller chips */
@media (max-width: 767.98px) {
  .cal-cell {
    min-height: 72px;
    padding: 2px 3px;
  }
  .cal-chip {
    font-size: 0.62rem;
    padding: 0 3px;
  }
}
