/* =========================================
   SHARED CALENDAR WIDGET STYLES
   ========================================= */

.calendar-widget {
  background: white;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--spacing-sm) var(--spacing-md);
}

.calendar-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
}

.calendar-controls {
  display: flex;
  gap: 0.5rem;
}

.cal-btn {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cal-btn:hover {
  background: var(--primary-purple);
  color: white;
}

.week-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-grey);
  margin-bottom: var(--spacing-sm);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 0.5rem;
  text-align: center;
}

.calendar-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-cell.clickable {
  cursor: pointer;
  user-select: none;
}

.calendar-cell.clickable:hover .day:not(.bg-purple) {
  background: #f3f0fe;
}

.calendar-cell.drag-selected .day:not(.bg-purple) {
  background: #e0d4fc;
}

.calendar-grid {
  user-select: none;
}

.day {
  font-size: 0.875rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}

.day.muted {
  color: #cbd5e1;
}

.day.bold {
  font-weight: 600;
  color: var(--text-dark);
}

.day.bg-purple {
  background-color: var(--primary-purple);
  color: white;
}

/* Range styling - extends the background across cells */
.calendar-cell.in-range {
  background-color: var(--primary-purple);
}

.calendar-cell.range-start {
  background: linear-gradient(to right, transparent 50%, var(--primary-purple) 50%);
}

.calendar-cell.range-end {
  background: linear-gradient(to left, transparent 50%, var(--primary-purple) 50%);
}

.calendar-cell.range-start .day,
.calendar-cell.range-end .day,
.calendar-cell.in-range .day {
  background-color: var(--primary-purple);
  color: white;
}
