.rv-date {
  position: fixed;
  z-index: 30000;
  padding: 0.65rem;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgb(15 23 42 / 14%);
  color: #0f172a;
  font-family: inherit;
}

.rv-date-head {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 5.75rem 2rem;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.rv-date-month {
  text-align: right;
  padding-right: 0.15rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.rv-date-year {
  position: relative;
  width: 5.75rem;
  min-width: 5.75rem;
}

.rv-date-year-btn {
  width: 100%;
  height: 2rem;
  padding: 0 0.35rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.rv-date-years {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 2;
  width: 4.6rem;
  max-height: 7.2rem;
  margin: 0;
  padding: 0.2rem;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgb(15 23 42 / 12%);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.rv-date-years::-webkit-scrollbar {
  width: 4px;
}

.rv-date-years::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.rv-date-year-opt {
  display: block;
  width: 100%;
  padding: 0.28rem 0.35rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.rv-date-year-opt.is-on,
.rv-date-year-opt:hover:not(:disabled) {
  background: #eff6ff;
  color: var(--brand-primary);
}

.rv-date-year-opt:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.rv-date-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 1rem;
  cursor: pointer;
}

.rv-date-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.rv-date-week,
.rv-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.2rem;
}

.rv-date-week {
  margin-bottom: 0.25rem;
}

.rv-date-week span {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
}

.rv-date-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.9rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 0.74rem;
  cursor: pointer;
}

.rv-date-day.is-out,
.rv-date-day:disabled {
  color: #cbd5e1;
  cursor: default;
}

.rv-date-day:disabled:not(.is-out) {
  text-decoration: line-through;
  cursor: not-allowed;
}

.rv-date-day.is-today {
  box-shadow: inset 0 0 0 1px var(--brand-primary);
}

.rv-date-day.is-on {
  background: var(--brand-primary);
  color: #fff;
}

.rv-date-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid #e2e8f0;
}

.rv-date-link {
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.rv-date-link.is-primary {
  color: var(--brand-primary);
}

.rv-date-link:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sf-input.is-picker,
.chat-compose input.is-picker,
.chat-section-input.is-picker {
  cursor: pointer;
  caret-color: transparent;
}

/* A click or double click on the date box opens the calendar; it must not paint the text blue. */
.chat-section-input.is-picker::selection {
  background: transparent;
}

.chat-date-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  flex: none;
}

.chat-date-btn svg {
  width: 18px;
  height: 18px;
}

.sf-date-clear,
.chat-date-clear {
  display: grid;
  place-items: center;
  flex: none;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.sf-date-clear {
  width: 36px;
  margin-right: 4px;
  font-size: 20px;
  line-height: 1;
}

.chat-date-clear {
  width: 28px;
  height: 28px;
}

.chat-date-clear svg {
  width: 16px;
  height: 16px;
}

.sf-date-clear[hidden],
.chat-date-clear[hidden] {
  display: none;
}
