/* 师门罗盘WPS风格日历样式 */
.wps-calendar-wrapper {
  position: relative;
  display: inline-block;
}

.wps-calendar-input {
  padding-right: 35px;
  cursor: pointer;
}

.wps-calendar-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.2s ease;
}

.wps-calendar-icon:hover {
  color: #007bff;
}

.wps-calendar-popup {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1050;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 12px;
  min-width: 280px;
  display: none;
  animation: wps-calendar-fadeIn 0.2s ease;
}

.wps-calendar-popup.show {
  display: block;
}

@keyframes wps-calendar-fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wps-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.wps-calendar-nav {
  background: none;
  border: none;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.wps-calendar-nav:hover {
  background: #f5f5f5;
  color: #007bff;
}

.wps-calendar-month-year {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  flex: 1;
  text-align: center;
  cursor: pointer;
  transition: color 0.2s ease;
}

.wps-calendar-month-year:hover {
  color: #007bff;
}

.wps-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.wps-calendar-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  padding: 8px 4px;
}

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

.wps-calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.2s ease;
  color: #333;
}

.wps-calendar-day:hover {
  background: #f0f8ff;
  color: #007bff;
}

.wps-calendar-day.other-month {
  color: #ccc;
}

.wps-calendar-day.today {
  background: #e3f2fd;
  color: #1976d2;
  font-weight: 600;
}

.wps-calendar-day.selected {
  background: #007bff;
  color: white;
  font-weight: 600;
}

.wps-calendar-day.selected:hover {
  background: #0056b3;
}

/* 周/期/月/季范围高亮样式 */
.wps-calendar-day.week-preview-highlight {
  background: #cce5ff;
  color: #0056b3;
  border-radius: 2px;
}

.wps-calendar-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

.wps-calendar-today,
.wps-calendar-clear,
.wps-calendar-confirm {
  background: none;
  border: 1px solid #ddd;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.wps-calendar-today {
  color: #007bff;
}

.wps-calendar-clear {
  color: #666;
}

.wps-calendar-confirm {
  background: #007bff;
  color: white;
  border-color: #007bff;
  font-weight: 500;
}

.wps-calendar-today:hover,
.wps-calendar-clear:hover {
  background: #f5f5f5;
}

.wps-calendar-confirm:hover {
  background: #0056b3;
  border-color: #0056b3;
}

.wps-calendar-confirm:disabled {
  background: #ccc;
  border-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

/* 月份视图和年份视图样式 */
.wps-calendar-month-item,
.wps-calendar-year-item {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
  transition: all 0.2s ease;
  color: #555;
  padding: 10px 8px;
  min-height: 36px;
  border: 1px solid transparent;
  background: #fafafa;
}

.wps-calendar-month-item:hover,
.wps-calendar-year-item:hover {
  background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
  color: #1976d2;
  border-color: #90caf9;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(33, 150, 243, 0.15);
}

.wps-calendar-month-item.today,
.wps-calendar-year-item.today {
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
  color: #2e7d32;
  font-weight: 500;
  border-color: #a5d6a7;
}

.wps-calendar-month-item.selected,
.wps-calendar-year-item.selected {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: white;
  font-weight: 500;
  border-color: #1565c0;
  box-shadow: 0 2px 6px rgba(21, 101, 192, 0.3);
}

.wps-calendar-month-item.selected:hover,
.wps-calendar-year-item.selected:hover {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  box-shadow: 0 3px 8px rgba(21, 101, 192, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .wps-calendar-popup {
    min-width: 260px;
    padding: 10px;
  }
  
  .wps-calendar-day {
    font-size: 13px;
  }
  
  .wps-calendar-month-item,
  .wps-calendar-year-item {
    font-size: 12px;
    padding: 8px 6px;
    min-height: 32px;
  }
  
  .wps-calendar-header {
    margin-bottom: 10px;
    padding-bottom: 6px;
  }
  
  .wps-calendar-footer {
    margin-top: 10px;
    padding-top: 6px;
  }
}