/* InfinityBooking front end */
html.ib-fe-lock { overflow: hidden; }
.ib-fe-overlay {
	position: fixed; inset: 0; z-index: 999999; display: flex; align-items: flex-start; justify-content: center;
	padding: 4vh 12px; background: rgba(17, 24, 39, .6); overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.ib-fe-dialog {
	--ib-accent: #4f46e5; --ib-text: #111827; --ib-muted: #6b7280; --ib-border: #e5e7eb; --ib-danger: #dc2626; --ib-bg: #fff; --ib-on-accent: #fff;
	width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto; background: var(--ib-bg); color: var(--ib-text);
	border-radius: 16px; box-shadow: 0 25px 60px rgba(0, 0, 0, .35); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; outline: none;
}
.ib-fe-dialog *, .ib-fe-dialog *::before, .ib-fe-dialog *::after { box-sizing: border-box; }
.ib-fe-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; background: var(--ib-bg); border-bottom: 1px solid var(--ib-border); }
.ib-fe-title { margin: 0; font-size: 18px; line-height: 1.3; color: var(--ib-text); }
.ib-fe-close { border: 0; background: none; font-size: 28px; line-height: 1; color: var(--ib-muted); cursor: pointer; padding: 0 4px; }
.ib-fe-close:hover { color: var(--ib-text); }
.ib-fe-body { padding: 20px; }
.ib-fe-intro, .ib-fe-muted { color: var(--ib-muted); margin: 0 0 12px; font-size: 14px; }
.ib-fe-pre { white-space: pre-wrap; }
.ib-fe-step-title { margin: 0 0 12px; font-size: 16px; color: var(--ib-text); }
.ib-fe-step[hidden], .ib-fe-field[hidden], .ib-fe-banner:empty, .ib-fe-error:empty, .ib-fe-total[hidden], [hidden] { display: none !important; }

