/* PULSE 360 Scheduling — booking page styles.
   Ported from scheduling-mockup-v1.html, May 2026.
   CUSTID-only flow: no form step. Manage page is unchanged. */

:root {
  --bg: #f4f5f9;
  --panel: #ffffff;
  --ink: #0b0d12;
  --muted: #6b7280;
  --line: #e6e8ef;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --success: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(15, 17, 26, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

main {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 24px 32px;
}

.card {
  width: 100%;
  max-width: 960px;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--line);
}
.card.narrow { max-width: 640px; }

/* ----- Header strip ----- */
.card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.card-head .heading-block { min-width: 0; }
.card-head h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.card-head .sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.card-head .spacer { flex: 1; }
.chip {
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

/* ----- Animated EKG logo ----- */
.logo {
  position: relative;
  width: 130px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0b1324 0%, #1a2747 60%, #0f1a38 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35), inset 0 0 0 1px rgba(99, 102, 241, 0.25);
}
.logo .ekg-bg {
  position: absolute;
  left: 0; right: 0;
  top: 15%; bottom: 15%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 40' preserveAspectRatio='none'><path d='M0 20 L4 18 L8 16 L12 18 L14 20 L16 22 L18 5 L20 34 L22 20 L26 20 L30 15 L36 13 L42 15 L48 20 L50 20' stroke='%2322d3ee' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: repeat-x;
  background-size: 52px 100%;
  background-position: 0 center;
  opacity: 0.85;
  filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0.85));
  animation: ekg-scroll 0.85s linear infinite;
}
@keyframes ekg-scroll {
  from { background-position-x: 0px; }
  to   { background-position-x: -52px; }
}
@keyframes ekg-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.95; }
}
.logo .logo-text {
  position: relative;
  z-index: 2;
  color: #fff;
  text-align: center;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.logo .logo-text .l1 {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.logo .logo-text .l2 {
  font-size: 9px;
  font-weight: 700;
  color: #67e8f9;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-top: 4px;
  animation: ekg-pulse 6s ease-in-out infinite;
}

/* Reduced-motion users get a static logo. */
@media (prefers-reduced-motion: reduce) {
  .logo .ekg-bg { animation: none; }
  .logo .logo-text .l2 { animation: none; opacity: 0.85; }
}

/* ----- Body layout ----- */
.body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 0;
}
.body.single { grid-template-columns: 1fr; }
.body .left {
  padding: 20px 26px;
  border-right: 1px solid var(--line);
}
.body .right {
  padding: 20px 26px;
  background: #fafbff;
}
@media (max-width: 780px) {
  .body { grid-template-columns: 1fr; }
  .body .left {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}

h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}
p.lead {
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.5;
  font-size: 14px;
}
.muted { color: var(--muted); }

/* ----- Calendar ----- */
.cal {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px 14px;
  background: #fff;
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.cal-head .month {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.cal-head button {
  width: 28px; height: 28px; border-radius: 8px;
  background: #f2f3f8;
  border: 1px solid var(--line);
  cursor: pointer;
  color: #374151;
  font-size: 14px;
  padding: 0;
  line-height: 1;
}
.cal-head button:hover:not(:disabled) { background: #e8eaf2; }
.cal-head button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.dow, .dates {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.dow div {
  text-align: center;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0 6px;
  font-weight: 600;
}
.dates button {
  aspect-ratio: 1;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  color: #c7cad4;
  cursor: default;
  font-weight: 500;
  position: relative;
  padding: 0;
  font-family: inherit;
}
.dates button.available {
  color: var(--ink);
  background: var(--accent-soft);
  cursor: pointer;
  font-weight: 600;
}
.dates button.available:hover { background: #dde3ff; }
.dates button.selected {
  background: var(--accent) !important;
  color: #fff !important;
}
.dates button.today::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
}
.dates button.selected.today::after { background: #fff; }

/* ----- Time slots ----- */
.times {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.times button {
  padding: 8px 6px;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s ease;
  color: var(--ink);
  font-family: inherit;
}
.times button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.times button.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ----- Format / platform toggles + form fields ----- */
.toggle-group {
  display: flex;
  gap: 6px;
  background: #f2f3f8;
  padding: 4px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  margin-bottom: 12px;
}
.toggle {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 9px;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.toggle:hover { color: var(--ink); }
.toggle.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(15, 17, 26, 0.10);
}

.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field input.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.10);
}
.field textarea {
  min-height: 60px;
  resize: vertical;
  line-height: 1.4;
}
.field-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.field-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  font-weight: 600;
}

/* ----- Time-zone picker ----- */
.tz-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 9px 12px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s;
}
.tz-picker:hover { border-color: #cbd2e0; }
.tz-picker .globe {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.tz-picker .tz-inner { flex: 1; min-width: 0; }
.tz-picker .tz-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  line-height: 1;
}
.tz-picker select {
  width: 100%;
  margin-top: 3px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  font-family: inherit;
  outline: none;
  cursor: pointer;
  padding: 0 18px 0 0;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:disabled {
  background: #c7cad4;
  cursor: not-allowed;
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { background: #f2f3f8; color: var(--ink); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 28px; font-size: 16px; }

.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* ----- Confirm card (replaces dropped form step) ----- */
.confirm-card {
  margin-top: 18px;
  border: 1.5px solid var(--accent);
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.12);
}
.confirm-card .who {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  font-weight: 600;
}
.confirm-card .name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}
.confirm-card .when {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.confirm-card .fmt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}

/* ----- Confirmation screen ----- */
.success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #ecfdf5;
  display: grid;
  place-items: center;
  color: var(--success);
  margin-bottom: 14px;
}
.confirm-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 14px;
}
.confirm-box .k {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}
.confirm-box .v {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.confirm-box .v:last-child { margin-bottom: 0; }

/* ----- Manage flow: choice cards + banner ----- */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}
@media (max-width: 620px) {
  .choice-grid { grid-template-columns: 1fr; }
}
.choice {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 22px 20px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  font-family: inherit;
}
.choice:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.10);
}
.choice .ic {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.choice.danger .ic { background: #fef2f2; color: var(--danger); }
.choice .t { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.choice .d { font-size: 13px; color: var(--muted); line-height: 1.5; }

.banner {
  background: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 100%);
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex; gap: 12px; align-items: flex-start;
}
.banner .ic {
  width: 30px; height: 30px; border-radius: 9px;
  background: #fff; color: var(--accent);
  display: grid; place-items: center; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}
.banner .t { font-weight: 700; margin-bottom: 2px; font-size: 13px; }
.banner .d { font-size: 12px; color: #374151; line-height: 1.45; }

.field select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.btn-danger {
  background: #fff;
  color: var(--danger);
  border: 1.5px solid #fecaca;
}
.btn-danger:hover { background: #fef2f2; }

/* ----- Existing-booking conflict banner ----- */
.conflict {
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
  border: 1.5px solid #fcd34d;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}
.conflict .icon-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.conflict .ic {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--warn);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.conflict h2 { font-size: 20px; margin: 0 0 4px; }
.conflict .d { color: #6b4a0a; font-size: 14px; line-height: 1.55; margin: 0; }
.existing-appt {
  background: #fff;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.existing-appt .cal-ic {
  width: 48px; height: 52px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.existing-appt .cal-ic .m {
  background: var(--accent-hover);
  color: #fff;
  width: 100%;
  font-size: 9px;
  text-transform: uppercase;
  padding: 3px 0;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
}
.existing-appt .cal-ic .d {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  padding: 4px 0;
}
.existing-appt .info .t { font-weight: 700; font-size: 15px; color: var(--ink); }
.existing-appt .info .s { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ----- Inline error/info ----- */
.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
}
.note {
  color: var(--muted);
  font-size: 13px;
  padding: 8px 0;
}

/* ----- Footer ----- */
.footer {
  padding: 10px 24px;
  border-top: 1px solid var(--line);
  background: #fafbff;
  color: var(--muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer .brand-sm {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer .brand-sm .d {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
}

.hide { display: none !important; }
