/* Calendar pickers (date-picker.js). The same file is in frontend/seller/shared
   and frontend/admin/shared: each site is published on its own. */

.dp-source[hidden] {
  display: none !important;
}

.dp-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 190px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cfc7bb;
  border-radius: 8px;
  color: #33261f;
  background: #fff;
  font: inherit;
  font-weight: normal;
  text-align: left;
  cursor: pointer;
}
.dp-trigger:hover:not(:disabled) {
  border-color: #0c1736;
}
.dp-trigger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.dp-trigger:focus-visible {
  outline: 3px solid #090d17;
  outline-offset: 2px;
}
.dp-trigger-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dp-trigger.is-empty .dp-trigger-text {
  color: #6b615a;
}
.dp-trigger-icon {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #0c1736;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dp-popover {
  position: fixed;
  z-index: 1000;
  padding: 12px;
  border: 1px solid #e4e0d6;
  border-radius: 14px;
  color: #33261f;
  background: #fff;
  box-shadow: 0 14px 34px rgba(51, 38, 31, 0.16);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
}

.dp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.dp-title {
  font-weight: bold;
}
.dp-nav {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #e4e0d6;
  border-radius: 8px;
  color: #33261f;
  background: #fff;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.dp-nav:hover {
  background: #f1eee8;
}

.dp-weekdays,
.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 38px);
}
.dp-weekdays span {
  padding: 4px 0;
  color: #6b615a;
  font-size: 12px;
  text-align: center;
}
.dp-grid.is-months {
  grid-template-columns: repeat(3, 78px);
  row-gap: 6px;
}

/* A cell's ::before is the band that joins a range; the round button sits
   on top. The start and end cells carry only the inner half of the band. */
.dp-cell {
  position: relative;
  display: grid;
  place-items: center;
  height: 38px;
}
.dp-cell::before {
  content: "";
  position: absolute;
  inset: 2px 0;
}
.dp-cell.in-range::before {
  background: #eae7df;
}
.dp-cell.range-start:not(.range-end)::before {
  background: linear-gradient(to right, transparent 50%, #eae7df 50%);
}
.dp-cell.range-end:not(.range-start)::before {
  background: linear-gradient(to left, transparent 50%, #eae7df 50%);
}
.dp-grid:not(.is-months) .dp-cell.in-range:nth-child(7n + 1)::before,
.dp-grid.is-months .dp-cell.in-range:nth-child(3n + 1)::before {
  border-radius: 999px 0 0 999px;
}
.dp-grid:not(.is-months) .dp-cell.in-range:nth-child(7n)::before,
.dp-grid.is-months .dp-cell.in-range:nth-child(3n)::before {
  border-radius: 0 999px 999px 0;
}

.dp-day {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.dp-grid.is-months .dp-day {
  width: 70px;
}
.dp-day:hover {
  background: #f1eee8;
}
.dp-day:focus-visible {
  outline: 3px solid #090d17;
  outline-offset: 1px;
}
.dp-cell.is-outside .dp-day {
  color: #b5a99f;
}
.dp-cell.is-today .dp-day {
  font-weight: bold;
  box-shadow: inset 0 0 0 1px #0c1736;
}
.dp-cell.is-selected .dp-day,
.dp-cell.range-start .dp-day,
.dp-cell.range-end .dp-day {
  color: #fff;
  background: #0c1736;
  box-shadow: none;
  font-weight: bold;
}

.dp-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e4e0d6;
}
.dp-action {
  padding: 7px 14px;
  border: 1px solid #e4e0d6;
  border-radius: 8px;
  color: #33261f;
  background: #fff;
  font: inherit;
  cursor: pointer;
}
.dp-action:hover {
  background: #f1eee8;
}
.dp-action.dp-primary {
  border-color: #0c1736;
  color: #fff;
  background: #0c1736;
}
.dp-action.dp-primary:hover {
  background: #090d17;
}
.dp-times {
  display: flex;
  gap: 10px;
  width: 100%;
}
.dp-time {
  display: grid;
  flex: 1;
  gap: 4px;
  font-size: 13px;
  font-weight: bold;
}
.dp-time input {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid #cfc7bb;
  border-radius: 7px;
  font: inherit;
  font-weight: normal;
}
