/* ============================================================
   Our booking calendar (js/booking.js) on /book-discovery, /breakdown/resources and
   /forecast/reveal. The same look as the Installer MOT's booking step (css/mot.css,
   .mot-bk-*): a dark glass card, asked as three steps (day, time, details). GHL still
   holds the availability and the booking (api/book.js). Colours from style.css tokens.
   ============================================================ */

.ih-bk-card { position: relative; text-align: left; color: var(--white); border-radius: 22px; padding: 22px; background: linear-gradient(170deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.025) 100%), #161d2b; border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 20px 60px rgba(0,0,0,0.45), 0 0 80px rgba(74,158,79,0.12); }
@media (min-width: 768px) { .ih-bk-card { padding: 30px; } }

.ih-bk-top { display: flex; align-items: center; gap: 12px; }
.ih-bk-back { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05); color: var(--white); cursor: pointer; transition: all 0.2s ease; }
.ih-bk-back svg { width: 18px; height: 18px; }
.ih-bk-back:hover:not(:disabled) { background: rgba(255,255,255,0.12); transform: translateX(-2px); }
.ih-bk-back:disabled { opacity: 0.3; cursor: default; }
.ih-bk-progress { flex: 1; height: 8px; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: hidden; }
.ih-bk-progress b { display: block; height: 100%; width: 8%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--green-mid)); box-shadow: 0 0 12px rgba(125,216,127,0.6); transition: width 0.5s cubic-bezier(.2,.8,.2,1); }
.ih-bk-count { flex: none; font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.55); font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }

.ih-bk-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-mid); }
.ih-bk-eyebrow svg { width: 15px; height: 15px; }
.ih-bk-deck { min-height: 300px; }
.ih-bk-step { width: 100%; animation: ihBkIn 0.45s cubic-bezier(.2,.8,.2,1) both; }
.ih-bk-step[data-dir="back"] { animation-name: ihBkBack; }
.ih-bk-title { font-size: clamp(22px, 3vw, 30px); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin: 8px 0 6px; color: var(--white); }
/* .ih-bk-card in front: page hero rules (e.g. .fc-reveal-hero p) must not restyle the card's text. */
.ih-bk-card .ih-bk-sub { font-size: 14.5px; line-height: 1.5; color: rgba(255,255,255,0.6); margin: 0; max-width: none; text-align: left; }

.ih-bk-loading { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 64px; }
.ih-bk-loading span { height: 112px; border-radius: 18px; background: linear-gradient(90deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.04) 100%); background-size: 200% 100%; animation: ihBkShimmer 1.4s linear infinite; }

/* Option tiles: days and times */
.ih-bk-opt { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; font: inherit; color: var(--white); padding: 14px 14px 12px; border-radius: 18px; border: 1.5px solid rgba(255,255,255,0.1); background: linear-gradient(160deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 100%); cursor: pointer; overflow: hidden; transition: all 0.2s ease; animation: ihBkOptIn 0.45s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms); }
.ih-bk-opt:hover { border-color: rgba(125,216,127,0.5); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,0.3); }
.ih-bk-opt:active { transform: scale(0.97); }
.ih-bk-opt:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(125,216,127,0.35); }
.ih-bk-opt.is-on { border-color: var(--green-mid); background: linear-gradient(160deg, rgba(74,158,79,0.35) 0%, rgba(74,158,79,0.12) 100%); box-shadow: 0 10px 30px rgba(74,158,79,0.25), 0 0 0 1px var(--green-mid); }
.ih-bk-tick { position: absolute; right: 12px; top: 12px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.2); transition: all 0.2s ease; }
.ih-bk-opt.is-on .ih-bk-tick { background: var(--green-mid); border-color: var(--green-mid); }
.ih-bk-opt.is-on .ih-bk-tick::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid var(--charcoal-dark); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

.ih-bk-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.ih-bk-dow { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-mid); }
.ih-bk-big { font-size: clamp(28px, 3.4vw, 38px); font-weight: 900; line-height: 1; letter-spacing: -0.03em; margin-top: 2px; }
.ih-bk-month { font-size: 14px; font-weight: 700; }
.ih-bk-free { font-size: 12px; color: rgba(255,255,255,0.55); }
.ih-bk-pager { display: flex; justify-content: space-between; margin-top: 12px; }
.ih-bk-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0; font: 700 14px/1 var(--font); color: var(--green-mid); cursor: pointer; }
.ih-bk-link svg { width: 15px; height: 15px; transition: transform 0.2s ease; }
.ih-bk-link:hover svg { transform: translateX(3px); }
.ih-bk-pager [data-page="1"] { margin-left: auto; }

