/*
 * Rob Wiley, P.C. — Client Booking Wizard Styles
 * Premium, modern UI with smooth micro-animations.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f4f8;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── Page shell ── */
.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.bk-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

.bk-header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: .9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bk-logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -.3px;
}

.bk-logo span {
  color: inherit;
}

.bk-header-tag {
  font-size: .78rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── Flash error ── */
.flash-error {
  max-width: 680px;
  margin: 1rem auto 0;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: .75rem 1.1rem;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* ── Main ── */
.bk-main {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  flex: 1;
  width: 100%;
}

/* ── Progress steps ── */
.progress-wrap {
  margin-bottom: 2.25rem;
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  min-width: 64px;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  border: 2px solid #e2e8f0;
  display: block;
  transition: all .25s ease;
}

.step.active .step-dot {
  background: #0f6e56;
  border-color: #0f6e56;
  box-shadow: 0 0 0 4px rgba(15, 110, 86, .15);
}

.step-label {
  font-size: .7rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .4px;
  transition: color .25s;
}

.step.active .step-label {
  color: #0f6e56;
}

.step-line {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin-bottom: 16px;
  transition: background .25s;
}

/* ── Step panels ── */
.bk-step {
  animation: fadeUp .3s ease;
}

.bk-step.hidden,
.bk-screen.hidden,
.hidden {
  display: none !important;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: .4rem;
}

.step-sub {
  font-size: .9rem;
  color: #64748b;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Soft-warning flagged-responses list: darker than the surrounding muted copy
   so the flagged items stand out. Only the reasons that apply are rendered. */
.screen-warn-reasons {
  margin: -.75rem 0 1.5rem;
  padding-left: 1.25rem;
  font-size: .9rem;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.6;
}
.screen-warn-reasons li { margin: .15rem 0; }

/* ── Attorney grid ── */
.attorney-grid {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.attorney-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all .2s ease;
  font-family: inherit;
}

.attorney-card:hover {
  border-color: #0f6e56;
  box-shadow: 0 4px 16px rgba(15, 110, 86, .12);
  transform: translateY(-1px);
}

.attorney-card.selected {
  border-color: #0f6e56;
  background: #f0faf7;
}

.ac-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f6e56, #1a9b78);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ac-info {
  flex: 1;
}

.ac-name {
  font-size: .98rem;
  font-weight: 600;
  color: #0f172a;
}

.ac-badge {
  display: inline-block;
  margin-top: .25rem;
  padding: .15rem .55rem;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 600;
}

.badge-sta {
  background: #e0f2fe;
  color: #0369a1;
}

.badge-office {
  background: #f1f5f9;
  color: #475569;
}

.ac-arrow {
  font-size: 1.1rem;
  color: #cbd5e1;
  transition: transform .2s;
}

.attorney-card:hover .ac-arrow {
  transform: translateX(4px);
  color: #0f6e56;
}

/* ── Slot list ── */
.back-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-bottom: 1rem;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.back-btn:hover {
  color: #0f6e56;
}

.slot-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1rem;
}

.slot-btn {
  display: flex;
  align-items: center;
  gap: .85rem;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: .9rem 1.1rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all .18s ease;
}

.slot-btn:hover {
  border-color: #0f6e56;
  background: #f0faf7;
  transform: translateX(4px);
}

.slot-btn.selected {
  border-color: #0f6e56;
  background: #f0faf7;
}

.slot-icon {
  font-size: 1rem;
}

.slot-label {
  flex: 1;
  font-size: .92rem;
  font-weight: 500;
  color: #1e293b;
}

.slot-arrow {
  color: #cbd5e1;
  font-size: .95rem;
}

.slot-btn:hover .slot-arrow {
  color: #0f6e56;
}

.slot-loading,
.slot-empty {
  text-align: center;
  color: #94a3b8;
  padding: 2.5rem;
  font-size: .9rem;
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
}

.slot-note {
  font-size: .82rem;
  color: #94a3b8;
  text-align: center;
  margin-top: .5rem;
}

/* ── Details form ── */
.details-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.form-group label {
  font-size: .82rem;
  font-weight: 600;
  color: #475569;
}

.req {
  color: #dc2626;
}

.form-group input,
.form-group textarea {
  padding: .65rem .9rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: .9rem;
  font-family: inherit;
  color: #1e293b;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0f6e56;
  box-shadow: 0 0 0 3px rgba(15, 110, 86, .12);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* ── Review card ── */
.review-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  gap: 1rem;
}

.review-row:last-child {
  border-bottom: none;
}

.review-label {
  font-size: .82rem;
  font-weight: 600;
  color: #64748b;
}

.review-val {
  font-size: .9rem;
  color: #1e293b;
  font-weight: 500;
  text-align: right;
}

.review-row-total {
  background: #f8fafc;
}

.review-fee {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f6e56;
}

.review-note {
  font-size: .82rem;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.secure-note {
  text-align: center;
  font-size: .78rem;
  color: #94a3b8;
  margin-top: .75rem;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .85rem 1.5rem;
  background: linear-gradient(135deg, #0f6e56, #1a9b78);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: all .2s ease;
  box-shadow: 0 4px 14px rgba(15, 110, 86, .3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 110, 86, .38);
}

.btn-paypal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  width: 100%;
  padding: .9rem 1.5rem;
  background: #ffc439;
  color: #003087;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s ease;
  box-shadow: 0 4px 14px rgba(255, 196, 57, .35);
}

.btn-paypal:hover {
  background: #f0b429;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 196, 57, .45);
}

/* ── Confirmation page ── */
.confirm-main {
  text-align: center;
}

.confirm-hero {
  padding: 2.5rem 1rem 2rem;
}

.confirm-check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f6e56, #1a9b78);
  color: #fff;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 6px 24px rgba(15, 110, 86, .3);
  animation: popIn .4s cubic-bezier(.34, 1.56, .64, 1);
}

.cancelled-hero .confirm-check,
.cancelled-x {
  background: linear-gradient(135deg, #dc2626, #ef4444) !important;
  box-shadow: 0 6px 24px rgba(220, 38, 38, .3) !important;
}

@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.confirm-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: #0f172a;
}

.confirm-sub {
  font-size: .95rem;
  color: #64748b;
  line-height: 1.5;
  max-width: 420px;
  margin: 0 auto;
}

.confirm-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  margin: 1.5rem 0;
  text-align: left;
}

