/* dd-mm-yyyy date picker — mocked and agreed: docs/mockups/forms/2026-10-22-date-picker.html
   Self-contained: the portal and admin layouts do not load taxi-custom.css. The values are the brand
   tokens (TaxiBrand.md) with their hex as the fallback. */
.ddp {
  --ddp-green: var(--green, #507122);
  --ddp-green-light: rgba(80, 113, 34, 0.09);
  --ddp-ink: var(--ink, #7a0c13);
  --ddp-line: var(--line, #dee0d2);
  --ddp-card: #fff;
  --ddp-text: #212529;
  --ddp-kerb: #896a6b;
  --ddp-danger: #b3261e;
  --ddp-danger-light: #fbeae9;
  --ddp-off: #b9bbae;
  position: relative;
  display: block;
  max-width: 100%;
}
.ddp-box {
  position: relative;
}
.ddp .ddp-in {
  width: 100%;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}
/* the size the site gives its date boxes (taxi-custom.css), so the text matches its neighbours */
.ddp .ddp-in.form-control-lg {
  font-size: 1.125rem;
  line-height: 1.5;
  min-height: calc(1.5em + 1rem + 3px);
}
.ddp-lead .ddp-in {
  padding-left: 2.9rem;
}
.ddp-sm .ddp-in {
  padding-right: 2.4rem;
}
.ddp-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 44px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ddp-green);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.ddp-lead .ddp-btn {
  left: 0;
}
.ddp-sm .ddp-btn {
  right: 0;
  width: 34px;
}
.ddp-btn svg {
  width: 20px;
  height: 20px;
}
.ddp-sm .ddp-btn svg {
  width: 16px;
  height: 16px;
}
.ddp-btn:focus-visible {
  outline: 2px solid var(--ddp-green);
  outline-offset: -3px;
}
.ddp[data-invalid='true'] .ddp-in {
  border-color: var(--ddp-danger) !important;
  background-color: var(--ddp-danger-light);
}
.ddp-msg {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ddp-danger);
}
.ddp[data-invalid='true'] .ddp-msg {
  display: block;
}
/* the old calendar icon of a .form-icon wrapper: ours is the button now */
.form-icon:has(.ddp) > .icons,
.form-icon:has(.ddp) > svg.feather {
  display: none;
}
.ddp-pop {
  position: absolute;
  z-index: 2000;
  top: calc(100% + 6px);
  left: 0;
  width: 300px;
  max-width: calc(100vw - 32px);
  display: none;
  padding: 12px;
  background: var(--ddp-card);
  color: var(--ddp-text);
  border: 1px solid var(--ddp-line);
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(20, 23, 15, 0.06),
    0 6px 20px -8px rgba(20, 23, 15, 0.14);
  font-size: 14px;
  text-align: left;
}
.ddp-open .ddp-pop {
  display: block;
}
.ddp-up .ddp-pop {
  top: auto;
  bottom: calc(100% + 6px);
}
.ddp-sheet-head {
  display: none;
}
.ddp-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.ddp-title {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--ddp-text);
}
.ddp-title select {
  height: 34px;
  padding: 0 4px;
  font-size: 14px;
  color: var(--ddp-text);
  background: var(--ddp-card);
  border: 1px solid var(--ddp-line);
  border-radius: 6px;
}
.ddp-nav {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--ddp-text);
  background: var(--ddp-card);
  border: 1px solid var(--ddp-line);
  border-radius: 8px;
  cursor: pointer;
}
.ddp-nav:disabled {
  color: var(--ddp-off);
  cursor: not-allowed;
}
.ddp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.ddp-wd {
  padding: 4px 0;
  font-size: 11px;
  text-align: center;
  text-transform: uppercase;
  color: var(--ddp-kerb);
  overflow: hidden;
}
.ddp-d {
  height: 40px;
  padding: 0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--ddp-text);
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.ddp-d:hover:not(:disabled) {
  background: var(--ddp-green-light);
}
.ddp-d:disabled {
  color: var(--ddp-off);
  cursor: not-allowed;
  text-decoration: line-through;
}
.ddp-d.ddp-today {
  box-shadow: inset 0 0 0 1px var(--ddp-kerb);
}
.ddp-d.ddp-sel {
  background: var(--ddp-green);
  color: #fff;
  font-weight: 600;
}
.ddp-d:focus-visible,
.ddp-nav:focus-visible,
.ddp-link:focus-visible {
  outline: 2px solid var(--ddp-green);
  outline-offset: 1px;
}
.ddp-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.ddp-link {
  min-height: 40px;
  padding: 10px 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ddp-green);
  background: none;
  border: 0;
  cursor: pointer;
}
.ddp-back {
  position: fixed;
  inset: 0;
  z-index: 1999;
  display: none;
  background: rgba(20, 23, 15, 0.5);
}
.ddp-back.ddp-on {
  display: block;
}
/* phone: bottom sheet, 44px days, 44px box */
@media (max-width: 600px) {
  .ddp-pop {
    position: fixed;
    z-index: 2000;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
    padding: 12px max(16px, env(safe-area-inset-right, 0px))
      calc(12px + env(safe-area-inset-bottom, 0px))
      max(16px, env(safe-area-inset-left, 0px));
    border-radius: 16px 16px 0 0;
  }
  .ddp-sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--ddp-ink);
  }
  .ddp-d {
    height: 44px;
    font-size: 15px;
  }
  .ddp-nav {
    width: 44px;
    height: 44px;
  }
  .ddp-sm .ddp-in {
    font-size: 16px;
    min-height: 44px;
  }
  .ddp-sm .ddp-btn {
    width: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ddp * {
    transition: none !important;
  }
}
