.p-datepicker {
  background: $dropdown-container-bg-color;
  //margin-top: -1px; /* hack to simulate a thin line */
  border: 1px solid $dropdown-overlay-border-color;
  box-shadow: $defaultBoxShadow;
  border-radius: 0 0 $borderRadius $borderRadius;
  padding: 0.5rem;
}

.p-datepicker .p-datepicker-header {
  padding: 0.3rem;
  background: $dropdown-container-bg-color;
  font-weight: 600;
  margin: 0;
}

.p-datepicker .p-datepicker-header .p-datepicker-prev,
.p-datepicker .p-datepicker-header .p-datepicker-next {
  width: 2.5rem;
  height: 2.5rem;
  color: $action-btn-secondary-icon-color;
  border: 0 none;
  background: transparent;
  border-radius: 50%;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.p-datepicker .p-datepicker-header .p-datepicker-prev:enabled:hover,
.p-datepicker .p-datepicker-header .p-datepicker-next:enabled:hover {
  background: $action-btn-secondary-hover-bg-color;
}

.p-datepicker .p-datepicker-header .p-datepicker-prev:enabled:active,
.p-datepicker .p-datepicker-header .p-datepicker-next:enabled:active {
  background: $action-btn-secondary-pressed-bg-color;
}

.p-datepicker .p-datepicker-header .p-datepicker-prev:focus,
.p-datepicker .p-datepicker-header .p-datepicker-next:focus {
  outline: 0 none;
  outline-offset: 0;
  box-shadow: none;
}

.p-datepicker .p-datepicker-header .p-datepicker-title {
  line-height: 2.5rem;

  .p-datepicker-decade {
    color: var(--input-txt-color);
  }

  button {
    color: var(--default-btn-link-text-color);
    font-size: 15px;

    &:hover {
      color: var(--default-btn-link-text-color-darker);
    }
  }
}

.p-datepicker .p-datepicker-header .p-datepicker-title select {
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, background-size 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
}

.p-datepicker .p-datepicker-header .p-datepicker-title select:focus {
  outline: 0 none;
  outline-offset: 0;
  box-shadow: none;
  border-color: var(--input-txt-border-focus-color);
}

.p-datepicker .p-datepicker-header .p-datepicker-title .p-datepicker-month {
  margin-right: 0.3rem;
}

.p-datepicker table {
  font-size: 1rem;
  margin: 0.3rem 0;
}

.p-datepicker table th {
  padding: 0.3rem;
}

.p-datepicker table th > span {
  width: 2.5rem;
  height: 2.5rem;
}

.p-datepicker table td {
  padding: 0.3rem;
}

.p-datepicker table td > span {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  transition: none;
  border: 1px solid transparent;
}

.p-datepicker table td > span.p-highlight {
  color: var(--date-text-focus-color);
  background: var(--date-bg-focus-color);
}

.p-datepicker table td > span:focus {
  outline: 0 none;
  outline-offset: 0;
  box-shadow: none;
}

.p-datepicker table td.p-datepicker-today > span {
  background: transparent;
  border-color: var(--today-border-color);
}

.p-datepicker table td.p-datepicker-today > span.p-highlight {
  color: var(--date-text-focus-color);
  background: var(--date-bg-focus-color);
}

.p-datepicker .p-datepicker-buttonbar {
  padding: 1rem 0;
  border-top: 1px solid var(--menu-separator-color);
}

.p-datepicker .p-datepicker-buttonbar .p-button {
  width: auto;
}

.p-datepicker .p-timepicker {
  border-top: 1px solid var(--menu-separator-color);
  padding: 0.3rem;
}

.p-datepicker .p-timepicker button {
  width: 2.5rem;
  height: 2.5rem;
  border: 0 none;
  background: transparent;
  border-radius: 50%;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.p-datepicker .p-timepicker button:enabled:hover {
  background: var(--date-bg-hover-color);
}

.p-datepicker .p-timepicker button:focus {
  outline: 0 none;
  outline-offset: 0;
  box-shadow: none;
}

.p-datepicker .p-timepicker button:last-child {
  margin-top: 0.2em;
}

.p-datepicker .p-timepicker span {
  font-size: 1.25rem;
}

.p-datepicker .p-timepicker > div {
  padding: 0 0.3rem;
}

.p-datepicker.p-datepicker-timeonly .p-timepicker {
  border-top: 0 none;
}

.p-datepicker .p-monthpicker, .p-datepicker .p-yearpicker {
  margin: 0.3rem 0;
}

.p-datepicker .p-monthpicker .p-monthpicker-month, .p-datepicker .p-yearpicker .p-yearpicker-year {
  padding: 0.3rem;
  transition: none;
  border-radius: 4px;
}

.p-datepicker .p-monthpicker .p-monthpicker-month.p-highlight, .p-datepicker .p-yearpicker .p-yearpicker-year.p-highlight {
  color: var(--date-text-focus-color);
  background: var(--date-bg-focus-color);
}

.p-datepicker.p-datepicker-multiple-month .p-datepicker-group {
  border-right: 1px solid var(--menu-separator-color);
  padding-right: 0.3rem;
  padding-left: 0.3rem;
  padding-top: 0;
  padding-bottom: 0;
}

.p-datepicker.p-datepicker-multiple-month .p-datepicker-group:first-child {
  padding-left: 0;
}

.p-datepicker.p-datepicker-multiple-month .p-datepicker-group:last-child {
  padding-right: 0;
  border-right: 0 none;
}

.p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled) {
  transition: background-color 0.2s, color 0.2s;
}

.p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):hover {
  background: var(--date-bg-hover-color);
}

.p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):focus {
  background: var(--date-bg-focus-color);
}

.p-datepicker:not(.p-disabled) table td span:not(.p-highlight):not(.p-disabled):active {
  color: var(--date-text-focus-color);
  background: var(--date-bg-focus-color);
}

.p-datepicker:not(.p-disabled) .p-monthpicker .p-monthpicker-month:not(.p-highlight):not(.p-disabled):hover, .p-datepicker:not(.p-disabled) .p-yearpicker .p-yearpicker-year:not(.p-highlight):not(.p-disabled):hover {
  background: var(--date-bg-hover-color);
}

.p-datepicker:not(.p-disabled) .p-monthpicker .p-monthpicker-month:not(.p-highlight):not(.p-disabled):focus, .p-datepicker:not(.p-disabled) .p-yearpicker .p-yearpicker-year:not(.p-highlight):not(.p-disabled):focus {
  outline: 0 none;
  outline-offset: 0;
  box-shadow: none;
}

@media screen and (max-width: 769px) {
  .p-datepicker table th, .p-datepicker table td {
    padding: 0;
  }
}

.p-datepicker .p-datepicker-header {
  border-bottom: 0 none;
}

.p-datepicker table th {
  border-bottom: 1px solid var(--menu-separator-color);
  color: rgba(255, 255, 255, 0.38);
  font-weight: 400;
  font-size: 0.875rem;
}

.p-datepicker table td.p-datepicker-today > span {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.p-datepicker table td.p-datepicker-today.p-highlight {
  box-shadow: 0 0 0 1px rgba(159, 168, 218, 0.16);
}

.p-calendar {
  .p-inputtext {
    padding: 5px 0 5px 8px !important;
  }
}

.p-calendar-clearable span.p-calendar i.p-calendar-clear-icon {
  color: $action-btn-secondary-icon-color;
  right: 0;
  top: 55%;
}

.p-inputgroup {
  .p-calendar {
    height: 100%;
    width: 100%;
  }
}
