/* IDEAX BOOKING -- public widget styles.
   Deliberately plain CSS, no framework/build step -- just a proper design
   system (custom properties + a handful of components) so it stays fast
   and dependency-free while looking finished. */

.ixb-app {
	--ixb-primary: #4f46e5;
	--ixb-primary-dark: #4338ca;
	--ixb-primary-light: #eef2ff;
	--ixb-success: #16a34a;
	--ixb-success-bg: #f0fdf4;
	--ixb-success-border: #bbf7d0;
	--ixb-danger: #dc2626;
	--ixb-danger-bg: #fef2f2;
	--ixb-danger-border: #fecaca;
	--ixb-text: #111827;
	--ixb-text-muted: #6b7280;
	--ixb-border: #e5e7eb;
	--ixb-bg: #ffffff;
	--ixb-bg-soft: #f9fafb;
	--ixb-radius-lg: 16px;
	--ixb-radius: 10px;
	--ixb-radius-sm: 8px;
	--ixb-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);

	max-width: 900px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--ixb-text);
	line-height: 1.5;
	background: var(--ixb-bg);
	border: 1px solid var(--ixb-border);
	border-radius: var(--ixb-radius-lg);
	box-shadow: var(--ixb-shadow);
	overflow: hidden;
}

.ixb-app * { box-sizing: border-box; }
.ixb-app h3.ixb-title { margin: 28px 28px 4px; font-size: 20px; font-weight: 700; }
.ixb-app p.ixb-desc { margin: 0 28px 20px; color: var(--ixb-text-muted); font-size: 14px; }
.ixb-app > .ixb-error,
.ixb-app > .ixb-loading { margin: 28px; }

/* -- Loading / error states -------------------------------------------------- */

.ixb-loading {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 20px;
	color: var(--ixb-text-muted);
	font-size: 14px;
}

.ixb-loading::before {
	content: "";
	width: 16px;
	height: 16px;
	border: 2px solid var(--ixb-border);
	border-top-color: var(--ixb-primary);
	border-radius: 50%;
	animation: ixb-spin .7s linear infinite;
}

@keyframes ixb-spin {
	to { transform: rotate(360deg); }
}

.ixb-error {
	padding: 14px 16px;
	border-radius: var(--ixb-radius);
	background: var(--ixb-danger-bg);
	color: var(--ixb-danger);
	border: 1px solid var(--ixb-danger-border);
	font-size: 14px;
}

/* -- Shell: host sidebar + date/time/form flow -------------------------------- */

.ixb-shell {
	display: flex;
	align-items: stretch;
	min-height: 480px;
}

.ixb-sidebar {
	flex: 0 0 240px;
	width: 240px;
	background: var(--ixb-bg-soft);
	border-right: 1px solid var(--ixb-border);
	padding: 28px 24px;
}

.ixb-sidebar-inner { display: flex; flex-direction: column; }

.ixb-host-avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	overflow: hidden;
	margin-bottom: 14px;
	background: var(--ixb-primary-light);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.ixb-host-avatar img { width: 100%; height: 100%; object-fit: cover; }

.ixb-host-avatar-initials {
	color: var(--ixb-primary-dark);
	font-weight: 700;
	font-size: 20px;
}

.ixb-host-name {
	font-size: 13px;
	font-weight: 600;
	color: var(--ixb-text-muted);
	margin-bottom: 6px;
}

.ixb-event-title {
	margin: 0 0 14px;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
}

.ixb-event-meta {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 16px;
}

.ixb-meta-item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	color: var(--ixb-text);
}

.ixb-event-desc {
	margin: 0;
	font-size: 13px;
	color: var(--ixb-text-muted);
	white-space: pre-line;
}

.ixb-slot-summary {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 14px;
	border-top: 1px solid var(--ixb-border);
}

.ixb-slot-summary .ixb-meta-item {
	font-weight: 600;
	color: var(--ixb-primary-dark);
}

/* -- Flow (calendar -> slots -> form) ----------------------------------------- */

.ixb-flow {
	flex: 1 1 auto;
	min-width: 0;
	padding: 28px;
}

.ixb-flow-cols {
	display: flex;
	align-items: flex-start;
}

.ixb-flow.is-form-step .ixb-flow-cols { display: none; }
.ixb-flow.is-form-step .ixb-col-form { display: block; }

.ixb-col-calendar {
	flex: 0 0 280px;
	width: 280px;
}

.ixb-col-slots {
	flex: 0 0 0;
	width: 0;
	max-width: 0;
	opacity: 0;
	overflow: hidden;
	padding-left: 0;
	transition: width .25s ease, max-width .25s ease, opacity .2s ease, padding .25s ease;
}

.ixb-col-slots:not(.is-collapsed) {
	flex: 0 0 220px;
	width: 220px;
	max-width: 220px;
	opacity: 1;
	padding-left: 24px;
	border-left: 1px solid var(--ixb-border);
}

.ixb-col-form { display: none; }