.cc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  gap: 1rem;
}

.cc-row:last-child {
  border-bottom: none;
}

.cc-label {
  font-size: .82rem;
  font-weight: 600;
  color: #64748b;
}

.cc-val {
  font-size: .9rem;
  font-weight: 500;
  color: #1e293b;
  text-align: right;
}

.cc-mono {
  font-family: monospace;
  font-size: .82rem;
  color: #64748b;
}

.cc-link {
  font-size: .9rem;
  font-weight: 700;
  color: #0f6e56;
  text-decoration: none;
}

.cc-link:hover {
  text-decoration: underline;
}

.confirm-actions {
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

.btn-cancel {
  background: #fee2e2;
  color: #991b1b;
  border: none;
  border-radius: 10px;
  padding: .65rem 1.5rem;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .18s;
}

.btn-cancel:hover {
  background: #fecaca;
}

.confirm-reminder {
  font-size: .8rem;
  color: #94a3b8;
  margin-top: 1rem;
}

/* ── Footer ── */
.bk-footer {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .78rem;
  color: #94a3b8;
  margin-top: auto;
}

.bk-footer a {
  color: #0f6e56;
  text-decoration: none;
  font-weight: 500;
}

.bk-footer a:hover {
  text-decoration: underline;
}

.bk-footer-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Privacy/Terms agree checkbox on the details step */
.form-check {
  flex-direction: row;
}
.check-label {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  font-size: .9rem;
  font-weight: 400;
  color: #475569;
  cursor: pointer;
  line-height: 1.4;
}
.check-label input[type="checkbox"] {
  margin-top: .15rem;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  cursor: pointer;
}
.check-label a {
  color: #0f6e56;
  font-weight: 500;
}

/* ── Legal pages (Privacy Policy / Terms of Service) ── */
.legal-main {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  width: 100%;
}
.legal-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 .35rem;
  letter-spacing: -.3px;
}
.legal-updated {
  font-size: .82rem;
  color: #94a3b8;
  margin: 0 0 1.75rem;
}
.legal-main h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 1.75rem 0 .5rem;
}
.legal-main p,
.legal-main li {
  font-size: .95rem;
  line-height: 1.6;
  color: #334155;
}
.legal-main ul {
  margin: .5rem 0 .5rem 1.25rem;
  padding: 0;
}
.legal-main li {
  margin-bottom: .35rem;
}
.legal-main a {
  color: #0f6e56;
  font-weight: 500;
}
.legal-intro {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .bk-main {
    padding: 1.25rem .9rem 3rem;
  }

  .step-title {
    font-size: 1.2rem;
  }

  .progress-steps {
    gap: 0;
  }

  .step {
    min-width: 52px;
  }

  .step-label {
    font-size: .62rem;
  }
}

