.wht-order-modal {
  --ow-accent: #4a7c59;
  --ow-accent-hover: #3d6a4a;
  --ow-bg: #ffffff;
  --ow-card-bg: #f8f9fa;
  --ow-card-border: #e0e0e0;
  --ow-text: #333333;
  --ow-text-muted: #666666;
  --ow-error: #c0392b;
  --ow-radius: 10px;
  --ow-shadow: 0 12px 40px rgba(0,0,0,0.18);

  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: stretch;
  justify-content: center;
  font-family: inherit;
  color: var(--ow-text);
}

.wht-order-modal.open {
  display: flex;
}

.wht-order-modal *,
.wht-order-modal *::before,
.wht-order-modal *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.ow-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 32, 24, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.wht-order-modal.open .ow-backdrop {
  opacity: 1;
}

.ow-card {
  position: relative;
  background: var(--ow-bg);
  width: 100%;
  max-width: 640px;
  margin: auto;
  border-radius: var(--ow-radius);
  box-shadow: var(--ow-shadow);
  padding: 32px 28px;
  transform: translateY(16px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.wht-order-modal.open .ow-card {
  transform: translateY(0);
  opacity: 1;
}

.ow-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--ow-text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.ow-close:hover {
  color: var(--ow-text);
  background: var(--ow-card-bg);
}

.ow-close svg {
  width: 20px;
  height: 20px;
}

.ow-progress {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.ow-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ow-card-border);
  transition: background 0.3s, transform 0.3s;
}

.ow-dot.active {
  background: var(--ow-accent);
  transform: scale(1.3);
}

.ow-dot.completed {
  background: var(--ow-accent);
}

.ow-step {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ow-step.visible {
  display: block;
}

.ow-step.active {
  opacity: 1;
  transform: translateY(0);
}

.ow-question {
  font-size: 1.35em;
  font-weight: 600;
  text-align: center;
  margin-bottom: 6px;
  line-height: 1.3;
}

.ow-subtitle {
  text-align: center;
  color: var(--ow-text-muted);
  margin-bottom: 24px;
  font-size: 0.95em;
}

.ow-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--ow-text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9em;
  padding: 8px 0;
  margin-bottom: 12px;
  transition: color 0.2s;
}

.ow-back:hover {
  color: var(--ow-text);
}

.ow-back svg {
  width: 16px;
  height: 16px;
}

.ow-input-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  max-width: 320px;
  margin: 0 auto 14px;
}

.ow-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--ow-card-border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.ow-input-wrap:focus-within {
  border-color: var(--ow-accent);
}

.ow-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 1.05em;
  padding: 12px 14px;
  color: var(--ow-text);
  background: transparent;
  min-width: 0;
}

.ow-input-wrap input::placeholder {
  color: #c5c5c5;
}

.ow-input-suffix {
  padding: 0 14px 0 0;
  color: var(--ow-text-muted);
  font-size: 0.95em;
  font-weight: 500;
  pointer-events: none;
  white-space: nowrap;
}

/* Strip native number-input spinners so our custom stepper is the only control */
.wht-order-modal input[type="number"]::-webkit-outer-spin-button,
.wht-order-modal input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wht-order-modal input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.ow-stepper {
  display: flex;
  align-items: stretch;
  gap: 10px;
  max-width: 280px;
  margin: 0 auto 14px;
}

.ow-stepper-btn {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ow-card-bg);
  border: 1.5px solid var(--ow-card-border);
  border-radius: 8px;
  color: var(--ow-accent);
  cursor: pointer;
  font-family: inherit;
  font-size: 1.6em;
  font-weight: 600;
  line-height: 1;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.ow-stepper-btn:hover {
  border-color: var(--ow-accent);
  background: #eef4f0;
}

.ow-stepper-btn:active {
  background: var(--ow-accent);
  color: #fff;
}

.ow-stepper-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.ow-stepper .ow-input-wrap {
  flex: 1;
  height: 52px;
}

.ow-stepper .ow-input-wrap input {
  text-align: center;
  font-size: 1.4em;
  font-weight: 700;
  padding: 0 4px;
}

.ow-helper {
  text-align: center;
  font-size: 0.88em;
  color: var(--ow-text-muted);
  margin-top: 4px;
}

.ow-helper a {
  color: var(--ow-accent);
  font-weight: 600;
  text-decoration: underline;
}

.ow-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

.ow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ow-accent);
  color: #fff;
  border: none;
  border-radius: var(--ow-radius);
  padding: 14px 28px;
  font-family: inherit;
  font-size: 1em;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  text-decoration: none;
  width: 100%;
}

.ow-btn:hover {
  background: var(--ow-accent-hover);
}

.ow-btn[disabled],
.ow-btn.loading {
  opacity: 0.6;
  cursor: not-allowed;
}

.ow-btn-secondary {
  background: transparent;
  color: var(--ow-accent);
  border: 2px solid var(--ow-accent);
}

.ow-btn-secondary:hover {
  background: var(--ow-accent);
  color: #fff;
}

.ow-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ow-tile {
  background: var(--ow-card-bg);
  border: 2px solid var(--ow-card-border);
  border-radius: var(--ow-radius);
  padding: 24px 16px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  text-align: center;
  color: var(--ow-text);
}

.ow-tile:hover {
  border-color: var(--ow-accent);
  box-shadow: var(--ow-shadow);
  transform: translateY(-2px);
}

.ow-tile-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef4f0;
  border-radius: 50%;
  color: var(--ow-accent);
}

.ow-tile-icon svg {
  width: 30px;
  height: 30px;
}

.ow-tile-label {
  font-weight: 700;
  font-size: 1.05em;
}

.ow-tile-desc {
  color: var(--ow-text-muted);
  font-size: 0.86em;
  line-height: 1.4;
}