.ixb-back-btn {
	background: var(--ixb-bg-soft);
	border: 1px solid var(--ixb-border);
	border-radius: 50%;
	width: 32px;
	height: 32px;
	cursor: pointer;
	font-size: 15px;
	color: var(--ixb-text);
	margin-bottom: 14px;
	transition: all .15s ease;
}

.ixb-back-btn:hover { background: var(--ixb-primary-light); border-color: var(--ixb-primary); color: var(--ixb-primary); }

.ixb-form-heading {
	margin: 0 0 18px;
	font-size: 17px;
	font-weight: 700;
}

/* -- Calendar ------------------------------------------------------------------ */

.ixb-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	font-weight: 700;
	font-size: 14px;
}

.ixb-cal-header button {
	background: var(--ixb-bg);
	border: 1px solid var(--ixb-border);
	border-radius: var(--ixb-radius-sm);
	cursor: pointer;
	width: 30px;
	height: 30px;
	font-size: 14px;
	color: var(--ixb-text);
	transition: background .15s ease, border-color .15s ease;
}

.ixb-cal-header button:hover {
	background: var(--ixb-primary-light);
	border-color: var(--ixb-primary);
}

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

.ixb-cal-grid .ixb-dow {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--ixb-text-muted);
	padding-bottom: 6px;
}

.ixb-cal-day {
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	cursor: default;
	font-size: 13px;
	color: var(--ixb-text-muted);
	transition: background .15s ease, color .15s ease, transform .1s ease;
}

.ixb-cal-day.ixb-has-slots {
	background: var(--ixb-bg);
	color: var(--ixb-text);
	font-weight: 600;
	cursor: pointer;
	box-shadow: inset 0 0 0 1px var(--ixb-border);
}

.ixb-cal-day.ixb-has-slots:hover {
	background: var(--ixb-primary-light);
	box-shadow: inset 0 0 0 1px var(--ixb-primary);
	transform: scale(1.05);
}

.ixb-cal-day.ixb-selected {
	background: var(--ixb-primary) !important;
	color: #fff !important;
	box-shadow: none;
}

.ixb-cal-day.ixb-disabled { color: #d1d5db; }
.ixb-cal-day.ixb-empty { visibility: hidden; }

/* -- Slot list ---------------------------------------------------------------- */

.ixb-slots-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 14px;
	min-height: 26px;
}

.ixb-slots-date {
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}

.ixb-tformat-toggle {
	display: flex;
	border: 1px solid var(--ixb-border);
	border-radius: 999px;
	overflow: hidden;
	flex-shrink: 0;
}

.ixb-tformat {
	background: var(--ixb-bg);
	border: none;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
	color: var(--ixb-text-muted);
}

.ixb-tformat.active {
	background: var(--ixb-primary);
	color: #fff;
}

.ixb-slots-hint {
	color: var(--ixb-text-muted);
	font-size: 13px;
	margin: 0;
}

.ixb-slot-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ixb-slot-btn {
	padding: 9px 16px;
	border: 1px solid var(--ixb-border);
	border-radius: var(--ixb-radius-sm);
	background: var(--ixb-bg);
	color: var(--ixb-text);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all .15s ease;
	width: 100%;
}

.ixb-slot-btn:hover {
	border-color: var(--ixb-primary);
	color: var(--ixb-primary);
}

.ixb-slot-btn.ixb-selected {
	background: var(--ixb-primary);
	border-color: var(--ixb-primary);
	color: #fff;
}

/* -- Form ----------------------------------------------------------------------- */

.ixb-selected-time {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--ixb-primary-light);
	color: var(--ixb-primary-dark);
	border-radius: var(--ixb-radius-sm);
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 16px;
}

.ixb-form label {
	display: block;
	margin-bottom: 14px;
	font-weight: 600;
	font-size: 13px;
	color: var(--ixb-text);
}

.ixb-form input[type="text"],
.ixb-form input[type="email"],
.ixb-form input[type="tel"],
.ixb-form input[type="url"],
.ixb-form select,
.ixb-form textarea {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 10px 12px;
	border: 1px solid var(--ixb-border);
	border-radius: var(--ixb-radius-sm);
	font-weight: 400;
	font-size: 14px;
	font-family: inherit;
	color: var(--ixb-text);
	background: var(--ixb-bg);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.ixb-form input:focus,
.ixb-form select:focus,
.ixb-form textarea:focus {
	outline: none;
	border-color: var(--ixb-primary);
	box-shadow: 0 0 0 3px var(--ixb-primary-light);
}

/* -- Custom fields (admin-defined extra questions) ------------------------------ */

.ixb-cf-group {
	margin-bottom: 14px;
}

.ixb-cf-group-label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	color: var(--ixb-text);
	margin-bottom: 6px;
}

.ixb-cf-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
	font-size: 14px;
	margin-bottom: 8px;
}

.ixb-cf-checkbox input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--ixb-primary);
	flex-shrink: 0;
}

