
/* Custom calendar styles */
.calendar-wrapper {
  position: relative;
  width: 100%;
}

.calendar-input:focus {
  box-shadow: none;
  outline: none;
  border-color: #007bff;
}

.calendar-input {
  cursor: pointer;
  background-color: #fdfdfd;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 1rem;
  color: #333;
  width: 100%;
}

/* Renamed main popup container to calendarwaleed */
.calendarwaleed {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  height: 300px;
  background: white;
  border-radius: 8px;
  z-index: 1000;
  box-sizing: border-box;
  width: 270px;
  padding: 1rem 1rem 1.2rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 123, 255, 0.15);
}

.calendarwaleed::before {
  content: "";
  display: block;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, #007bff, #00bfff);
  position: absolute;
  top: 0;
  left: 0;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.calendarwaleed .calendar-content {
  top: 0;
  left: 0;
  width: 100%;
  background-color: white;
  box-sizing: border-box;
}

#waleedcalendar::before,
#waleedcalendar::after {
  display: none !important;
}

@media (max-width: 600px) {
  .calendarwaleed {
    padding: 8px;
    font-size: 0.95rem;
  }
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: #007bff;
  font-weight: bold;
  font-size: 1.1rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.calendar-day-name {
  font-weight: 600;
  color: #007bff;
  text-align: center;
  font-size: 0.85rem;
  user-select: none;
}

.calendar-day {
  width: 26px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s, color 0.2s;
  font-size: 0.9rem;
}

#waleedcalendar button.calendar-nav-btn,
#waleedcalendar button.calendar-today-btn {
  all: unset; /* Reset all inherited styles */
  cursor: pointer;
  padding: 4px 10px;
  font-size: 1.3rem;
  font-weight: 600;
  color: #007bff;
  background-color: transparent;
  border-radius: 6px;
  user-select: none;
  transition: color 0.2s ease, background-color 0.2s ease;
  text-align: center;
  display: inline-block;
  line-height: normal;
}

#waleedcalendar button.calendar-nav-btn:hover,
#waleedcalendar button.calendar-today-btn:hover {
  color: #0056b3;
  background-color: #e6f2ff;
}

#waleedcalendar button.calendar-today-btn {
  font-size: 0.8rem;
  border: 1px solid #007bff;
  padding: 4px 12px;
  background-color: #e6f2ff;
  font-weight: 700;
}

#waleedcalendar button.calendar-today-btn:hover {
  background-color: #cce5ff;
}



/* Slide animations */
@keyframes slideInFromTop {
  from {
    transform: translateY(-15px);
    opacity: 0;
  }
  to {
    transform: translateY(0px);
    opacity: 1;
  }
}

@keyframes slideOutToTop {
  from {
    transform: translateY(0px);
    opacity: 1;
  }
  to {
    transform: translateY(-15px);
    opacity: 0;
  }
}

@keyframes slideLeftIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideLeftOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}
@keyframes slideRightIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideRightOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.slide-in {
  animation: slideInFromTop 0.3s ease forwards;
}
.slide-out {
  animation: slideOutToTop 0.25s ease forwards;
}
.slide-left-in {
  animation: slideLeftIn 0.3s ease forwards;
}
.slide-left-out {
  animation: slideLeftOut 0.3s ease forwards;
}
.slide-right-in {
  animation: slideRightIn 0.3s ease forwards;
}
.slide-right-out {
  animation: slideRightOut 0.3s ease forwards;
}

/* Past, today, selected */
.calendar-day.disabled {
  color: #bbb;
  cursor: default;
  pointer-events: none;
  background-color: transparent !important;
}

.calendar-day.today {
  border: 2px solid #007bff;
  font-weight: 700;
  color: #0056b3;
}

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