/* Keep the theme's own button/link colours out of the modal */
.ib-fe-dialog .ib-fe-btn, .ib-fe-dialog .ib-fe-btn:hover, .ib-fe-dialog .ib-fe-btn:focus, .ib-fe-dialog .ib-fe-btn:active {
	background: var(--ib-accent); border-color: var(--ib-accent); color: var(--ib-on-accent); box-shadow: none; text-shadow: none; text-transform: none; letter-spacing: normal;
}
.ib-fe-dialog .ib-fe-btn--ghost, .ib-fe-dialog .ib-fe-btn--ghost:hover, .ib-fe-dialog .ib-fe-btn--ghost:focus, .ib-fe-dialog .ib-fe-btn--ghost:active { background: transparent; border-color: #d1d5db; color: var(--ib-text); }
.ib-fe-dialog .ib-fe-btn--danger, .ib-fe-dialog .ib-fe-btn--danger:hover, .ib-fe-dialog .ib-fe-btn--danger:focus, .ib-fe-dialog .ib-fe-btn--danger:active { background: var(--ib-danger); border-color: var(--ib-danger); color: #fff; }
.ib-fe-dialog .ib-fe-close, .ib-fe-dialog .ib-fe-close:hover, .ib-fe-dialog .ib-fe-close:focus { background: none; border: 0; box-shadow: none; color: var(--ib-muted); }
.ib-fe-dialog .ib-fe-close:hover { color: var(--ib-text); }
.ib-fe-dialog .ib-fe-slot.is-selected, .ib-fe-dialog .ib-fe-slot.is-selected:hover, .ib-fe-dialog .ib-fe-slot.is-selected:focus,
.ib-fe-dialog .ib-fe-day.is-selected, .ib-fe-dialog .ib-fe-day.is-selected:hover, .ib-fe-dialog .ib-fe-day.is-selected:focus { background: var(--ib-accent); border-color: var(--ib-accent); color: var(--ib-on-accent); }
.ib-fe-dialog .ib-fe-slot:not(.is-selected):hover:not(:disabled), .ib-fe-dialog .ib-fe-slot:not(.is-selected):focus { background: var(--ib-bg); color: var(--ib-text); border-color: var(--ib-accent); }
.ib-fe-dialog .ib-fe-slot:not(.is-selected):not(:hover):not(:focus) { background: var(--ib-bg); color: var(--ib-text); border-color: #d1d5db; box-shadow: none; text-shadow: none; text-transform: none; letter-spacing: normal; }
.ib-fe-dialog .ib-fe-slot:disabled { background: color-mix(in srgb, var(--ib-text) 6%, var(--ib-bg)); color: color-mix(in srgb, var(--ib-text) 40%, var(--ib-bg)); border-color: var(--ib-border); cursor: not-allowed; }
.ib-fe-dialog .ib-fe-link, .ib-fe-dialog a { color: var(--ib-accent); }
.ib-fe-dialog .ib-fe-btn[href] { color: var(--ib-on-accent); }

/* Calendar cells: stop theme button styles recolouring them */
.ib-fe-dialog .ib-fe-day:not(.is-selected):not(.is-range):not(:disabled), .ib-fe-dialog .ib-fe-day:not(.is-selected):not(.is-range):not(:disabled):focus { background: color-mix(in srgb, var(--ib-text) 6%, var(--ib-bg)); color: var(--ib-text); border: 0; box-shadow: none; }
.ib-fe-dialog .ib-fe-day:not(.is-selected):not(.is-range):not(:disabled):hover { background: color-mix(in srgb, var(--ib-accent) 18%, var(--ib-bg)); color: var(--ib-text); }
.ib-fe-dialog .ib-fe-day:disabled, .ib-fe-dialog .ib-fe-day:disabled:hover { background: transparent; }
.ib-fe-dialog .ib-fe-day, .ib-fe-dialog .ib-fe-day:hover, .ib-fe-dialog .ib-fe-day:focus, .ib-fe-dialog .ib-fe-day:disabled { border: 0; box-shadow: none; }
.ib-fe-dialog .ib-fe-cal-nav, .ib-fe-dialog .ib-fe-cal-nav:hover, .ib-fe-dialog .ib-fe-cal-nav:focus { background: var(--ib-bg); color: var(--ib-text); border: 1px solid color-mix(in srgb, var(--ib-text) 15%, var(--ib-bg)); box-shadow: none; padding: 0; }
.ib-fe-dialog .ib-fe-cal-dow { color: var(--ib-muted); }

/* Modal design settings (set per flow in Builder > Appearance) */
.ib-fe-overlay[data-dim="light"] { background: rgba(17, 24, 39, .35); }
.ib-fe-overlay[data-dim="dark"] { background: rgba(0, 0, 0, .8); }
.ib-fe-dialog[data-width="sm"] { max-width: 480px; }
.ib-fe-dialog[data-width="lg"] { max-width: 780px; }
.ib-fe-dialog[data-radius="square"] { border-radius: 0; }
.ib-fe-dialog[data-radius="soft"] { border-radius: 8px; }
.ib-fe-dialog[data-buttons="square"] .ib-fe-btn, .ib-fe-dialog[data-buttons="square"] .ib-fe-input { border-radius: 2px; }
.ib-fe-dialog[data-buttons="pill"] .ib-fe-btn { border-radius: 999px; padding-left: 24px; padding-right: 24px; }

/* Progress */
.ib-fe-progress { display: flex; gap: 6px; list-style: none; margin: 0 0 18px; padding: 0; counter-reset: s; }
.ib-fe-progress li { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ib-muted); border-top: 3px solid var(--ib-border); padding-top: 6px; min-width: 0; }
.ib-fe-progress li span { display: none; }
.ib-fe-progress li em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-fe-progress li.is-done { border-top-color: var(--ib-accent); }
.ib-fe-progress li.is-current { border-top-color: var(--ib-accent); color: var(--ib-text); font-weight: 600; }

/* Fields */
.ib-fe-fields { display: flex; flex-wrap: wrap; gap: 0 14px; }
.ib-fe-field { flex: 1 1 100%; margin-bottom: 14px; min-width: 0; }
.ib-fe-field--half { flex: 1 1 calc(50% - 7px); }
.ib-fe-label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 14px; }
.ib-fe-req { color: var(--ib-danger); }
.ib-fe-input {
	display: block; width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 10px;
	background: var(--ib-bg); color: var(--ib-text); font: inherit; box-shadow: none; margin: 0;
}
textarea.ib-fe-input { resize: vertical; }
.ib-fe-input:focus { outline: 2px solid var(--ib-accent); outline-offset: 0; border-color: var(--ib-accent); }
.ib-fe-hint { display: block; margin-top: 4px; color: var(--ib-muted); font-size: 12px; }
.ib-fe-error { margin-top: 4px; color: var(--ib-danger); font-size: 13px; }
.ib-fe-choices { display: grid; gap: 8px; }
.ib-fe-choice { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 400; }
.ib-fe-choice input { margin-top: 4px; accent-color: var(--ib-accent); }
.ib-fe-choice small { display: block; color: var(--ib-muted); }
.ib-fe-choice--box { padding: 12px; border: 1px solid var(--ib-border); border-radius: 10px; margin-bottom: 8px; }
.ib-fe-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* Resource / location cards */
.ib-fe-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.ib-fe-card { display: flex; flex-direction: column; gap: 8px; padding: 0; border: 2px solid var(--ib-border); border-radius: 12px; background: var(--ib-bg); text-align: left; cursor: pointer; overflow: hidden; font: inherit; color: var(--ib-text); }
.ib-fe-card img { width: 100%; height: 110px; object-fit: cover; display: block; }
.ib-fe-card-body { display: flex; flex-direction: column; gap: 2px; padding: 12px; }
.ib-fe-card-body small { color: var(--ib-muted); }
.ib-fe-card:hover { border-color: #c7d2fe; }
.ib-fe-card.is-selected { border-color: var(--ib-accent); background: color-mix(in srgb, var(--ib-accent) 7%, var(--ib-bg)); }

/* Calendar */
.ib-fe-picker { margin-bottom: 8px; }
.ib-fe-cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ib-fe-cal-nav { width: 36px; height: 36px; border: 1px solid var(--ib-border); border-radius: 50%; background: var(--ib-bg); color: var(--ib-text); font-size: 20px; line-height: 1; cursor: pointer; }
.ib-fe-cal-nav:disabled { opacity: .35; cursor: not-allowed; }
.ib-fe-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.ib-fe-cal-dow { text-align: center; font-size: 12px; color: var(--ib-muted); padding: 4px 0; }
.ib-fe-day { aspect-ratio: 1; min-height: 38px; border: 0; border-radius: 10px; background: color-mix(in srgb, var(--ib-text) 6%, var(--ib-bg)); font: inherit; color: var(--ib-text); cursor: pointer; padding: 0; }
.ib-fe-day:hover:not(:disabled) { background: color-mix(in srgb, var(--ib-accent) 18%, var(--ib-bg)); }
.ib-fe-day:disabled { background: transparent; color: color-mix(in srgb, var(--ib-text) 30%, var(--ib-bg)); cursor: not-allowed; text-decoration: line-through; }
.ib-fe-day.is-range { background: color-mix(in srgb, var(--ib-accent) 18%, var(--ib-bg)); border-radius: 0; }
.ib-fe-day.is-selected { background: var(--ib-accent); color: var(--ib-on-accent); }
.ib-fe-slots-wrap { margin-top: 14px; }
.ib-fe-slots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ib-fe-slot { padding: 8px 14px; border: 1px solid #d1d5db; border-radius: 999px; background: var(--ib-bg); color: var(--ib-text); font: inherit; cursor: pointer; }
.ib-fe-slot:hover:not(:disabled) { border-color: var(--ib-accent); }
.ib-fe-slot.is-selected { background: var(--ib-accent); border-color: var(--ib-accent); color: var(--ib-on-accent); }
.ib-fe-slot:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

/* Summary */
.ib-fe-summary { margin: 0 0 14px; border: 1px solid var(--ib-border); border-radius: 12px; padding: 4px 14px; }
.ib-fe-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid #f1f2f4; }
.ib-fe-row:last-child { border-bottom: 0; }
.ib-fe-row > :first-child { color: var(--ib-muted); }
.ib-fe-row > :last-child { text-align: right; word-break: break-word; }
.ib-fe-row--line > * { font-size: 13px; }
.ib-fe-row--total { font-size: 17px; }
.ib-fe-row--total > :first-child { color: var(--ib-text); font-weight: 600; }
.ib-fe-discount { display: flex; gap: 8px; margin-bottom: 6px; }
.ib-fe-total { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; margin-top: 14px; background: color-mix(in srgb, var(--ib-text) 4%, var(--ib-bg)); border-radius: 10px; font-size: 16px; }

/* Buttons & notes */
.ib-fe-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; }
.ib-fe-nav--wrap { flex-wrap: wrap; justify-content: flex-start; }
.ib-fe-nav > .ib-fe-btn:only-child, .ib-fe-nav > .ib-fe-btn:last-child { margin-left: auto; }
.ib-fe-nav--wrap > .ib-fe-btn:last-child { margin-left: 0; }
.ib-fe-btn {
	display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; border: 1px solid var(--ib-accent); border-radius: 10px;
	background: var(--ib-accent); color: var(--ib-on-accent); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2;
}
.ib-fe-btn:hover:not(:disabled) { filter: brightness(.93); }
.ib-fe-btn:disabled { opacity: .55; cursor: not-allowed; }
.ib-fe-btn--ghost { background: transparent; color: var(--ib-text); border-color: #d1d5db; }
.ib-fe-btn--danger { background: var(--ib-danger); border-color: var(--ib-danger); }
.ib-fe-btn--link { margin-top: 10px; }
.ib-fe-note { padding: 10px 14px; border-radius: 10px; margin: 0 0 14px; background: #eff6ff; color: #1e40af; }
.ib-fe-note--success { background: #ecfdf5; color: #065f46; }
.ib-fe-note--warning { background: #fffbeb; color: #92400e; }
.ib-fe-note--error { background: #fef2f2; color: #991b1b; }
.ib-fe-banner { margin-bottom: 12px; padding: 10px 14px; border-radius: 10px; background: #fef2f2; color: #991b1b; }
.ib-fe-success { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.ib-fe-success p { margin: 0; font-size: 16px; }
.ib-fe-check { flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ib-accent); color: var(--ib-on-accent); font-size: 22px; }
.ib-fe-action h4, .ib-fe-proof h4 { margin: 14px 0 6px; font-size: 15px; }
.ib-fe-proof { margin-top: 12px; }
.ib-fe-proof .ib-fe-label { margin-bottom: 10px; }
.ib-fe-confirm { margin-top: 14px; padding: 12px; border: 1px solid #fecaca; border-radius: 10px; background: #fff5f5; }
.ib-fe-loading { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 32px 0; font-weight: 500; color: var(--ib-muted); }
.ib-fe-spinner { flex: none; display: inline-block; width: 56px; height: 28px; vertical-align: middle; background: linear-gradient(90deg, color-mix(in srgb, var(--ib-accent) 18%, transparent) 0%, color-mix(in srgb, var(--ib-accent) 18%, transparent) 30%, var(--ib-accent) 50%, color-mix(in srgb, var(--ib-accent) 18%, transparent) 70%, color-mix(in srgb, var(--ib-accent) 18%, transparent) 100%); background-size: 300% 100%; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24'%3E%3Cpath d='M24 12C30 2 44 2 44 12S30 22 24 12 4 2 4 12s14 10 20 0z' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24'%3E%3Cpath d='M24 12C30 2 44 2 44 12S30 22 24 12 4 2 4 12s14 10 20 0z' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; animation: ib-fe-inf 1.3s linear infinite; }
@keyframes ib-fe-inf { from { background-position: 100% 0; } to { background-position: -100% 0; } }

@media (max-width: 560px) {
	.ib-fe-overlay { padding: 0; }
	.ib-fe-dialog, .ib-fe-dialog[data-width] { max-width: none; max-height: none; min-height: 100%; min-height: 100dvh; border-radius: 0; }
	.ib-fe-head { padding: 12px 16px; }
	.ib-fe-body { padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
	.ib-fe-field--half { flex-basis: 100%; }
	.ib-fe-progress li em { display: none; }
	.ib-fe-input { font-size: 16px; }
	.ib-fe-cards { grid-template-columns: 1fr 1fr; }
	.ib-fe-card img { height: 90px; }
	.ib-fe-cal-grid { gap: 3px; }
	.ib-fe-day { min-height: 36px; border-radius: 8px; }
	.ib-fe-slot { flex: 1 1 calc(33.333% - 8px); text-align: center; padding: 9px 6px; }
	.ib-fe-row { flex-direction: column; gap: 2px; }
	.ib-fe-row > :last-child { text-align: left; }
	.ib-fe-row--total, .ib-fe-row--line { flex-direction: row; justify-content: space-between; }
	.ib-fe-row--total > :last-child, .ib-fe-row--line > :last-child { text-align: right; }
	.ib-fe-discount { flex-direction: column; }
	.ib-fe-nav { flex-wrap: wrap; }
	.ib-fe-nav > .ib-fe-btn { flex: 1 1 auto; }
}
@media (max-width: 360px) {
	.ib-fe-cards { grid-template-columns: 1fr; }
	.ib-fe-slot { flex-basis: calc(50% - 8px); }
}
@media (prefers-reduced-motion: reduce) {
	.ib-fe-spinner { flex: none; display: inline-block; width: 56px; height: 28px; vertical-align: middle; background: linear-gradient(90deg, color-mix(in srgb, var(--ib-accent) 18%, transparent) 0%, color-mix(in srgb, var(--ib-accent) 18%, transparent) 30%, var(--ib-accent) 50%, color-mix(in srgb, var(--ib-accent) 18%, transparent) 70%, color-mix(in srgb, var(--ib-accent) 18%, transparent) 100%); background-size: 300% 100%; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24'%3E%3Cpath d='M24 12C30 2 44 2 44 12S30 22 24 12 4 2 4 12s14 10 20 0z' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 24'%3E%3Cpath d='M24 12C30 2 44 2 44 12S30 22 24 12 4 2 4 12s14 10 20 0z' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; animation: ib-fe-inf 1.3s linear infinite; }
}