.ixb-form-msg {
	display: block;
	margin-top: 10px;
	font-size: 13px;
	color: var(--ixb-danger);
}

/* -- Buttons ---------------------------------------------------------------------- */

.ixb-btn-primary {
	background: var(--ixb-primary);
	color: #fff;
	border: none;
	border-radius: var(--ixb-radius-sm);
	padding: 11px 20px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background .15s ease, transform .05s ease;
}

.ixb-btn-primary:hover:not(:disabled) { background: var(--ixb-primary-dark); }
.ixb-btn-primary:active:not(:disabled) { transform: scale(.98); }

.ixb-btn-primary:disabled {
	opacity: .55;
	cursor: default;
}

.ixb-btn-secondary {
	background: var(--ixb-bg);
	border: 1px solid var(--ixb-border);
	border-radius: var(--ixb-radius-sm);
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	color: var(--ixb-text);
	cursor: pointer;
	transition: all .15s ease;
}

.ixb-btn-secondary:hover { border-color: var(--ixb-primary); color: var(--ixb-primary); }

/* -- Success / payment screen --------------------------------------------------- */

.ixb-success {
	padding: 40px 28px;
	border-radius: var(--ixb-radius);
	background: var(--ixb-success-bg);
	border: 1px solid var(--ixb-success-border);
	text-align: center;
	margin: 0;
}

.ixb-success-icon {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--ixb-success);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 14px;
	font-size: 24px;
}

.ixb-success h4 {
	margin: 0 0 6px;
	font-size: 17px;
}

.ixb-success p { color: var(--ixb-text-muted); font-size: 14px; margin: 0 0 4px; }

.ixb-payment-instructions {
	background: var(--ixb-bg);
	border: 1px solid var(--ixb-border);
	border-radius: var(--ixb-radius-sm);
	list-style: none;
	margin: 18px 0;
	padding: 4px 16px;
	text-align: left;
}

.ixb-payment-instructions li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid var(--ixb-border);
	font-size: 14px;
}

.ixb-payment-instructions li:last-child { border-bottom: none; }

.ixb-payment-instructions-heading {
	justify-content: flex-start !important;
	background: var(--ixb-bg-soft);
	margin: 0 -16px;
	padding: 8px 16px !important;
	font-size: 12px !important;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--ixb-text-muted);
}

.ixb-copy-btn {
	background: var(--ixb-bg-soft);
	border: 1px solid var(--ixb-border);
	border-radius: 6px;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	color: var(--ixb-primary);
	flex-shrink: 0;
}

.ixb-copy-btn:hover { background: var(--ixb-primary-light); }

.ixb-proof-form {
	margin-top: 18px;
	text-align: left;
	padding-top: 16px;
	border-top: 1px dashed var(--ixb-border);
}

.ixb-proof-form label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 8px;
}

.ixb-proof-form input[type="file"] {
	display: block;
	width: 100%;
	margin-bottom: 12px;
	font-size: 13px;
}

.ixb-proof-msg {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	color: var(--ixb-success);
}

/* -- Old two-column shell (still used by the reschedule flow) ------------------- */

.ixb-layout {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
	padding: 0 28px 28px;
}

.ixb-layout .ixb-calendar {
	flex: 1 1 320px;
	min-width: 280px;
	background: var(--ixb-bg-soft);
	border: 1px solid var(--ixb-border);
	border-radius: var(--ixb-radius);
	padding: 16px;
}

.ixb-layout .ixb-slots {
	flex: 1 1 220px;
	min-width: 220px;
}

.ixb-form-wrap { padding: 0 28px 28px; }

.ixb-form-wrap hr {
	border: none;
	border-top: 1px solid var(--ixb-border);
	margin: 20px 0;
}

/* -- Responsive ------------------------------------------------------------------- */

@media (max-width: 720px) {
	.ixb-shell { flex-direction: column; }

	.ixb-sidebar {
		flex: 0 0 auto;
		width: auto;
		border-right: none;
		border-bottom: 1px solid var(--ixb-border);
	}

	.ixb-flow { padding: 20px; }

	.ixb-flow-cols { flex-wrap: wrap; }

	.ixb-col-calendar { flex: 1 1 100%; width: 100%; }

	.ixb-col-slots:not(.is-collapsed) {
		flex: 1 1 100%;
		width: 100%;
		max-width: none;
		padding-left: 0;
		padding-top: 20px;
		border-left: none;
		border-top: 1px solid var(--ixb-border);
		margin-top: 16px;
	}
}

@media (max-width: 480px) {
	.ixb-app { border-radius: var(--ixb-radius); }
	.ixb-app h3.ixb-title { margin: 20px 20px 4px; }
	.ixb-app p.ixb-desc { margin: 0 20px 16px; }
	.ixb-sidebar { padding: 20px; }
	.ixb-flow { padding: 20px; }
	.ixb-layout,
	.ixb-form-wrap { padding: 0 20px 20px; }
}
