/* ==================================================================
   DEMO BOOKING MODAL — dark dialog over a backdrop blur.
   Reuses landing tokens (--ink, --paper, --hue-*, --hairline*, --ease-standard).
   Class prefix: .dm-*
   ================================================================== */

.dm-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 22, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: dm-fade-in 160ms var(--ease-standard, cubic-bezier(0.2, 0.6, 0.2, 1));
}

.dm-dialog {
  position: relative;
  width: calc(100% - 32px);
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  background: #0d1117;
  color: #e8edf5;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 28px 24px 24px;
  box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.55);
  animation: dm-rise 220ms cubic-bezier(0.2, 0.6, 0.2, 1);
}

@keyframes dm-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes dm-rise {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Close button */
.dm-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: 0;
  color: #8b97b0;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition:
    color 140ms,
    background 140ms;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dm-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

/* Step progress bar */
.dm-steps {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  margin-right: 32px; /* avoid overlap with close button */
}
.dm-step {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 220ms var(--ease-standard, cubic-bezier(0.2, 0.6, 0.2, 1));
}
.dm-step.is-active {
  background: var(--hue-coral, #f04e4e);
}

/* Common stack */
.dm-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dm-h {
  font-family: var(--font-heading, system-ui), system-ui;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: #fff;
  margin: 0;
}
.dm-h-lg {
  font-size: 22px;
}

.dm-sub {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #8b97b0;
}

/* Fields */
.dm-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dm-label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #8b97b0;
  text-transform: none;
}
.dm-req {
  color: var(--hue-coral, #f04e4e);
}
.dm-opt {
  color: rgba(139, 151, 176, 0.55);
}

.dm-input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  background: #161e33;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 140ms;
}
.dm-input::placeholder {
  color: rgba(139, 151, 176, 0.5);
}
.dm-input:focus {
  border-color: #536cbd;
}

/* Errors */
.dm-err {
  font-size: 12px;
  color: var(--hue-coral, #f04e4e);
  margin: 0;
}
.dm-err-center {
  text-align: center;
  padding: 24px 0;
}

/* Primary CTA inside the modal */
.dm-cta {
  width: 100%;
  height: 44px;
  background: #fff;
  color: #0d1117;
  border: 0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    background 140ms,
    opacity 140ms;
}
.dm-cta:hover {
  background: rgba(255, 255, 255, 0.92);
}
.dm-cta:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.dm-cta-spin {
  display: inline-flex;
}

/* Step 2 — calendar */
.dm-step2-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dm-back {
  background: transparent;
  border: 0;
  color: #8b97b0;
  padding: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.dm-back:hover {
  color: #fff;
}

.dm-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 0;
  color: #536cbd;
}

.dm-month-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.dm-month-label {
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
  text-transform: capitalize;
}
.dm-iconbtn {
  background: transparent;
  border: 0;
  color: #8b97b0;
  padding: 4px;
  cursor: pointer;
  border-radius: 6px;
}
.dm-iconbtn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.dm-day-row,
.dm-day-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.dm-day-name {
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  color: rgba(139, 151, 176, 0.55);
  padding: 3px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dm-day {
  height: 34px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: #c8d0de;
  cursor: pointer;
  transition:
    background 140ms,
    color 140ms;
}
.dm-day:hover:not(.is-disabled) {
  background: rgba(255, 255, 255, 0.06);
}
.dm-day.is-sel {
  background: #536cbd;
  color: #fff;
}
.dm-day.is-disabled {
  color: rgba(139, 151, 176, 0.22);
  cursor: not-allowed;
}

/* Time slots */
.dm-date-header {
  font-size: 11.5px;
  font-weight: 500;
  color: #8b97b0;
  margin: 0 0 8px;
}
.dm-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.dm-slot {
  padding: 9px 0;
  background: transparent;
  color: #c8d0de;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 140ms,
    background 140ms,
    color 140ms;
}
.dm-slot:hover {
  border-color: rgba(255, 255, 255, 0.18);
}
.dm-slot.is-sel {
  border-color: #536cbd;
  background: rgba(83, 108, 189, 0.18);
  color: #fff;
}

/* Step 3 — confirmation */
.dm-confirm {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 8px 0 0;
}
.dm-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(101, 202, 165, 0.12);
  color: #65caa5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.dm-card {
  background: #161e33;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}
.dm-card-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.dm-card-icon {
  display: inline-flex;
  color: #536cbd;
  margin-top: 2px;
  flex-shrink: 0;
}
.dm-card-l {
  margin: 0 0 2px;
  font-size: 11px;
  color: #8b97b0;
}
.dm-card-v {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
}
.dm-card-d {
  margin: 0;
  font-size: 12.5px;
  color: #c8d0de;
  line-height: 1.5;
}

.dm-foot {
  margin: 0;
  font-size: 11.5px;
  color: rgba(139, 151, 176, 0.6);
  line-height: 1.5;
}

/* Loader spin */
.dm-spin {
  animation: dm-spin 900ms linear infinite;
}
@keyframes dm-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Mobile */
@media (max-width: 480px) {
  .dm-dialog {
    padding: 24px 20px 20px;
    max-width: 100%;
  }
  .dm-h {
    font-size: 17px;
  }
  .dm-input {
    height: 42px;
  }
  .dm-day {
    height: 36px;
  }
  .dm-slots {
    grid-template-columns: repeat(2, 1fr);
  }
}
