/* ===== Calendar date picker (assets/js/date-picker.js) =====
   Modal calendar ported from marrakechquadbiking.com, in MBB tokens. */
.dp-input {
  cursor: pointer;
  caret-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512' fill='%23c2693d'%3E%3Cpath d='M152 24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H64C28.7 64 0 92.7 0 128v16 48V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V192 144 128c0-35.3-28.7-64-64-64H344V24c0-13.3-10.7-24-24-24s-24 10.7-24 24V64H152V24zM48 192H400V448c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V192z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 16px;
  background-position: right 16px center;
  padding-inline-end: 44px !important;
}
[dir="rtl"] .dp-input { background-position: left 16px center; }

.dp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 30, 19, 0.5);
  z-index: 999;
  display: none;
}
.dp-overlay.is-open { display: block; }

.dp-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(360px, calc(100vw - 32px));
  background: #fff;
  border: 2px solid var(--color-primary);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  padding: 20px;
  display: none;
  font-family: var(--font-body);
}
.dp-modal.is-open { display: block; animation: dpIn 0.25s ease; }
@keyframes dpIn {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

.dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.dp-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-dark);
  text-transform: capitalize;
}
.dp-nav {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.dp-nav:hover:not(:disabled) { background: var(--color-primary-darker); }
.dp-nav:disabled { background: #f3ece4; color: #c9bcae; cursor: not-allowed; }
[dir="rtl"] .dp-nav i { transform: scaleX(-1); }

.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.dp-dh {
  overflow: hidden;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 4px 0 8px;
  text-transform: capitalize;
}
.dp-day {
  border: 0;
  background: none;
  padding: 10px 0;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.dp-day:hover:not(:disabled) { background: rgba(249, 115, 22, 0.12); color: var(--color-primary-darker); }
.dp-day:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.dp-day.is-today { box-shadow: inset 0 0 0 1px #e8dfd4; font-weight: 600; }
.dp-day.is-selected { background: var(--color-primary); color: #fff; font-weight: 700; }
.dp-day:disabled { color: #d6cdc3; cursor: not-allowed; }
.dp-day.is-full { color: #c9bfb4; text-decoration: line-through; background: repeating-linear-gradient(135deg, transparent 0 4px, rgba(0, 0, 0, 0.04) 4px 8px); }

.dp-foot {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--color-border);
  margin-top: 16px;
  padding-top: 14px;
}
.dp-link {
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary-darker);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.dp-link:hover { background: rgba(249, 115, 22, 0.1); }

/* Always-open calendar (attach with `inline`), used on the booking page. */
.dp-inline .dp-head { margin-bottom: 10px; }
.dp-inline .dp-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--color-dark);
  box-shadow: 0 0 0 1px var(--color-border), var(--shadow-sm);
}
.dp-inline .dp-nav:hover:not(:disabled) { background: var(--color-bg-warm-light); color: var(--color-primary-darker); }
.dp-inline .dp-nav:disabled { background: transparent; box-shadow: none; color: #d6cdc3; }
.dp-inline .dp-dh { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.dp-inline .dp-grid { gap: 6px; }
.dp-inline .dp-day { min-height: 44px; padding: 0; font-size: 15px; border-radius: 12px; font-variant-numeric: tabular-nums; }
.dp-inline .dp-day.is-selected { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-darker)); box-shadow: var(--shadow-primary); }
.dp-inline .dp-foot { justify-content: flex-end; margin-top: 12px; padding-top: 10px; }
