/* ── Calendar Widget ── */
.calendar-main {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
}

.calendar-widget {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  flex: 1;
  min-width: 280px;
}

.cal-nav-row {
  display: flex;
  gap: 8px;
}

.calendar-container {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.calendar {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  min-width: 230px;
}

.calendar-header {
  display: flex;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a1a2e;
  margin-bottom: 10px;
  padding: 4px 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  text-align: center;
}

.day {
  padding: 4px 2px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
}

.date {
  padding: 6px 2px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.85rem;
  transition: background 0.15s, color 0.15s;
}

.date:hover:not(.past-date):not(.booked-date) {
  background: #e3f2fd;
}

.past-date, .booked-date {
  background: #f5f5f5;
  color: #bbb;
  cursor: not-allowed;
}

.selected-date {
  background: #1a73e8;
  color: #fff;
  font-weight: 600;
}

.required-date {
  background: #FF9800;
  color: #fff;
}

.cal-nav-row .nav-btn {
  cursor: pointer;
  padding: 8px 16px;
  background: #1a1a2e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  flex: 1;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cal-nav-row .nav-btn:hover { background: #e94560; color: #fff; }

/* ── Summary Panel ── */
.cal-summary-panel {
  width: 280px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
  align-self: flex-start;
  margin-top: 10px;
}

.cal-summary-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1a1a2e, #0f3460);
  color: #fff;
}

.cal-summary-icon { font-size: 24px; }

.cal-summary-title {
  font-size: 0.9rem;
  font-weight: 700;
}

.cal-summary-count {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
}

.cal-summary-body {
  padding: 12px 16px;
  max-height: 300px;
  overflow-y: auto;
}

.cal-summary-body::-webkit-scrollbar { width: 4px; }
.cal-summary-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.cal-summary-empty {
  text-align: center;
  color: #aaa;
  font-size: 0.85rem;
  padding: 20px 0;
}

/* Month group */
.cal-month-group {
  margin-bottom: 14px;
}

.cal-month-group:last-child { margin-bottom: 0; }

.cal-month-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1a1a2e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid #1a73e8;
  display: inline-block;
}

/* Date chips */
.cal-date-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cal-date-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #e8f0fe;
  color: #1a73e8;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid #c7d2fe;
  transition: background 0.15s;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .calendar-main {
    flex-direction: column;
    align-items: stretch;
  }
  .calendar-container {
    flex-direction: column;
    gap: 12px;
  }
  .calendar-widget {
    width: 100%;
    min-width: 0;
  }
  .calendar {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
  }
  .cal-summary-panel {
    width: 100%;
    box-sizing: border-box;
  }
  .cal-summary-body { max-height: 200px; }
  .day, .date {
    padding: 4px 2px;
    font-size: 0.8rem;
  }
  .cal-nav-row .nav-btn { padding: 8px 12px; font-size: 0.8rem; }
}
