/* Custom Flatpickr Theme - StudioAsist Clean Design */

.flatpickr-calendar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: visible;
  width: 310px;
  min-width: 310px;
}

.flatpickr-calendar.open {
  z-index: 99999;
}

/* Header - Clean Gradient */
.flatpickr-months {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  /* padding: 16px; */
  margin-bottom: 0;
  border-radius: 12px 12px 0 0;
  position: relative;
}

.flatpickr-month {
  color: white;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.5px;
  text-align: center;
  margin-bottom: 8px;
}

.flatpickr-prev-month,
.flatpickr-next-month {
  color: white;
  fill: white;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
  position: absolute;
  top: 16px;
}

.flatpickr-prev-month {
  left: 16px;
}

.flatpickr-next-month {
  right: 16px;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

/* Year/Month Selector */
.flatpickr-current-month {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #374151;
  padding: 4px 8px;
  font-weight: 600;
  font-size: 16px;
}

.flatpickr-current-month .flatpickr-monthDropdown-months option {
  background: #ffffff;
  color: #374151;
  padding: 8px;
}

.flatpickr-current-month .numInputWrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  color: #374151;
}

.flatpickr-current-month .numInputWrapper input {
  background: transparent;
  border: none;
  color: #374151;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  padding: 4px 8px;
}

.flatpickr-current-month .numInputWrapper .arrowUp,
.flatpickr-current-month .numInputWrapper .arrowDown {
  color: #374151;
  border-color: #e2e8f0;
}

/* Dropdown styling */
.flatpickr-monthDropdown-months {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 6px !important;
  color: #374151 !important;
  padding: 4px 8px !important;
  font-weight: 600 !important;
  font-size: 16px !important;
}

.flatpickr-monthDropdown-months option {
  background: #ffffff !important;
  color: #374151 !important;
  padding: 8px !important;
}

/* Weekdays */
.flatpickr-weekdays {
  background: #f8f9fa;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 0;
}

.flatpickr-weekday {
  color: #6b7280;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Days */
.flatpickr-days {
  background: #ffffff;
  overflow: visible;
}

.dayContainer {
  padding: 0;
  overflow: visible;
  width: 100%;
}

.dayContainer::after {
  content: "";
  display: table;
  clear: both;
}

.flatpickr-day {
  border-radius: 8px;
  margin: 1px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  width: calc(14.28% - 2px);
  height: 40px;
  line-height: 40px;
  text-align: center;
  display: inline-block;
  box-sizing: border-box;
  float: left;
}

.flatpickr-day:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) ;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px #667eea;
}

.flatpickr-day.selected {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) ;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(200, 44, 106, 0.4);
}

.flatpickr-day.selected:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.flatpickr-day.selected.startRange,
.flatpickr-day.selected.endRange {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) ;
  color: white;
}

.flatpickr-day.inRange {
  background: linear-gradient(135deg, rgba(200, 44, 106, 0.1) 0%, rgba(71, 31, 114, 0.1) 100%);
  color: #764ba2;
  border-radius: 0;
}

.flatpickr-day.inRange:hover {
  background: linear-gradient(135deg, rgba(200, 44, 106, 0.2) 0%, rgba(71, 31, 114, 0.2) 100%);
}

.flatpickr-day.today {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) ;
  color: white;
  font-weight: 600;
}

.flatpickr-day.today:hover {
  background: linear-gradient(135deg, #a91e5a, #3d1a5f);
}

.flatpickr-day.today.selected {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) ;
}

.flatpickr-day.disabled {
  color: #d1d5db;
  cursor: not-allowed;
}

.flatpickr-day.disabled:hover {
  background: transparent;
  color: #d1d5db;
  transform: none;
  box-shadow: none;
}

/* Time picker */
.flatpickr-time {
  border-top: 1px solid #e2e8f0;
  background: #f8f9fa;
  padding: 16px;
  border-radius: 0 0 12px 12px;
}

.flatpickr-time input {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.flatpickr-time input:hover,
.flatpickr-time input:focus {
  border-color: #c82c6a;
  box-shadow: 0 0 0 3px rgba(200, 44, 106, 0.1);
  outline: none;
}

.flatpickr-time .flatpickr-time-separator {
  color: #6b7280;
  font-weight: 600;
}

/* Range mode specific */
.flatpickr-day.startRange {
  border-radius: 8px 0 0 8px;
}

.flatpickr-day.endRange {
  border-radius: 0 8px 8px 0;
}

.flatpickr-day.startRange.endRange {
  border-radius: 8px;
}

/* Animation */
@keyframes fpFadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.flatpickr-calendar.animate.open {
  animation: fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);
}

/* Custom input styling */
.flatpickr-input {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.flatpickr-input:hover {
  border-color: #c82c6a;
  box-shadow: 0 0 0 3px rgba(200, 44, 106, 0.1);
}

.flatpickr-input:focus {
  border-color: #c82c6a;
  box-shadow: 0 0 0 3px rgba(200, 44, 106, 0.2);
  outline: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .flatpickr-calendar {
    width: 300px;
    font-size: 14px;
  }
  
  .flatpickr-day {
    margin: 1px;
    font-size: 13px;
  }
  
  .flatpickr-months {
    padding: 12px;
  }
}