/* ==========================================================================
   Calendar Picker Component Styles (Mobile & Desktop Responsive)
   ========================================================================== */
.calendar-modal-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 1.25rem;
}

@media (max-width: 680px) {
  .calendar-modal-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.calendar-view-container {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.875rem;
}

.calendar-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cal-month-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.calendar-grid-wrapper {
  display: flex;
  flex-direction: column;
}

.cal-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.4rem;
}

.cal-weekday.sun {
  color: var(--color-sun);
}

.cal-weekday.sat {
  color: var(--color-sat);
}

.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.cal-day-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  background-color: #ffffff;
  border: 1px solid transparent;
  color: var(--text-primary);
  user-select: none;
  transition: all var(--transition-fast);
  position: relative;
  min-height: 32px;
}

.cal-day-cell:hover:not(.other-month):not(.disabled) {
  background-color: var(--bg-subtle);
  border-color: var(--border-color);
}

.cal-day-cell.other-month {
  color: var(--text-light);
  cursor: default;
  opacity: 0.35;
}

.cal-day-cell.is-sun {
  color: var(--color-sun);
}

.cal-day-cell.is-sat {
  color: var(--color-sat);
}

.cal-day-cell.is-today::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px;
  height: 4px;
  border-radius: var(--radius-pill);
  background-color: var(--color-primary);
}

/* Selected Date in Calendar */
.cal-day-cell.selected {
  background-color: var(--color-primary) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.cal-day-cell.selected::after {
  background-color: #ffffff !important;
}

.calendar-quick-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

/* Selected Dates Side Panel */
.selected-dates-panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.panel-subtitle {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.selected-dates-chips {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 160px;
  overflow-y: auto;
  padding: 0.4rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  -webkit-overflow-scrolling: touch;
}

.date-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0.5rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 500;
}

.date-chip .btn-remove-chip {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1;
  padding: 0 0.2rem;
}

.date-chip .btn-remove-chip:hover {
  color: var(--color-danger);
}

.manual-date-input-group {
  margin-top: 0.25rem;
}

.text-xs {
  font-size: 0.75rem;
}
