.deposit-month-calendar {
  position: relative;
  flex: 0 0 188px;
  width: 188px;
  min-height: 40px;
}

.deposit-tools .deposit-month-calendar-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 40px;
  min-height: 40px;
  border: 1px solid #cbd7e5;
  border-radius: 7px;
  background: linear-gradient(180deg, #fff 0%, #f7f9fc 100%);
  box-shadow: 0 1px 2px rgba(16, 32, 51, .07);
  padding: 0 12px 0 16px;
  color: #102033;
  font-weight: 700;
  text-align: left;
}

.deposit-tools .deposit-month-calendar-trigger:hover,
.deposit-tools .deposit-month-calendar-trigger[aria-expanded="true"] {
  border-color: #79a7d4;
  box-shadow: 0 0 0 3px rgba(31, 102, 166, .1);
}

.deposit-month-calendar-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deposit-month-calendar-trigger-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1.7px solid #31516f;
  border-radius: 4px;
}

.deposit-month-calendar-trigger-icon::before {
  content: "";
  position: absolute;
  left: -1.7px;
  right: -1.7px;
  top: 4px;
  border-top: 1.7px solid #31516f;
}

.deposit-month-calendar-trigger-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  top: -3px;
  width: 8px;
  height: 4px;
  border-left: 1.7px solid #31516f;
  border-right: 1.7px solid #31516f;
}

.deposit-month-calendar-popover {
  position: absolute;
  z-index: 3600;
  top: calc(100% + 10px);
  left: 50%;
  width: 354px;
  transform: translateX(-50%);
  border: 1px solid #cfdae7;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(16, 32, 51, .2), 0 4px 14px rgba(16, 32, 51, .1);
  padding: 16px;
  animation: accounting-calendar-in .16s ease-out;
}

.deposit-month-calendar-popover::before {
  content: "";
  position: absolute;
  top: -7px;
  left: calc(50% - 7px);
  width: 13px;
  height: 13px;
  transform: rotate(45deg);
  border-left: 1px solid #cfdae7;
  border-top: 1px solid #cfdae7;
  background: #fff;
}

