/* ============================================
   CALENDAR WIDGET STYLES - Design Team Version
   Based on PDF Reference: 2025-10-28Screensiwitermine.pdf
   ============================================ */

/* Calendar Container */
.calendar-widget {
  background: transparent;
  max-width: 400px;
  font-family: 'Encode', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Calendar Header */
.calendar-header {
  display: flex;
  justify-content: start;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.calendar-month-year {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex: 0 1 auto;
}

/* Circular Navigation Buttons */
.calendar-nav-circle {
  background: transparent;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.calendar-nav-circle:hover {
  opacity: 0.7;
}

.calendar-nav-circle:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.calendar-nav-circle svg {
  display: block;
}

/* Weekday Headers */
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: lowercase;
  padding: 4px 0;
}

/* Calendar Days Grid */
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 500;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  background: transparent;
  border: none;
  min-height: 36px;
}

/* Empty days (previous/next month) */
.calendar-day.other-month {
  color: rgba(255, 255, 255, 0.2);
  cursor: default;
}

.calendar-day.other-month:hover {
  background: transparent;
}

/* Hover state for valid days */
.calendar-day:not(.other-month):hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

/* Current day (orange/amber) */
.calendar-day.current {
  background: #ffd54a;
  color: #000000;
  font-weight: 700;
  box-shadow: 0 0 0 2px #000000, 0 0 0 4px #ffd54a, 0 2px 8px rgba(255, 165, 0, 0.4);
}

.calendar-day.current:hover {
  background: #FF8C00;
  box-shadow: 0 0 0 2px #000000, 0 0 0 4px #FF8C00, 0 2px 8px rgba(255, 165, 0, 0.4);
  transform: scale(1.05);
}

/* Weekend days (Saturday and Sunday) - dark blue background */
.calendar-day.weekend:not(.other-month) {
  background: #142849;
  color: #ffffff;
  font-weight: 600;
}

.calendar-day.weekend:not(.other-month):hover {
  background: #142849;
  transform: scale(1.05);
}

/* Days with events (blue) */
.calendar-day.has-events {
  background: #2196F3;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
}

.calendar-day.has-events:hover {
  background: #1976D2;
  transform: scale(1.05);
}

/* Weekend days with events - keep dark blue */
.calendar-day.weekend.has-events {
  background: #1d5aad;
}

/* Current day with events (orange takes priority) */
.calendar-day.current.has-events {
  background: #FFA500;
  color: #000000;
}

/* Selected date */
.calendar-day.selected {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Remove event indicator dots */
.calendar-day::after {
  display: none;
}

/* ========== CALENDAR OVERLAY ========== */
.calendar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 100px 20px 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.calendar-overlay.active {
  display: flex;
  opacity: 1;
}

.calendar-overlay .calendar-widget {
  background: #000000;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.calendar-overlay.active .calendar-widget {
  transform: translateX(0);
}

/* Close button */
.calendar-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: #000000;
  border: 2px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  color: #ffffff;
  transition: all 0.2s ease;
}

.calendar-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 991px) {
  .calendar-widget {
    max-width: 435px;
  }

  .calendar-weekday {
    font-size: 0.85rem;
  }

  .calendar-day {
    min-height: 32px;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .calendar-widget {
    max-width: 90%;
  }

  .calendar-month-year {
    font-size: 0.85rem;
  }

  .calendar-nav-btn {
    width: 32px;
    height: 32px;
  }

  .calendar-overlay {
    padding: 20px;
    align-items: center;
    justify-content: center;
  }

  .calendar-overlay .calendar-widget {
    transform: translateY(100%);
    max-width: 100%;
  }

  .calendar-overlay.active .calendar-widget {
    transform: translateY(0);
  }
}
