/* ── Demo Modal v4 — Find a Time ──
   Single-panel booking form → ChiliPiper calendar popup */

/* ─── Overlay ─── */
.demo-v4-overlay {
  position: fixed; inset: 0; z-index: 2147483647;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: demo4-fadein 0.2s ease-out;
}
.demo-v4-overlay.hidden { display: none; }

.demo-v4-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ─── Card ─── */
.demo-v4-card {
  position: relative; z-index: 1;
  max-width: 440px; width: 100%;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  transform: translateY(12px) scale(0.97);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}
.demo-v4-card.demo-v4-card--enter {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.demo-v4-card.demo-v4-card--exit {
  transform: translateY(8px) scale(0.96);
  opacity: 0;
}

/* ─── Close ─── */
.demo-v4-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none; cursor: pointer;
  padding: 6px; border-radius: 8px;
  color: #94a3b8; transition: color 0.15s, background 0.15s;
  line-height: 1;
}
.demo-v4-close:hover { color: #475569; background: #f1f5f9; }

/* ─── Body ─── */
.demo-v4-body { text-align: left; }

.demo-v4-label {
  display: inline-block;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: #3b82f6; margin-bottom: 0.5rem;
}

.demo-v4-title {
  font-size: 1.5rem; font-weight: 700; color: #0f172a;
  line-height: 1.25; margin: 0 0 1.5rem;
}

/* ─── Form ─── */
#demo-v4-form { display: flex; flex-direction: column; gap: 0; }

.demo-v4-row { margin-bottom: 1rem; }

.demo-v4-label-field {
  display: block; font-size: 0.8125rem; font-weight: 500;
  color: #334155; margin-bottom: 0.375rem;
}
.demo-v4-label-field .req { color: #ef4444; }

.demo-v4-row input {
  width: 100%; box-sizing: border-box;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem; color: #0f172a;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.demo-v4-row input::placeholder { color: #94a3b8; }
.demo-v4-row input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.demo-v4-row input.is-invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ─── Submit Button ─── */
.demo-v4-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; padding: 0.8125rem 1.5rem;
  margin-top: 0.25rem;
  font-size: 1rem; font-weight: 600;
  color: #fff; background: #2563eb;
  border: none; border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}
.demo-v4-btn:hover:not(:disabled) { background: #1d4ed8; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35); }
.demo-v4-btn:active:not(:disabled) { transform: scale(0.98); }
.demo-v4-btn:disabled { opacity: 0.7; cursor: not-allowed; }

/* ─── Spinner ─── */
.demo-v4-spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: demo4-spin 0.6s linear infinite;
  vertical-align: middle; margin-right: 6px;
}

/* ─── Privacy ─── */
.demo-v4-privacy {
  font-size: 0.75rem; color: #94a3b8;
  text-align: center; margin-top: 1rem; margin-bottom: 0;
}

/* ─── Animations ─── */
@keyframes demo4-fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes demo4-spin { to { transform: rotate(360deg); } }

/* ─── Responsive ─── */
@media (max-width: 480px) {
  .demo-v4-card { padding: 1.5rem; border-radius: 14px; }
  .demo-v4-title { font-size: 1.25rem; }
}
