/* Mr. Friend Bookings — widget. Colours follow the theme's custom properties when present. */
.mft-book {
	--b-blue: var(--mf-blue, #0B3D91);
	--b-red: var(--mf-red, #E4161C);
	--b-ink: var(--mf-ink, #071A3D);
	--b-salt: var(--mf-salt, #EEF4FF);
	--b-sun: var(--mf-sun, #F7C600);
	--b-line: #D9E3F5;
	--b-muted: #4A5878;
	color: var(--b-ink);
	font-size: 15px;
	line-height: 1.45;
}
.mft-book *, .mft-book *::before, .mft-book *::after { box-sizing: border-box; }
.mft-book__loading { height: 420px; border-radius: 22px; background: linear-gradient(100deg, var(--b-salt) 40%, #fff 50%, var(--b-salt) 60%) 0 0 / 300% 100%; animation: mftb-shimmer 1.4s linear infinite; }
@keyframes mftb-shimmer { to { background-position: -150% 0; } }

.mftb { background: #fff; border: 2px solid var(--b-ink); border-radius: 22px; padding: 20px; box-shadow: 6px 6px 0 var(--b-ink); }
.mftb button { font: inherit; color: inherit; cursor: pointer; }
.mftb button:focus-visible, .mftb input:focus-visible, .mftb select:focus-visible, .mftb textarea:focus-visible, .mftb a:focus-visible { outline: 3px solid var(--b-sun); outline-offset: 2px; }

.mftb__head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.mftb__from { font-size: 15px; }
.mftb__from strong { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.mftb__free { font-size: 13px; color: #0E7A43; font-weight: 600; }

.mftb__group { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.mftb__group legend { font-weight: 700; font-size: 14px; margin-bottom: 8px; padding: 0; }

.mftb__opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.mftb__opt { text-align: left; background: var(--b-salt); border: 2px solid transparent; border-radius: 14px; padding: 10px 12px; transition: border-color .15s, background .15s; }
.mftb__opt:hover { border-color: var(--b-line); }
.mftb__opt.is-on { background: #fff; border-color: var(--b-blue); box-shadow: inset 0 0 0 1px var(--b-blue); }
.mftb__opt-label { display: block; font-weight: 700; }
.mftb__opt-meta { display: block; font-size: 13px; color: var(--b-muted); }

.mftb__cal { background: var(--b-salt); border-radius: 16px; padding: 10px; transition: opacity .2s; }
.mftb__cal.is-loading { opacity: .55; pointer-events: none; }
.mftb__cal-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; margin-bottom: 6px; }
.mftb__nav { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; font-size: 20px !important; line-height: 1; }
.mftb__nav:disabled { opacity: .3; cursor: default; }
.mftb__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.mftb__dow { font-size: 11px; font-weight: 700; color: var(--b-muted); padding: 4px 0; }
.mftb__day { aspect-ratio: 1; border: 0; border-radius: 10px; background: transparent; font-weight: 600; font-variant-numeric: tabular-nums; position: relative; min-height: 34px; }
.mftb__day:disabled { color: #A5B1C8; cursor: default; }
.mftb__day.is-open { background: #fff; }
.mftb__day.is-few { background: #fff; box-shadow: inset 0 -3px 0 var(--b-sun); }
.mftb__day.is-full { color: #A5B1C8; text-decoration: line-through; }
.mftb__day.is-open:hover, .mftb__day.is-few:hover { background: var(--b-blue); color: #fff; }
.mftb__day.is-on { background: var(--b-red) !important; color: #fff !important; box-shadow: none; }
.mftb__legend { display: flex; gap: 14px; font-size: 12px; color: var(--b-muted); margin-top: 8px; padding-left: 4px; flex-wrap: wrap; }
.mftb__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: #fff; border: 1px solid var(--b-line); }
.mftb__legend i.is-few { box-shadow: inset 0 -3px 0 var(--b-sun); }
.mftb__legend i.is-full { background: transparent; border-style: dashed; }

.mftb__times { display: flex; flex-wrap: wrap; gap: 8px; }
.mftb__time { border: 2px solid var(--b-line); background: #fff; border-radius: 14px; padding: 8px 14px; text-align: left; min-width: 96px; transition: border-color .15s; }
.mftb__time strong { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.mftb__time small { font-size: 12px; color: var(--b-muted); }
.mftb__time:hover { border-color: var(--b-blue); }
.mftb__time.is-on { border-color: var(--b-red); background: #FFF3F3; }
.mftb__time:disabled { opacity: .45; cursor: default; border-style: dashed; }
.mftb__note { font-size: 13px; color: var(--b-muted); margin: 8px 0 0; }

.mftb__step { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--b-line); }
.mftb__step:last-child { border-bottom: 0; }
.mftb__step small { display: block; font-size: 12px; color: var(--b-muted); }
.mftb__ctrl { display: flex; align-items: center; gap: 4px; }
.mftb__ctrl button { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--b-ink); background: #fff; font-size: 20px; line-height: 1; font-weight: 700; }
.mftb__ctrl button:disabled { opacity: .25; cursor: default; }
.mftb__ctrl output { min-width: 30px; text-align: center; font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }

.mftb__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 2px dashed var(--b-line); margin-top: 6px; }
.mftb__total span { display: block; font-size: 12px; color: var(--b-muted); }
.mftb__total strong { font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mftb__total small { display: block; font-size: 12px; color: var(--b-muted); }
.mftb .mftb__cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; background: var(--b-red); color: #fff !important; font-weight: 800; font-size: 16px; padding: 14px 26px; text-decoration: none; box-shadow: 0 3px 0 #9C0B0F; transition: transform .12s, box-shadow .12s; }
.mftb .mftb__cta:hover { transform: translateY(-1px); box-shadow: 0 4px 0 #9C0B0F; }
.mftb .mftb__cta:active { transform: translateY(2px); box-shadow: 0 1px 0 #9C0B0F; }
.mftb .mftb__cta:disabled { background: #C3CCDD; box-shadow: none; transform: none; cursor: not-allowed; }
.mftb__cta--full { width: 100%; margin-top: 14px; }
.mftb .mftb__cta--wa { background: #1DA851; box-shadow: 0 3px 0 #0F7334; }
.mftb__warn { background: #FFF3F3; color: #A20F14; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 12px 0 0; }
.mftb__help { font-size: 13px; color: var(--b-muted); margin: 12px 0 0; text-align: center; }
.mftb__help a { color: var(--b-blue); font-weight: 600; }

.mftb__back { background: none; border: 0; padding: 0; font-weight: 600; color: var(--b-blue) !important; margin-bottom: 10px; }
.mftb__sum { margin: 0 0 14px; background: var(--b-salt); border-radius: 14px; padding: 6px 14px; }
.mftb__sum div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--b-line); }
.mftb__sum div:last-child { border-bottom: 0; }
.mftb__sum dt { color: var(--b-muted); font-size: 13px; }
.mftb__sum dd { margin: 0; text-align: right; font-weight: 600; }
.mftb__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mftb__f { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.mftb__f--wide { grid-column: 1 / -1; }
.mftb__f em { font-style: normal; font-weight: 400; color: var(--b-muted); }
.mftb__f input, .mftb__f select, .mftb__f textarea { font: inherit; font-size: 16px; font-weight: 400; color: var(--b-ink); border: 2px solid var(--b-line); border-radius: 12px; padding: 10px 12px; background: #fff; width: 100%; }
.mftb__f input:focus, .mftb__f select:focus, .mftb__f textarea:focus { border-color: var(--b-blue); outline: none; }
.mftb__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mftb__fine { font-size: 12px; color: var(--b-muted); margin: 10px 0 0; text-align: center; }

.mftb__done { text-align: center; outline: none; }
.mftb__done h3 { font-size: 26px; margin: 8px 0 6px; letter-spacing: -.02em; }
.mftb__done p { margin: 0 0 14px; }
.mftb__ref { font-size: 18px; letter-spacing: .04em; background: var(--b-sun); padding: 1px 8px; border-radius: 6px; }
.mftb__done .mftb__sum { text-align: left; }
.mftb__tick { width: 64px; height: 64px; }
.mftb__tick circle { fill: none; stroke: #1DA851; stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: mftb-draw .6s ease-out forwards; }
.mftb__tick path { fill: none; stroke: #1DA851; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: mftb-draw .35s .45s ease-out forwards; }
@keyframes mftb-draw { to { stroke-dashoffset: 0; } }
.mftb__ghost { margin-top: 10px; background: none; border: 2px solid var(--b-line); border-radius: 999px; padding: 10px 18px; font-weight: 700; width: 100%; }

@media (max-width: 520px) {
	.mftb { padding: 16px; box-shadow: 4px 4px 0 var(--b-ink); }
	.mftb__fields { grid-template-columns: 1fr; }
	.mftb__bar { position: sticky; bottom: 0; background: #fff; padding-bottom: 6px; z-index: 2; }
}
@media (prefers-reduced-motion: reduce) {
	.mft-book *, .mft-book *::before { animation: none !important; transition: none !important; }
	.mftb__tick circle, .mftb__tick path { stroke-dashoffset: 0; }
}

.mft-tours { display: grid; gap: 12px; }
.mft-tours__item { display: block; padding: 14px; border: 1px solid #D9E3F5; border-radius: 14px; text-decoration: none; color: inherit; }
.mft-tours__item span, .mft-tours__item em { display: block; }
