/* ============================================================
   Calendar view
   ============================================================ */
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-month-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin-left: 8px;
  min-width: 140px;
}

.calendar-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.calendar-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.calendar-dot--featured  { background: #a855f7; }
.calendar-dot--published { background: var(--color-success); }
.calendar-dot--empty     { background: var(--color-danger); }

.calendar-grid-wrap {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-base);
}
.calendar-grid-wrap:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
  border-bottom: 1px solid var(--color-border);
}
.calendar-weekdays span {
  padding: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-cell {
  position: relative;
  min-height: 112px;
  padding: 10px;
  border-right: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background var(--transition-fast);
}
.calendar-cell:nth-child(7n) { border-right: none; }
.calendar-cell--blank { background: var(--color-bg); }
.calendar-cell--empty { background: #fff5f5; }

.calendar-cell--today {
  background: rgba(99, 102, 241, 0.03);
}

.calendar-cell--today .calendar-cell__date {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 6px -1px rgba(99, 102, 241, 0.4);
}

.calendar-cell__date {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
  border-radius: 50%;
  user-select: none;
}

.calendar-cell__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

.calendar-chip {
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  line-height: 1.3;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.calendar-chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.calendar-chip__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}
.calendar-chip__author {
  font-size: 9px;
  font-weight: 600;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-chip--featured  { background: #f3e8ff; color: #7e22ce; border: 1.5px solid rgba(126, 34, 206, 0.1); }
.calendar-chip--published { background: #dcfce7; color: #15803d; border: 1.5px solid rgba(21, 128, 61, 0.1); }

.calendar-add-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--color-danger);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}
.calendar-add-btn:hover { 
  background: var(--color-danger-hover); 
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
}

@media (max-width: 640px) {
  .calendar-cell { min-height: 90px; padding: 6px; }
  .calendar-month-label { min-width: auto; }
}
