/* ── Fulfillment Modal — Queens Hive ──────────────────────────────────────── */

#qh-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#qh-overlay[hidden] { display: none; }

/* Modal panel */
.qh-modal {
  background: #fff;
  border-radius: 10px;
  padding: 2.5rem 2rem 2rem;
  width: 100%;
  max-width: 540px;
  max-height: 90dvh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.22);
  border-top: 4px solid var(--primary);
}

/* When Cal.com is visible, allow more width */
#qh-pickup-section:not([hidden]) ~ * .qh-modal,
.qh-modal:has(#qh-cal-wrapper:not([hidden])) {
  max-width: 680px;
}

/* Close button */
.qh-close {
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: #999;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s;
}
.qh-close:hover { color: #333; }

/* Topper / eyebrow */
.qh-topper {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.qh-modal-h2 {
  font-family: 'Caveat Brush', cursive;
  font-size: 2.25rem;
  color: var(--headerColor);
  margin-bottom: 1.4rem;
  line-height: 1.1;
  font-weight: 400;
}

/* ── Radio cards ──────────────────────────────────────────────────────────── */
.qh-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.qh-radio { cursor: pointer; display: block; }

/* Visually hide the native radio */
.qh-radio input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.qh-radio-card {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  border: 2px solid #e0d5c1;
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
  position: relative;
  padding-left: 2.6rem;
  background-color: var(--background);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.1 0'/%3E%3C/filter%3E%3Crect width='400' height='400' fill='%23F4F0E6'/%3E%3Crect width='400' height='400' filter='url(%23a)'/%3E%3C/svg%3E");
  background-blend-mode: multiply;
}

/* Custom radio dot */
.qh-radio-card::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  border-radius: 50%;
  background: #fff;
  transition: border-color 0.15s;
}

.qh-radio input:checked + .qh-radio-card::before {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 3px #fff;
}

.qh-radio-card strong {
  color: var(--headerColor);
  font-weight: 700;
  font-family: 'Fraunces', serif;
}
.qh-radio-card em {
  font-style: normal;
  font-size: 0.83rem;
  color: #5C4A38;
}

.qh-radio input:checked + .qh-radio-card {
  border-color: var(--primary);
  background-color: #fdfaf6;
}
.qh-radio-card:hover { border-color: #c9b99a; }

/* ── Conditional sections ─────────────────────────────────────────────────── */
.qh-conditional {
  background: #fdfaf6;
  border: 1px solid #e0d5c1;
  border-radius: 7px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.1rem;
}
.qh-conditional[hidden] { display: none; }

/* Select */
.qh-select-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--headerColor);
  margin-bottom: 0.75rem;
  font-family: 'Fraunces', serif;
}
.qh-select-label select {
  padding: 0.5rem 0.75rem;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--headerColor);
  width: 100%;
  cursor: pointer;
}
.qh-select-label select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  border-color: var(--primary);
}

/* Notice text */
.qh-notice {
  font-size: 0.84rem;
  color: #5C4A38;
  margin: 0;
  line-height: 1.55;
  font-family: 'Lato', sans-serif;
}
.qh-notice--cal {
  border-left: 3px solid var(--primary);
  padding-left: 0.75rem;
  margin-bottom: 0.85rem;
}

/* Cal.com booking confirmed badge */
.qh-cal-confirmed {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #2e7d32;
  font-weight: 700;
  font-size: 0.9rem;
  background: #f1f8e9;
  border: 1px solid #a5d6a7;
  border-radius: 6px;
  padding: 0.55rem 0.85rem;
  margin-top: 0.75rem;
}
.qh-cal-confirmed[hidden] { display: none; }

/* ── CTA button ───────────────────────────────────────────────────────────── */
.qh-cta {
  display: block;
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: var(--primary);
  color: #000 !important;
  border: none;
  border-radius: 7px;
  font-family: 'Caveat Brush', cursive;
  font-size: 1.5rem;
  font-weight: 400;
  cursor: pointer;
  margin-top: 1rem;
  letter-spacing: 0.02em;
  transform: rotate(-1deg);
  transition: transform 0.3s, background-color 0.3s, box-shadow 0.3s;
}
.qh-cta:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.qh-cta:not(:disabled):hover { 
  background: var(--primaryLight); 
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .qh-modal { padding: 2rem 1.25rem 1.5rem; }
  .qh-modal-h2 { font-size: 1.8rem; }
}
