/* Custom Date Picker Styles */
.date-picker-wrapper {
  position: relative;
}

.date-picker-input {
  cursor: pointer;
  background: #222;
  border: 1px solid #444;
  color: #fff;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 16px;
  width: 100%;
  transition: border-color 0.2s;
}

.date-picker-input:hover {
  border-color: #FFD600;
}

.date-picker-input:focus {
  outline: none;
  border-color: #FFD600;
  box-shadow: 0 0 0 2px rgba(255, 214, 0, 0.2);
}

.date-picker-calendar {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border: 2px solid #FFD600;
  border-radius: 8px;
  padding: 16px;
  margin-top: 8px;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: none;
  box-sizing: border-box;
  overflow: hidden;
  max-width: 100%;
  min-width: 280px;
  width: auto;
}

.date-picker-calendar.active {
  display: block;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  color: #FFD600;
  font-weight: bold;
  font-size: 18px;
}

.calendar-nav {
  background: none;
  border: none;
  color: #FFD600;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.calendar-nav:hover {
  background: rgba(255, 214, 0, 0.1);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
}

.calendar-day-header {
  text-align: center;
  color: #FFD600;
  font-weight: bold;
  font-size: 12px;
  padding: 8px 4px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #444;
  border-radius: 4px;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  transition: all 0.2s;
  background: #222;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
}

.calendar-day:hover:not(.disabled):not(.selected) {
  background: #333;
  border-color: #666;
}

.calendar-day.selected {
  background: #FFD600;
  color: #111;
  border-color: #FFD600;
  font-weight: bold;
}

.calendar-day.disabled {
  color: #666;
  cursor: not-allowed;
  background: #1a1a1a;
  border-color: #333;
}

.calendar-day.disabled:hover {
  background: #1a1a1a;
  border-color: #333;
}

.calendar-day.today {
  border-color: #FFD600;
  border-width: 2px;
}

.calendar-day.weekend {
  color: #ff6b6b;
}

/* Responsive scaling for all screen sizes */
@media (max-width: 600px) {
  .date-picker-calendar {
    min-width: 300px;
    padding: 14px;
  }
}

@media (max-width: 500px) {
  .date-picker-calendar {
    min-width: 280px;
    padding: 12px;
  }
  
  .calendar-day {
    font-size: 11px;
  }
  
  .calendar-day-header {
    font-size: 10px;
    padding: 6px 2px;
  }
  
  .calendar-header {
    font-size: 16px;
    padding: 8px 0;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .date-picker-calendar {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    right: auto;
    margin: 0;
    max-width: 90vw;
    width: auto;
    min-width: 280px;
    max-height: 80vh;
    overflow-y: auto;
    box-sizing: border-box;
  }
  
  .calendar-grid {
    width: 100%;
    box-sizing: border-box;
  }
  
  .calendar-day {
    font-size: 12px;
  }
  
  .calendar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    display: none;
  }
  
  .calendar-overlay.active {
    display: block;
  }
}

/* Extra small screens */
@media (max-width: 400px) {
  .date-picker-calendar {
    padding: 12px;
    min-width: 260px;
  }
  
  .calendar-day {
    font-size: 11px;
  }
  
  .calendar-header {
    font-size: 16px;
  }
}
