.bf-date-picker {
  position: relative;
  width: 100%;
}

.bf-date-trigger {
  align-items: center;
  background: #fff;
  border: 1px solid #c5c9cc;
  border-radius: 6px;
  color: #222;
  cursor: pointer;
  display: flex;
  font: inherit;
  justify-content: space-between;
  min-height: 50px;
  padding: 10px 14px;
  text-align: left;
  width: 100%;
}

.bf-date-trigger:focus-visible,
.bf-date-nav:focus-visible,
.bf-date-day:focus-visible,
.bf-date-cancel:focus-visible {
  outline: 3px solid #647000;
  outline-offset: 2px;
}

.bf-date-trigger[aria-invalid="true"] {
  border-color: #b42318;
}

.bf-date-trigger svg {
  fill: none;
  flex: 0 0 24px;
  height: 24px;
  stroke: #374000;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 24px;
}

.bf-date-backdrop[hidden],
.bf-date-dialog[hidden],
.bf-date-error[hidden] {
  display: none;
}

.bf-date-backdrop {
  background: rgb(0 0 0 / 48%);
  inset: 0;
  position: fixed;
  z-index: 99998;
}

.bf-date-dialog {
  background: #fff;
  border: 1px solid #d4d7d9;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgb(0 0 0 / 24%);
  color: #202124;
  left: 50%;
  max-width: min(92vw, 380px);
  padding: 16px;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  z-index: 99999;
}

.bf-date-dialog-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bf-date-dialog-header h4 {
  color: #202124;
  font-size: 1.1rem;
  line-height: 1.3;
  margin: 0;
  text-align: center;
}

.bf-date-nav,
.bf-date-cancel {
  align-items: center;
  background: #f4f5f5;
  border: 1px solid #d4d7d9;
  border-radius: 6px;
  color: #202124;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  justify-content: center;
  min-height: 42px;
  min-width: 44px;
}

.bf-date-nav {
  font-size: 1.7rem;
  line-height: 1;
}

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

.bf-date-grid {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.bf-date-grid th {
  color: #454a4d;
  font-size: 0.8rem;
  font-weight: 600;
  height: 36px;
  text-align: center;
}

.bf-date-grid td {
  height: 44px;
  padding: 2px;
  text-align: center;
}

.bf-date-day {
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: #202124;
  cursor: pointer;
  font: inherit;
  height: 40px;
  padding: 0;
  width: 40px;
}

.bf-date-day:hover:not(:disabled) {
  background: #f0f2d4;
}

.bf-date-day.is-selected {
  background: #cbd832;
  color: #171900;
  font-weight: 700;
}

.bf-date-day[aria-current="date"]:not(.is-selected) {
  box-shadow: inset 0 0 0 2px #647000;
  font-weight: 700;
}

.bf-date-day:disabled {
  color: #92989b;
  cursor: not-allowed;
  text-decoration: line-through;
}

.bf-date-dialog-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.bf-date-help {
  color: #454a4d;
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 10px 0 0;
}

.bf-date-cancel {
  padding: 8px 16px;
}

.bf-date-error {
  color: #b42318;
  font-size: 0.9rem;
  margin: 6px 0 0;
}

body.bf-date-picker-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .bf-date-dialog {
    border-radius: 16px 16px 0 0;
    bottom: 0;
    left: 0;
    max-width: none;
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
    top: auto;
    transform: none;
    width: 100%;
  }

  .bf-date-grid td {
    height: 48px;
  }

  .bf-date-day {
    height: 44px;
    width: 44px;
  }
}