/* ─────────────────────────────────────────────────────────────────────────
   Office picker (book.html)
───────────────────────────────────────────────────────────────────────── */
.office-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .85rem;
  margin: 1.25rem 0 1rem;
}

.office-card {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  text-decoration: none;
  color: #0f172a;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}

.office-card:hover {
  border-color: #0f6e56;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 110, 86, .12);
}

.oc-name {
  font-weight: 700;
  font-size: 1.15rem;
  flex: 1;
}

.oc-meta {
  font-size: .78rem;
  color: #64748b;
  flex-basis: 100%;
  margin-top: .15rem;
  order: 3;
}

.oc-arrow {
  font-size: 1.4rem;
  color: #0f6e56;
}

.attorney-fallback {
  margin-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
}

.attorney-fallback summary {
  cursor: pointer;
  font-size: .9rem;
  color: #475569;
  padding: .35rem 0;
  font-weight: 500;
}

.attorney-fallback summary:hover {
  color: #0f6e56;
}

.attorney-fallback .attorney-grid {
  margin-top: .85rem;
}

/* ─────────────────────────────────────────────────────────────────────────
   Calendar + slot layout (book_calendar.html)
───────────────────────────────────────────────────────────────────────── */
.cal-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 1.25rem;
  margin: 1.1rem 0 .85rem;
  align-items: start;
}

@media (max-width: 720px) {
  .cal-layout {
    grid-template-columns: 1fr;
  }
}

.cal-pane {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem 1rem 1.1rem;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .6rem;
}

.cal-title {
  font-weight: 600;
  font-size: 1rem;
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .85rem;
}

.cal-nav button {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  color: #0f172a;
  transition: background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-nav button:hover:not(:disabled) {
  background: #e2e8f0;
}

.cal-month {
  font-weight: 600;
  font-size: .95rem;
  color: #0f172a;
}

.cal-nav:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-size: .68rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: center;
  margin-bottom: .25rem;
}

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

.cal-cell {
  aspect-ratio: 1 / 1;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .12s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-cell.cal-blank {
  visibility: hidden;
}

.cal-cell.cal-out {
  color: #cbd5e1;
  cursor: default;
}

.cal-cell.cal-unavail {
  color: #cbd5e1;
  text-decoration: line-through;
  cursor: not-allowed;
}

.cal-cell.cal-avail {
  background: #ecfdf5;
  color: #065f46;
  border-color: #d1fae5;
}

.cal-cell.cal-avail:hover {
  background: #d1fae5;
  transform: translateY(-1px);
}

.cal-cell.cal-selected {
  background: #0f6e56 !important;
  color: #fff !important;
  border-color: #0f6e56 !important;
}

.cal-legend {
  margin-top: .85rem;
  display: flex;
  gap: 1rem;
  font-size: .72rem;
  color: #64748b;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: .35rem;
  vertical-align: middle;
}

.legend-avail {
  background: #d1fae5;
  border: 1px solid #a7f3d0;
}

.legend-unavail {
  background: #f1f5f9;
}

/* Slot pane */
.slot-pane {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem;
  min-height: 200px;
}

.slot-pane-title {
  font-weight: 600;
  font-size: .95rem;
  color: #0f172a;
  margin-bottom: .75rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid #e2e8f0;
}

.slot-pane .slot-btn {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: .65rem;
  width: 100%;
  padding: .7rem .85rem;
  margin-bottom: .5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: border-color .12s, transform .12s, box-shadow .12s;
}

.slot-pane .slot-btn:hover {
  border-color: #0f6e56;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 110, 86, .08);
}

.slot-pane .slot-btn .slot-icon {
  font-size: 1rem;
}

.slot-pane .slot-btn .slot-label {
  font-weight: 600;
  color: #0f172a;
}

.slot-pane .slot-btn .slot-attorney {
  font-size: .78rem;
  color: #64748b;
}

.slot-pane .slot-btn .slot-arrow {
  color: #0f6e56;
}

/* Side-by-side first/last name in details form */
.details-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

@media (max-width: 480px) {
  .details-form .form-row {
    grid-template-columns: 1fr;
  }
}

.details-form select {
  width: 100%;
  padding: .65rem .8rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: #0f172a;
}

.details-form select:focus {
  outline: none;
  border-color: #0f6e56;
  box-shadow: 0 0 0 3px rgba(15, 110, 86, .12);
}