/* Custom Date Picker - Light Theme Design */

/* === Date Navigation Bar === */
.date-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 0;
  margin-bottom: 20px;
}

/* Navigation Buttons - Circular Style */
.date-nav-btn {
  width: 40px;
  height: 40px;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666666;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.date-nav-btn:hover {
  border-color: #10B981;
  color: #10B981;
  background: #FAFAFA;
}

.date-nav-btn:active {
  transform: scale(0.95);
}

.date-nav-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.5;
}

/* === Date Display Box - Pill Shape === */
.date-picker-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 200px;
  justify-content: center;
}

.date-picker-box:hover {
  border-color: #10B981;
}

/* Hidden native date input - completely hidden, no interaction */
.hidden-date-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

/* Date Text Display */
.date-display-text {
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  white-space: nowrap;
  letter-spacing: -0.2px;
}

/* Calendar Icon */
.calendar-icon {
  color: #999999;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* === Custom Calendar Popup === */
.custom-calendar {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 20px;
  padding: 20px;
  min-width: 320px;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.custom-calendar.show {
  display: block;
}

/* Calendar Header */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px 16px 4px;
  border-bottom: 1px solid #F0F0F0;
}

.calendar-month-year {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

.calendar-nav-arrows {
  display: flex;
  gap: 4px;
}

.calendar-nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666666;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.calendar-nav-btn:hover {
  border-color: #10B981;
  color: #10B981;
  background: #FAFAFA;
}

.calendar-nav-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.5;
}

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

.calendar-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: #999999;
  letter-spacing: 0.8px;
  padding: 8px 0;
}

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

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #333333;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  width: 40px;
  height: 40px;
  margin: 0 auto;
}

.calendar-day:hover {
  background: #F0F0F0;
}

/* Today - Green outline only */
.calendar-day.today {
  border: 1px solid #10B981;
  color: #10B981;
}

.calendar-day.today:hover {
  background: rgba(16, 185, 129, 0.05);
}

/* Selected - Solid green */
.calendar-day.selected {
  background: #10B981;
  color: #FFFFFF;
}

.calendar-day.selected:hover {
  background: #059669;
}

/* Other month days */
.calendar-day.other-month {
  color: #cccccc;
}

/* Footer */
.calendar-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #F0F0F0;
}

.calendar-footer-btn {
  font-size: 14px;
  padding: 8px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s ease;
  font-weight: 500;
}

.calendar-btn-clear {
  color: #999999;
}

.calendar-btn-clear:hover {
  color: #666666;
  background: #F5F5F5;
}

.calendar-btn-today {
  color: #10B981;
}

.calendar-btn-today:hover {
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
}

/* === Desktop Optimizations === */
@media (min-width: 769px) {
  .date-nav-bar {
    gap: 16px;
    padding: 20px 0;
  }
  
  .date-nav-btn {
    width: 44px;
    height: 44px;
  }
  
  .date-nav-btn svg {
    width: 20px;
    height: 20px;
  }
  
  .date-picker-box {
    padding: 12px 28px;
    min-width: 240px;
  }
  
  .date-display-text {
    font-size: 16px;
  }
  
  .calendar-icon {
    width: 18px;
    height: 18px;
  }
}

/* === Mobile Optimizations === */
@media (max-width: 768px) {
  .date-nav-bar {
    gap: 8px;
    padding: 12px 0;
  }
  
  .date-nav-btn {
    width: 36px;
    height: 36px;
  }
  
  .date-picker-box {
    padding: 8px 16px;
    min-width: 170px;
  }
  
  .date-display-text {
    font-size: 14px;
  }
}

/* === Native Date Picker Override (WebKit) === */
input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

input[type="date"]::-webkit-datetime-edit {
  display: none;
}

input[type="date"]::-webkit-inner-spin-button {
  display: none;
}

input[type="date"]::-webkit-clear-button {
  display: none;
}

/* Firefox specific */
input[type="date"]::-moz-calendar-picker-indicator {
  opacity: 0;
}
