/* ═══════════════════════════════════════════════════════════════
   Datepicker — Design System.html L1862–1929
   Modes: single | range
   Optional time-slot grid below
   ═══════════════════════════════════════════════════════════════ */

.dp {
  background: var(--sam-white);
  border: 1px solid var(--sam-light);
  border-radius: 12px;
  padding: 20px;
  display: inline-block;
  min-width: 300px;
}

.dp__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.dp__nav {
  width: 32px; height: 32px;
  border: 1px solid var(--sam-light);
  background: var(--sam-white);
  border-radius: 8px;
  cursor: pointer;
  font: inherit; font-size: 16px;
  color: var(--sam-dark);
  display: flex; align-items: center; justify-content: center;
  transition: background .12s, border-color .12s;
}
.dp__nav:hover { background: var(--sam-brown-light); }
.dp__nav:disabled { opacity: .35; cursor: not-allowed; }
.dp__title { margin: 0; font-size: 15px; font-weight: 700; color: var(--sam-dark); text-transform: capitalize; }

.dp__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
  color: var(--sam-medium);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}
.dp__weekdays div { text-align: center; padding: 6px 0; }

.dp__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-size: 13.5px;
}
.dp__day {
  height: 38px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--sam-dark);
  font: inherit;
  font-size: 13.5px;
  border-radius: 8px;
  transition: background .12s, color .12s;
  position: relative;
}
.dp__day:hover:not(:disabled):not(.is-selected) { background: var(--sam-brown-light); }
.dp__day.is-out { color: var(--sam-medium); opacity: .5; }
.dp__day.is-today { font-weight: 700; box-shadow: inset 0 0 0 2px var(--sam-red); }
.dp__day.is-disabled, .dp__day:disabled { color: var(--sam-medium); opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.dp__day.is-selected,
.dp__day.is-range-start,
.dp__day.is-range-end {
  background: var(--sam-red);
  color: #fff;
  font-weight: 700;
}
.dp__day.is-range-mid {
  background: var(--sam-brown-light);
  color: var(--sam-dark);
  border-radius: 0;
}
.dp__day.is-range-start { border-radius: 8px 0 0 8px; }
.dp__day.is-range-end { border-radius: 0 8px 8px 0; }
.dp__day.is-range-start.is-range-end { border-radius: 8px; }

.dp__footer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--sam-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.dp__footer .label { color: var(--sam-medium); }
.dp__footer .value { font-weight: 700; color: var(--sam-dark); font-variant-numeric: tabular-nums; }
.dp__footer .actions { margin-left: auto; display: flex; gap: 8px; }

/* Date-input wrapper */
.dp-input-wrap { position: relative; }
.dp-input-wrap input {
  width: 100%;
  padding: 10px 38px 10px 12px;
  border: 1.5px solid var(--sam-light);
  border-radius: 8px;
  font: inherit;
  font-size: 14.5px;
  color: var(--sam-dark);
  background: var(--sam-white) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23848484' stroke-width='2' stroke-linecap='round'><rect x='3' y='4' width='18' height='18' rx='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>") no-repeat right 10px center;
  cursor: pointer;
}
.dp-input-wrap input:focus {
  outline: none;
  border-color: var(--sam-dark);
  box-shadow: 0 0 0 3px rgba(49,49,49,.12);
}

.dp-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 80;
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
  border-radius: 12px;
  display: none;
}
.dp-pop.is-open { display: block; }

/* Time-slot grid */
.dp-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
@media (min-width: 480px) {
  .dp-slots { grid-template-columns: repeat(4, 1fr); }
}
.dp-slot {
  height: 44px;
  border: 1px solid var(--sam-light);
  background: var(--sam-white);
  border-radius: 8px;
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--sam-dark);
  transition: border-color .12s, background .12s;
}
.dp-slot:hover:not(:disabled):not(.is-selected) {
  border-color: var(--sam-dark);
  background: var(--sam-brown-light);
}
.dp-slot.is-selected {
  background: var(--sam-red);
  color: #fff;
  border-color: var(--sam-red);
  font-weight: 700;
}
.dp-slot:disabled,
.dp-slot.is-disabled {
  background: #f5f5f5;
  color: var(--sam-medium);
  cursor: not-allowed;
  text-decoration: line-through;
}

.dp-slots-head { font-size: 13px; color: var(--sam-brown-dark); margin-top: 8px; }
.dp-slots-head strong { color: var(--sam-dark); }

@media (max-width: 380px) {
  .dp { min-width: 0; width: 100%; padding: 16px; }
  .dp__day { height: 34px; font-size: 13px; }
}
