/* ==========================================================================
   "Book a Call" scheduler
   ========================================================================== */

.btn-outline { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }
.btn-outline .fw-icon, .header-actions .btn .fw-icon { width: 18px; height: 18px; }
.btn-outline:hover .fw-icon { transform: none; }
.header-book { padding: 10px 18px; }
.cta-box .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.cta-box .btn-outline:hover { background: #fff; color: var(--navy); border-color: #fff; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

html.fwb-lock { overflow: hidden; }

.fwb { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; }
.fwb[hidden] { display: none; }
.fwb-backdrop { position: absolute; inset: 0; background: rgba(8, 20, 39, .55); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s; }
.fwb.is-open .fwb-backdrop { opacity: 1; }

.fwb-dialog {
	position: relative; display: grid; grid-template-columns: 310px minmax(0, 1fr);
	width: min(1020px, 100%); max-height: min(720px, calc(100vh - 48px)); min-height: 560px;
	background: #fff; border-radius: 20px; box-shadow: 0 40px 80px -20px rgba(8, 20, 39, .45);
	overflow: hidden; opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .2s, transform .2s;
}
.fwb.is-open .fwb-dialog { opacity: 1; transform: none; }

.fwb-close {
	position: absolute; top: 14px; right: 14px; z-index: 3; width: 38px; height: 38px; border-radius: 50%;
	border: 0; background: var(--bg-soft); color: var(--ink); display: grid; place-items: center;
}
.fwb-close:hover { background: var(--navy); color: #fff; }
.fwb-close .fw-icon { width: 18px; height: 18px; }

/* Left panel */
.fwb-side { display: flex; flex-direction: column; border-right: 1px solid var(--line); overflow-y: auto; }
.fwb-brand { position: relative; display: grid; place-items: center; padding: 30px 28px 26px; border-bottom: 1px solid var(--line); }
.fwb-brand img { width: 190px; height: auto; }
.fwb-back {
	position: absolute; left: 18px; top: 18px; width: 40px; height: 40px; border-radius: 50%;
	border: 1px solid var(--line); background: #fff; color: var(--blue); display: grid; place-items: center;
}
.fwb-back:hover { border-color: var(--blue); }
.fwb-back[hidden], .fwb-step[hidden] { display: none; }
.fwb-back .fw-icon { width: 18px; height: 18px; }
.fwb-info { padding: 26px 28px; flex: 1; }
.fwb-avatar { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--navy); color: #fff; margin-bottom: 14px; box-shadow: 0 0 0 4px var(--blue-50); }
.fwb-avatar .fw-icon { width: 26px; height: 26px; }
.fwb-host { margin: 0 0 4px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.fwb-info h2 { font-family: var(--font-body); font-size: 1.5rem; letter-spacing: -.01em; line-height: 1.25; font-weight: 700; margin-bottom: 18px; }
.fwb-meta { list-style: none; display: grid; gap: 12px; margin-bottom: 18px; }
.fwb-meta li { display: flex; align-items: flex-start; gap: 10px; color: var(--text); font-weight: 600; font-size: .93rem; line-height: 1.4; }
.fwb-meta li[hidden] { display: none; }
.fwb-meta .fw-icon { width: 19px; height: 19px; color: var(--ink); margin-top: 1px; }
.fwb-when { color: var(--blue) !important; }
.fwb-when .fw-icon { color: var(--blue) !important; }
.fwb-desc { font-size: .92rem; color: var(--muted); margin: 0; }
.fwb-legal { margin: 0; padding: 16px 28px 22px; font-size: .85rem; }

/* Right panel */
.fwb-main { overflow-y: auto; padding: 32px 36px; }
.fwb-step h3 { font-family: var(--font-body); font-size: 1.3rem; font-weight: 700; margin: 0 48px 22px 0; }
.fwb-picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; transition: grid-template-columns .2s; }
.fwb.has-times .fwb-picker { grid-template-columns: minmax(0, 1fr) 220px; }

.fwb-cal-head { display: flex; align-items: center; justify-content: center; gap: 22px; margin-bottom: 16px; }
.fwb-month { margin: 0; min-width: 150px; text-align: center; font-weight: 600; color: var(--ink); }
.fwb-nav { width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--blue); display: grid; place-items: center; }
.fwb-nav:hover:not(:disabled) { background: var(--blue-50); }
.fwb-nav:disabled { color: #c4cddb; cursor: default; }
.fwb-nav .fw-icon { width: 20px; height: 20px; }
.fwb-weekdays, .fwb-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.fwb-weekdays span { font-size: .75rem; font-weight: 600; color: var(--muted); padding-bottom: 6px; }
.fwb-day {
	position: relative; aspect-ratio: 1; max-width: 48px; width: 100%; margin: 0 auto; border-radius: 50%;
	border: 0; background: transparent; color: #8a96aa; font-size: .95rem; font-weight: 500; display: grid; place-items: center;
}
.fwb-day:disabled { cursor: default; }
.fwb-day.is-open { background: var(--blue-50); color: var(--blue); font-weight: 700; }
.fwb-day.is-open:hover { background: #d6e7ff; }
.fwb-day.is-today::after { content: ""; position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.fwb-day.is-selected, .fwb-day.is-selected:hover { background: var(--blue); color: #fff; }

.fwb-times { display: flex; flex-direction: column; min-height: 0; }
.fwb-times[hidden] { display: none; }
.fwb-date-label { margin: 6px 0 16px; color: var(--ink); font-weight: 500; }
.fwb-slot-list { display: grid; gap: 10px; max-height: 360px; overflow-y: auto; padding-right: 4px; }
.fwb-slot-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
.fwb-slot-row.is-selected { grid-template-columns: 1fr 1fr; }
.fwb-slot, .fwb-next {
	height: 50px; border-radius: 8px; font-weight: 700; font-size: .98rem; transition: all .15s;
}
.fwb-slot { border: 1px solid rgba(21, 112, 239, .5); background: #fff; color: var(--blue); }
.fwb-slot:hover { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.fwb-slot-row.is-selected .fwb-slot { background: #6b778c; border-color: #6b778c; color: #fff; box-shadow: none; }
.fwb-next { border: 0; background: var(--blue); color: #fff; }
.fwb-next:hover { background: var(--blue-600); }

.fwb-tz { margin-top: 26px; max-width: 360px; }
.fwb-tz label { display: block; font-weight: 700; color: var(--ink); font-size: .9rem; margin-bottom: 6px; }
.fwb-tz select { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: .9rem; color: var(--ink); }
.fwb-status { min-height: 1.4em; margin: 16px 0 0; font-size: .92rem; color: var(--muted); }
.fwb-status.is-error { color: #b42318; font-weight: 600; }
.fwb.is-loading .fwb-days { opacity: .45; }

/* Details form */
.fwb-form { max-width: 460px; }
.fwb-field { margin: 0 0 16px; }
.fwb-field label { display: block; font-weight: 600; font-size: .92rem; color: var(--ink); margin-bottom: 6px; }
.fwb-field label span { color: var(--orange-600); }
.fwb-form input, .fwb-form select, .fwb-form textarea {
	width: 100%; padding: 12px 14px; border: 1px solid #d3dcea; border-radius: 10px; background: #fff;
	font: inherit; font-size: 1rem; color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.fwb-form input:focus, .fwb-form select:focus, .fwb-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(21, 112, 239, .15); }
.fwb-form [aria-invalid="true"] { border-color: #f04438; }
.fwb-phone { display: grid; grid-template-columns: 112px 1fr; gap: 8px; }
.fwb-err { display: block; color: #b42318; font-size: .82rem; margin-top: 4px; min-height: 0; }
.fwb-err:empty { display: none; }
.fwb-consent { font-size: .85rem; color: var(--muted); margin: 4px 0 18px; }
.fwb-submit { border-radius: 100px; padding: 13px 30px; background: var(--blue); }
.fwb-submit:hover { background: var(--navy); }
.fwb-submit.is-busy { opacity: .7; pointer-events: none; }
.fwb-form-msg { margin: 12px 0 0; color: #b42318; font-weight: 600; font-size: .9rem; min-height: 1.2em; }

/* Done */
.fwb-done { text-align: center; padding-top: 30px; }
.fwb-done h3 { margin: 0 0 8px; font-size: 1.6rem; }
.fwb-done-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #e9fbf2; color: var(--green); margin-bottom: 16px; }
.fwb-done-ico .fw-icon { width: 32px; height: 32px; stroke-width: 3; }
.fwb-done-text { color: var(--muted); max-width: 420px; margin: 0 auto 22px; }
.fwb-done-card { max-width: 440px; margin: 0 auto 26px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 14px; text-align: left; background: var(--bg-soft); }
.fwb-done-card p { margin: 0; }
.fwb-done-title { font-weight: 700; color: var(--ink); margin-bottom: 6px !important; }
.fwb-done-when { color: var(--blue); font-weight: 600; margin-bottom: 4px !important; }
.fwb-done-type { color: var(--muted); font-size: .9rem; }
.fwb-gcal .fw-icon { width: 18px; height: 18px; }

/* Small screens */
@media (max-width: 1180px) {
	.header-book { padding: 10px 14px; }
}
@media (max-width: 1024px) {
	.header-book { display: none; }
	.nav-book-mobile { display: flex !important; margin-top: 10px; }
}
.nav-book-mobile { display: none !important; }

@media (max-width: 820px) {
	.fwb { padding: 0; place-items: stretch; }
	.fwb-dialog { grid-template-columns: 1fr; max-height: none; min-height: 0; height: 100%; border-radius: 0; overflow-y: auto; }
	.fwb-side { border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
	.fwb-brand { padding: 18px 60px 16px; }
	.fwb-brand img { width: 150px; }
	.fwb-back { top: 14px; left: 14px; }
	.fwb-info { padding: 18px 20px 6px; display: grid; grid-template-columns: 48px 1fr; gap: 0 14px; align-items: center; }
	.fwb-avatar { width: 48px; height: 48px; margin: 0; grid-row: span 2; }
	.fwb-host { margin: 0; }
	.fwb-info h2 { font-size: 1.2rem; margin: 0; }
	.fwb-meta { grid-column: 1 / -1; grid-template-columns: repeat(2, auto); justify-content: start; gap: 8px 18px; margin: 14px 0 10px; }
	.fwb-desc, .fwb-legal { display: none; }
	.fwb-main { overflow: visible; padding: 22px 20px 32px; }
	.fwb.has-times .fwb-picker { grid-template-columns: 1fr; }
	.fwb-slot-list { max-height: none; grid-template-columns: repeat(2, 1fr); }
	.fwb-slot-row.is-selected { grid-column: 1 / -1; }
	.fwb-phone { grid-template-columns: 100px 1fr; }
}