.ow-msg {
  text-align: center;
  margin-top: 12px;
  font-size: 0.93em;
  min-height: 22px;
}

.ow-msg.error {
  color: var(--ow-error);
}

.ow-msg.success {
  color: var(--ow-accent);
}

.ow-price-block {
  background: var(--ow-card-bg);
  border: 1px solid var(--ow-card-border);
  border-radius: var(--ow-radius);
  padding: 12px 16px;
  margin: 0 auto 16px;
  max-width: 280px;
}

.ow-price-block[hidden] {
  display: none;
}

.ow-price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  font-size: 0.95em;
}

.ow-price-row + .ow-price-row {
  border-top: 1px solid var(--ow-card-border);
}

.ow-price-label {
  color: var(--ow-text-muted);
}

.ow-price-value {
  font-weight: 600;
  color: var(--ow-text);
}

.ow-price-subtotal {
  font-weight: 700;
}

.ow-price-subtotal .ow-price-label,
.ow-price-subtotal .ow-price-value {
  color: var(--ow-accent);
}

.ow-summary {
  background: var(--ow-card-bg);
  border: 1px solid var(--ow-card-border);
  border-radius: var(--ow-radius);
  padding: 18px 20px;
  margin-bottom: 8px;
}

/* Custom calendar (preferred delivery date) ---------------------------- */

.ow-calendar {
  background: var(--ow-card-bg);
  border: 1px solid var(--ow-card-border);
  border-radius: var(--ow-radius);
  padding: 14px;
  margin: 0 auto 12px;
  max-width: 360px;
}

.ow-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ow-cal-title {
  font-weight: 700;
  font-size: 1em;
  color: var(--ow-text);
}

.ow-cal-nav {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--ow-card-border);
  background: #fff;
  color: var(--ow-accent);
  font-size: 1.2em;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.ow-cal-nav:hover:not([disabled]) {
  background: #eef4f0;
  border-color: var(--ow-accent);
}

.ow-cal-nav[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.ow-cal-dow,
.ow-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.ow-cal-dow {
  margin-bottom: 4px;
}

.ow-cal-dow span {
  text-align: center;
  font-size: 0.78em;
  font-weight: 600;
  color: var(--ow-text-muted);
  padding: 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ow-cal-dow .ow-cal-dow-we {
  color: #b5b5b5;
}

.ow-cal-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.95em;
  font-weight: 500;
  background: #fff;
  color: var(--ow-text);
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.ow-cal-cell:hover:not(.ow-cal-disabled):not(.ow-cal-empty) {
  border-color: var(--ow-accent);
  background: #eef4f0;
}

.ow-cal-cell.ow-cal-empty {
  background: transparent;
  cursor: default;
  pointer-events: none;
}

.ow-cal-cell.ow-cal-disabled {
  color: #c5c5c5;
  background: transparent;
  cursor: not-allowed;
  text-decoration: line-through;
  text-decoration-color: #e0e0e0;
}

.ow-cal-cell.ow-cal-weekend.ow-cal-disabled {
  color: #d4b0b0;
  background: #fbf3f3;
}

/* Admin-configured blackout dates (window.WHT_BLOCKED_DATES) */
.ow-cal-cell.ow-cal-blocked {
  color: #c5c5c5;
  background: #f5f5f5;
  text-decoration: line-through;
  text-decoration-color: #d5d5d5;
}

.ow-cal-cell.ow-cal-today {
  border-color: var(--ow-card-border);
  font-weight: 700;
}

.ow-cal-cell.ow-cal-today:not(.ow-cal-disabled) {
  color: var(--ow-accent);
}

.ow-cal-cell.ow-cal-sel {
  background: var(--ow-accent);
  color: #fff;
  border-color: var(--ow-accent);
  font-weight: 700;
}

.ow-cal-cell.ow-cal-sel:hover {
  background: var(--ow-accent-hover);
  border-color: var(--ow-accent-hover);
  color: #fff;
}

.ow-cal-selection {
  text-align: center;
  font-size: 0.9em;
  color: var(--ow-text-muted);
  margin: 0 0 10px;
}

.ow-cal-selection.has-date {
  color: var(--ow-accent);
  font-weight: 600;
}

.ow-cal-note {
  text-align: center;
  font-size: 0.85em;
  color: var(--ow-text-muted);
  margin: 0 auto 14px;
  max-width: 420px;
  line-height: 1.45;
}

.ow-cal-clear {
  background: none;
  border: none;
  color: var(--ow-text-muted);
  font-family: inherit;
  font-size: 0.88em;
  cursor: pointer;
  padding: 4px;
  text-decoration: underline;
  transition: color 0.15s;
}

.ow-cal-clear:hover {
  color: var(--ow-error);
}

@media (max-width: 540px) {
  .ow-calendar { max-width: none; }
  .ow-cal-cell { font-size: 0.88em; }
}

.ow-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  font-size: 0.95em;
}

.ow-summary-row + .ow-summary-row {
  border-top: 1px solid var(--ow-card-border);
}

.ow-summary-row.total {
  font-weight: 700;
  font-size: 1.1em;
  color: var(--ow-accent);
}

.ow-summary-label {
  color: var(--ow-text-muted);
}

.ow-summary-row.total .ow-summary-label {
  color: var(--ow-text);
}

.ow-summary-value {
  color: var(--ow-text);
  font-weight: 600;
}

@media (max-width: 540px) {
  .ow-card {
    max-width: none;
    margin: 0;
    border-radius: 0;
    padding: 56px 18px 24px;
    max-height: 100vh;
    min-height: 100vh;
  }

  .ow-question {
    font-size: 1.15em;
  }

  .ow-tiles {
    grid-template-columns: 1fr;
  }

  .ow-input-row {
    max-width: none;
  }
}