.ih-bk-scroll { margin-top: 16px; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 4px 2px; margin-left: -2px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.2) transparent; }
.ih-bk-part { margin-bottom: 14px; }
.ih-bk-part > span { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
.ih-bk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.ih-bk-time.ih-bk-opt { padding: 13px 8px; align-items: center; font-size: 16px; font-weight: 800; border-radius: 14px; }
.ih-bk-time.ih-bk-opt:hover { transform: translateY(-2px); }

/* Details */
.ih-bk-form { margin-top: 16px; }
.ih-bk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.ih-bk-wide { grid-column: 1 / -1; }
.ih-bk-field { display: block; min-width: 0; }
.ih-bk-field span { display: block; font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.7); margin-bottom: 5px; }
.ih-bk-field input { width: 100%; font: 600 15px var(--font); color: var(--white); padding: 11px 12px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05); transition: all 0.2s ease; }
.ih-bk-field input::placeholder { color: rgba(255,255,255,0.3); }
.ih-bk-field input:focus { outline: none; border-color: var(--green-mid); background-color: rgba(255,255,255,0.08); box-shadow: 0 0 0 4px rgba(125,216,127,0.18); }
.ih-bk-phone-kept p { margin: 0; font-size: 14px; line-height: 1.4; color: rgba(255,255,255,0.85); padding: 9px 0; }
.ih-bk-phone-kept .ih-bk-link { display: inline; padding: 0; font-size: 14px; }

.ih-bk-go { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 0; border-radius: 12px; padding: 16px 20px; font: 700 16px/1.3 var(--font); color: var(--white); text-align: center; cursor: pointer; background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%); box-shadow: 0 6px 18px rgba(74,158,79,0.4), inset 0 1px 0 rgba(255,255,255,0.2); transition: all 0.2s ease; }
.ih-bk-go svg { width: 18px; height: 18px; flex: none; transition: transform 0.2s ease; }
.ih-bk-go:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(74,158,79,0.5), inset 0 1px 0 rgba(255,255,255,0.2); }
.ih-bk-go:hover:not(:disabled) svg { transform: translateX(3px); }
.ih-bk-go:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.ih-bk-go.is-busy { opacity: 0.7; cursor: progress; }
.ih-bk-card .ih-bk-err { font-size: 14px; font-weight: 600; color: #fc8181; margin: 10px 0 0; max-width: none; text-align: left; }
.ih-bk-err:empty { display: none; }
.ih-bk-card .ih-bk-note { font-size: 12px; line-height: 1.5; color: rgba(255,255,255,0.6); text-align: center; margin: 12px 0 0; max-width: none; }
.ih-bk-note a { color: var(--white); }

/* Page fits */
.res-hero-book .ih-bk { max-width: 760px; margin: 0 auto; }
.rv-cal:has(> .ih-bk > .ih-bk-card) { background: none; box-shadow: none; }

@media (max-width: 479px) {
  .ih-bk-grid { grid-template-columns: 1fr; }
  .ih-bk-days { grid-template-columns: repeat(2, 1fr); }
}

@keyframes ihBkIn { from { opacity: 0; transform: translateX(60px) rotate(1.5deg); } to { opacity: 1; transform: none; } }
@keyframes ihBkBack { from { opacity: 0; transform: translateX(-60px) rotate(-1.5deg); } to { opacity: 1; transform: none; } }
@keyframes ihBkOptIn { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes ihBkShimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ih-bk-step, .ih-bk-opt, .ih-bk-loading span { animation: none; } }

/* Details step: "Booking as ..." when we know everything, and the tech / installs / MCS chips,
   only shown when we don't (js/booking.js stepDetails). */
.ih-bk-who { margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05); }
.ih-bk-who p { margin: 0 0 4px; font-size: 15px; line-height: 1.4; color: rgba(255,255,255,0.85); overflow-wrap: anywhere; }
.ih-bk-who b { color: var(--white); }
.ih-bk-who .ih-bk-link { margin-top: 6px; font-size: 13px; }
.ih-bk-who-sm { padding: 0; border: 0; background: none; margin: 0 0 8px; }
.ih-bk-chips > span { display: block; font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.7); margin-bottom: 6px; }
.ih-bk-chips > div { display: flex; flex-wrap: wrap; gap: 8px; }
.ih-bk-chip { position: relative; cursor: pointer; }
.ih-bk-chip input { position: absolute; opacity: 0; pointer-events: none; }
.ih-bk-chip span { display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.05); font: 600 14px/1.2 var(--font); color: var(--white); transition: all 0.2s ease; }
.ih-bk-chip input:checked + span { border-color: var(--green-mid); background: rgba(74,158,79,0.25); }
.ih-bk-chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(125,216,127,0.18); }
