.calendar-card-wrapper {
	display: flex;
	position: relative;
	width: 100%;
	z-index: 99;
	opacity: 0; 
	animation: dissolveIn 1s ease-in-out forwards;
}

.calendar-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background-color: var(--calendar-background);
  border-radius: var(--border-radius-lg);
  padding: var(--padding-md);
  flex-shrink: 0;
  width: 100%;
  min-width: var(--screen-min-width);
  box-shadow: 0 0 0 1px var(--card-border), var(--soft-shadow-card);
  overflow: visible;  
  
}

.calendar-card:not(.open-modal):hover {
  background-color: var(--card-background-hover);
  box-shadow: 0 0 0 var(--card-border-size) var(--card-border-hover), var(--soft-shadow-card);
}

.calendar-widget {
  width: 100%;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0px 0px;
  font-family: 'Inter', sans-serif;
  display: flex;
  flex-direction: column;
  gap: var(--gap-xxl);
}

.calendar-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  min-height: 1.75rem;
  gap: var(--gap-sm);
}

.calendar-header:hover {
  color: var(--text-link-hover);
}

.selected-date {
  font-size: var(--font-size-button);
  font-weight: 600;
  white-space: nowrap;
}

.calendar-nav-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--margin-lg);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--gap-xs);
}

.calendar-grid div {
  text-align: center;
  padding: var(--padding-xs);
  background: var(--calendar-grid-background);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: var(--font-size-label-sm);
  border: 1px solid transparent;
  min-height: 2.1875rem;
  color: var(--text-body-neutral);
}

.calendar-grid .empty-day {
  cursor: not-allowed;
  background: var(--calendar-grid-empty-day-background);
}

.calendar-grid .calendar-day:not(.past-day):hover {
  background: var(--button-hover-background);
  color: var(--button-hover-text);
  box-shadow: 0 0 0 1px var(--button-hover-border);
}

.calendar-grid .calendar-day.selected {
  background: var(--blue-gradient);
  color: var(--calendar-grid-day-selected-text);
  border: 0px;
}

.calendar-grid .calendar-day.today {
  border: 2px solid var(--calendar-grid-day-today-border);
  border-radius: var(--border-radius-sm);
  box-sizing: border-box;
}

.calendar-grid .calendar-day.selected.today {
  background: var(--blue-gradient);
  color: var(--calendar-grid-day-selected-text);
  border: 2px solid var(--calendar-grid-day-today-border);
}

.calendar-grid .calendar-day.past-day {
  color: var(--calendar-grid-past-day-text);
  cursor: not-allowed;
  opacity: 0.5;
  user-select: none;
}

#open-calendar {
  font-size: var(--icon-size-xl);
  cursor: pointer;
  line-height: 1;
  display: block;
}

#prev-month,
#next-month {
  background: none !important;
  border: none !important;
  color: black !important;
  box-shadow: none !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prev-month,
.next-month {
  position: relative;
  background: none;
  border: none;
  outline: none;
  height: var(--button-min-height);
  width: var(--button-min-height);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG icon color changes on hover using CSS masks */
.prev-month img,
.next-month img {
  transition: background-color 0.2s ease;
  /* Hide the original SVG and use it as a mask */
  opacity: 0;
  position: absolute;
  height: var(--icon-size-md);
  width: var(--icon-size-md);
  pointer-events: none;
}

.prev-month::after,
.next-month::after {
  content: '';
  position: absolute;
  background-color: var(--icon-default-grey);
  border: none;
  outline: none;
  transition: background-color 0.2s ease;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  width: var(--icon-size-md);
  height: var(--icon-size-md);
}

.prev-month::after {
  -webkit-mask-image: url('../../icons/chevron_back_icon.svg');
  mask-image: url('../../icons/chevron_back_icon.svg');
}

.next-month::after {
  -webkit-mask-image: url('../../icons/chevron_forward_icon.svg');
  mask-image: url('../../icons/chevron_forward_icon.svg');
}

/* Apply hover effect only if the button is NOT disabled */
.prev-month:not(.disabled):hover::after,
.next-month:not(.disabled):hover::after {
    background-color: var(--icon-hover);
}

.prev-month.active::after,
.next-month.active::after {
    background-color: var(--icon-hover);
}

.prev-month.disabled,
.next-month.disabled {
    pointer-events: none; 
    cursor: not-allowed; /* Changes cursor to indicate no action */
    opacity: 0.3; /* Visually dims the button */
}

.prev-month.disabled::after,
.next-month.disabled::after {
    background-color: var(--icon-default-grey); /* Forces icon to default color when disabled */
}