/* =========================
   Smart Calendar - YouthHub UI
========================= */

.calendar-section {
  padding: 18px;
}

.calendar-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, .35);
  margin-bottom: 14px;
}

.calendar-section .section-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  color: #0f172a;
}

.calendar-section .section-header h2 i {
  color: var(--primary-color);
}

.calendar-section .btn-add {
  border: 1px solid rgba(148, 163, 184, .5);
  background: #fff;
  color: #0f172a;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s ease;
}

.calendar-section .btn-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  border-color: rgba(59, 130, 246, .55);
}

/* header: month + arrows */
.calendar-widget {
  padding: 12px;
  border-radius: 16px;
  background: transparent;
}

.calendar-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  padding: 8px 6px 12px;
}

.calendar-header h4 {
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
}

.btn-calendar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .5);
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: .15s ease;
}

.btn-calendar:hover {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, .55);
  box-shadow: 0 10px 20px rgba(15, 23, 42, .08);
}

/* grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  padding: 6px;
}

.calendar-grid .calendar-day {
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  color: #94a3b8;
  user-select: none;
  position: relative;
}

.calendar-grid .calendar-day:nth-child(-n+7) {
  height: auto;
  border-radius: 0;
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
  padding: 8px 0 4px;
}

.calendar-grid .calendar-day.empty {
  background: transparent;
  border: none;
}

/* clickable days (except week headers) */
.calendar-grid .calendar-day:not(:nth-child(-n+7)):not(.empty) {
  cursor: pointer;
  transition: .15s ease;
}

.calendar-grid .calendar-day:not(:nth-child(-n+7)):not(.empty):hover {
  background: rgba(59, 130, 246, .08);
  color: #0f172a;
  transform: translateY(-1px);
}

/* today */
.calendar-grid .calendar-day.today {
  background: rgba(59, 130, 246, .12);
  color: #0f172a;
  outline: 2px solid rgba(59, 130, 246, .25);
}

/* has deadline dot */
.calendar-grid .calendar-day.has-deadline {
  color: #0f172a;
  background: rgba(15, 23, 42, .03);
}

.calendar-grid .calendar-day.has-deadline:hover {
  background: rgba(59, 130, 246, .10);
}

/* nicer dot */
.calendar-grid .calendar-day .deadline-dot {
  position: absolute;
  bottom: 7px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .18);
}

/* if today + deadline => stronger */
.calendar-grid .calendar-day.today.has-deadline .deadline-dot {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .22);
}

/* responsive */
@media (max-width: 520px) {
  .calendar-section { padding: 14px; }
  .calendar-grid { gap: 8px; }
  .calendar-grid .calendar-day { height: 40px; border-radius: 12px; }
  .calendar-header { grid-template-columns: 40px 1fr 40px; }
  .btn-calendar { width: 38px; height: 38px; }
}