@keyframes accounting-calendar-in {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.deposit-month-calendar-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.deposit-month-calendar-header > div {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.deposit-month-calendar-header span {
  color: #708197;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.deposit-month-calendar-header strong {
  color: #102033;
  font-size: 21px;
  line-height: 1.1;
}

.deposit-tools .deposit-month-calendar-nav {
  position: relative;
  width: 40px;
  height: 40px;
  min-height: 40px;
  border: 1px solid #d6e0eb;
  border-radius: 9px;
  background: #f7faff;
  padding: 0;
}

.deposit-tools .deposit-month-calendar-nav::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 13px;
  width: 9px;
  height: 9px;
  transform: rotate(-45deg);
  border-left: 2px solid #245f94;
  border-top: 2px solid #245f94;
}

.deposit-tools .deposit-month-calendar-nav.next::before {
  left: 13px;
  transform: rotate(135deg);
}

.deposit-tools .deposit-month-calendar-nav:hover {
  border-color: #8bb4da;
  background: #eaf4fe;
}

.deposit-tools .deposit-month-calendar-nav:disabled {
  border-color: #dfe5ec;
  background: #f3f5f7;
  cursor: not-allowed;
  opacity: .35;
}

.deposit-month-calendar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.deposit-tools .deposit-month-calendar-option {
  display: grid;
  place-content: center;
  gap: 2px;
  height: 54px;
  min-height: 54px;
  border: 1px solid #dbe4ee;
  border-radius: 9px;
  background: #f8fafc;
  color: #20354a;
  padding: 4px;
  text-align: center;
  transition: border-color .14s ease, background .14s ease, color .14s ease, transform .14s ease;
}

.deposit-tools .deposit-month-calendar-option span {
  font-size: 14px;
  font-weight: 800;
}

.deposit-tools .deposit-month-calendar-option small {
  color: inherit;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.deposit-tools .deposit-month-calendar-option:hover {
  transform: translateY(-1px);
  border-color: #86b2da;
  background: #eaf4fe;
  color: #174f82;
}

.deposit-tools .deposit-month-calendar-option.selected {
  border-color: #1f66a6;
  background: linear-gradient(180deg, #2879bd 0%, #1f66a6 100%);
  box-shadow: 0 5px 12px rgba(31, 102, 166, .24);
  color: #fff;
}

.deposit-month-calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e3eaf2;
}

.deposit-tools .deposit-month-calendar-footer button {
  width: auto;
  height: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #28689f;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.deposit-tools .deposit-month-calendar-footer button:hover {
  background: #edf5fc;
}

.deposit-tools select[hidden] + .custom-select,
.deposit-tools input[hidden] {
  display: none !important;
}

.deposit-month-calendar[data-calendar-mode="day"] {
  flex-basis: 214px;
  width: 214px;
}

.deposit-month-calendar[data-calendar-mode="week"] {
  flex-basis: 266px;
  width: 266px;
}

.deposit-month-calendar[data-calendar-mode="quarter"] {
  flex-basis: 194px;
  width: 194px;
}

.deposit-month-calendar[data-calendar-mode="year"] {
  flex-basis: 132px;
  width: 132px;
}

.deposit-month-calendar[data-calendar-mode="day"] .deposit-month-calendar-popover {
  width: 390px;
}

.deposit-month-calendar[data-calendar-mode="week"] .deposit-month-calendar-popover {
  width: 420px;
}

.deposit-month-calendar[data-calendar-mode="quarter"] .deposit-month-calendar-popover,
.deposit-month-calendar[data-calendar-mode="year"] .deposit-month-calendar-popover {
  width: 390px;
}

.deposit-calendar-weekdays,
.deposit-calendar-day-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.deposit-calendar-weekdays {
  margin-bottom: 5px;
}

.deposit-calendar-weekdays span {
  color: #7a899b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
}

.deposit-tools .deposit-calendar-day {
  position: relative;
  width: 100%;
  height: 40px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f7f9fc;
  color: #20354a;
  padding: 0;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.deposit-tools .deposit-calendar-day.unavailable {
  display: block;
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

.deposit-tools .deposit-calendar-day:hover {
  border-color: #88b3da;
  background: #eaf4fe;
  color: #174f82;
}

.deposit-tools .deposit-calendar-day.outside {
  background: transparent;
  color: #abb5c1;
}

.deposit-tools .deposit-calendar-day.today::after {
  content: "";
  position: absolute;
  left: calc(50% - 2px);
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #1f66a6;
}

.deposit-tools .deposit-calendar-day.selected {
  border-color: #1f66a6;
  background: linear-gradient(180deg, #2879bd 0%, #1f66a6 100%);
  box-shadow: 0 4px 10px rgba(31, 102, 166, .22);
  color: #fff;
}

.deposit-tools .deposit-calendar-day.selected::after {
  background: #fff;
}

.deposit-calendar-week-list {
  display: grid;
  gap: 7px;
  max-height: 310px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-color: #83a8c9 #edf3f8;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

.deposit-calendar-week-list::-webkit-scrollbar {
  width: 8px;
}

.deposit-calendar-week-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #edf3f8;
}

.deposit-calendar-week-list::-webkit-scrollbar-thumb {
  border: 2px solid #edf3f8;
  border-radius: 999px;
  background: #83a8c9;
}

.deposit-tools .deposit-calendar-week {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 48px;
  min-height: 48px;
  border: 1px solid #dbe4ee;
  border-radius: 9px;
  background: #f8fafc;
  color: #20354a;
  padding: 0 14px;
  text-align: left;
}

.deposit-tools .deposit-calendar-week strong {
  font-size: 13px;
}

.deposit-tools .deposit-calendar-week span {
  color: #64758a;
  font-size: 12px;
  font-weight: 700;
}

.deposit-tools .deposit-calendar-week:hover {
  border-color: #86b2da;
  background: #eaf4fe;
}

.deposit-tools .deposit-calendar-week.selected {
  border-color: #1f66a6;
  background: linear-gradient(180deg, #2879bd 0%, #1f66a6 100%);
  box-shadow: 0 5px 12px rgba(31, 102, 166, .2);
  color: #fff;
}

.deposit-tools .deposit-calendar-week.selected span {
  color: #e7f3ff;
}

.deposit-calendar-quarter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.deposit-tools .deposit-calendar-quarter {
  display: grid;
  place-content: center;
  gap: 6px;
  height: 84px;
  min-height: 84px;
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  background: #f8fafc;
  color: #20354a;
  text-align: center;
}

.deposit-tools .deposit-calendar-quarter strong {
  font-size: 22px;
}

.deposit-tools .deposit-calendar-quarter span {
  color: #6b7c90;
  font-size: 11px;
  font-weight: 800;
}

.deposit-tools .deposit-calendar-quarter:hover,
.deposit-tools .deposit-calendar-year:hover {
  border-color: #86b2da;
  background: #eaf4fe;
  color: #174f82;
}

.deposit-tools .deposit-calendar-quarter.selected,
.deposit-tools .deposit-calendar-year.selected {
  border-color: #1f66a6;
  background: linear-gradient(180deg, #2879bd 0%, #1f66a6 100%);
  box-shadow: 0 5px 12px rgba(31, 102, 166, .22);
  color: #fff;
}

.deposit-tools .deposit-calendar-quarter.selected span {
  color: #e7f3ff;
}

.deposit-calendar-year-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.deposit-tools .deposit-calendar-year {
  height: 52px;
  min-height: 52px;
  border: 1px solid #dbe4ee;
  border-radius: 9px;
  background: #f8fafc;
  color: #20354a;
  padding: 0;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.deposit-calendar-scroll-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #7a899b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.deposit-calendar-scroll-hint i {
  position: relative;
  width: 12px;
  height: 18px;
  border: 1.5px solid #8aa2b9;
  border-radius: 7px;
}

.deposit-calendar-scroll-hint i::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 2px;
  height: 4px;
  border-radius: 2px;
  background: #4f7ca4;
}

@media (max-width: 720px) {
  .deposit-month-calendar[data-calendar-mode] {
    flex-basis: 100% !important;
    width: 100% !important;
  }

  .deposit-month-calendar[data-calendar-mode] .deposit-month-calendar-popover {
    width: min(390px, calc(100vw - 24px)) !important;
  }
}
