/* Availo booking widget */

/*
 * Defensive resets: the widget renders inside arbitrary themes and page
 * builders (Elementor, Divi, WPBakery, Bricks, ...) whose global button/
 * input styling would otherwise leak in. Specific rules below still win.
 */
.availo-widget *,
.availo-widget *::before,
.availo-widget *::after,
.availo-manage *,
.availo-overlay * {
	box-sizing: border-box;
}

.availo-widget button,
.availo-manage button,
.availo-overlay button {
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
	text-shadow: none;
	box-shadow: none;
	margin: 0;
	width: auto;
}

.availo-widget input,
.availo-widget textarea,
.availo-widget select,
.availo-manage textarea {
	font-family: inherit;
	max-width: 100%;
}

.availo-page {
	max-width: 900px;
	margin: 40px auto;
	padding: 0 16px;
}

.availo-widget,
.availo-manage {
	--availo-accent: #0069ff;
	font-size: 15px;
	line-height: 1.5;
	color: #1a1a1a;
	/* Sane width inside full-width theme/builder containers. */
	max-width: 1040px;
}

.availo-card {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	background: #fff;
	border: 1px solid #e2e4e8;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
	overflow: hidden;
}

.availo-loading,
.availo-not-found {
	padding: 40px;
	justify-content: center;
	color: #666;
}

/* ---------- 3-column booking layout (calendar step) ---------- */

.availo-card--3col {
	flex-wrap: wrap;
	align-items: stretch;
}

.availo-card--3col .availo-error {
	flex: 1 0 100%;
	margin: 0;
	border-radius: 0;
}

.availo-card--3col .availo-event-panel {
	flex: 0 0 clamp(210px, 27%, 300px);
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.availo-calendar-col {
	flex: 1 1 360px;
	min-width: 0;
	padding: 24px;
	border-right: 1px solid #e2e4e8;
}

.availo-times-col {
	flex: 0 0 216px;
	min-width: 0;
	padding: 22px 18px;
	display: flex;
	flex-direction: column;
	max-height: 560px;
}

.availo-times-col .availo-times {
	flex: 1 1 auto;
	max-height: none;
	overflow-y: auto;
	padding-right: 4px;
}

.availo-cal-arrows {
	display: flex;
	gap: 6px;
	flex: 0 0 auto;
}

/* Left: event info */
.availo-event-panel {
	flex: 1 1 260px;
	min-width: 240px;
	padding: 28px;
	border-right: 1px solid #e2e4e8;
	display: flex;
	flex-direction: column;
}

.availo-event-head {
	display: flex;
	align-items: center;
	gap: 11px;
	margin-bottom: 14px;
}

.availo-host-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 auto;
	box-shadow: 0 1px 2px rgba(16, 32, 60, 0.12);
}

.availo-host {
	color: #6b7280;
	font-size: 14px;
	font-weight: 500;
}

.availo-event-name {
	margin: 0 0 14px;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.25;
	color: #1a1a1a;
}

/* Description grows to fill the column and scrolls; a soft fade hints at more. */
.availo-event-desc-wrap {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	margin-bottom: 18px;
	-webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent);
	mask-image: linear-gradient(to bottom, #000 82%, transparent);
}

.availo-event-desc {
	margin: 0;
	color: #555;
	font-size: 14px;
	line-height: 1.6;
	white-space: pre-line;
}

/* Icon meta rows (duration, location, timezone), pinned to the bottom. */
.availo-event-meta {
	display: flex;
	flex-direction: column;
	gap: 13px;
	margin-top: auto;
}

.availo-meta-row {
	display: flex;
	align-items: center;
	gap: 11px;
	font-size: 14px;
	color: #374151;
	min-width: 0;
}

.availo-meta-ico {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	color: #9aa0a8;
	display: inline-flex;
}

.availo-meta-ico svg {
	width: 18px;
	height: 18px;
}

.availo-meta-text {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.availo-meta-row--tz .availo-meta-chevron {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-left: -4px;
	color: #9aa0a8;
	display: inline-flex;
}

.availo-meta-row--tz .availo-meta-chevron svg {
	width: 16px;
	height: 16px;
}

/* Right: picker */
.availo-picker {
	flex: 2 1 380px;
	min-width: 300px;
	padding: 28px;
}

.availo-cal-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.availo-cal-title {
	font-weight: 600;
}

.availo-nav-btn {
	flex: 0 0 auto;
	box-sizing: border-box;
	width: 36px;
	height: 36px;
	min-width: 36px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	background: #fff;
	border: 1px solid #d5d8dd;
	border-radius: 50%;
	font-size: 18px;
	cursor: pointer;
	color: #333;
}

.availo-nav-btn:hover:not(:disabled) {
	background: #f4f6f9;
	border-color: #c2c7cf;
}

.availo-nav-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.availo-calendar {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
	margin-bottom: 4px;
}

.availo-cal-head {
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #9aa0a8;
	padding: 4px 0 8px;
}

.availo-cal-day {
	min-height: 40px; /* fallback where aspect-ratio is unsupported */
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 8px; /* rounded square, matches the reference */
	background: none;
	color: #c2c5cc;
	cursor: default;
	padding: 0;
}

.availo-cal-daynum {
	font-size: 14px;
	font-weight: 600;
}

.availo-cal-day.is-available {
	background: #eef1f5;
	color: #1a1a1a;
	cursor: pointer;
}

/* :not(.is-selected) — hovering the selected day must not repaint it. */
.availo-cal-day.is-available:not(.is-selected):hover {
	background: #e1e5ea;
}

.availo-cal-day.is-selected {
	background: var(--availo-accent);
	color: #fff;
}

.availo-tz-select {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	color: #374151;
	font-size: 14px;
	line-height: 1.4;
	cursor: pointer;
	text-overflow: ellipsis;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.availo-tz-select:focus {
	outline: none;
}

.availo-times-title {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 12px;
}

.availo-times {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 320px;
	overflow-y: auto;
}

.availo-time-btn {
	/* Never squash inside the scrolling flex column (.availo-times). */
	flex-shrink: 0;
	border: 1px solid var(--availo-accent);
	color: var(--availo-accent);
	background: #fff;
	border-radius: 6px;
	padding: 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
}

.availo-time-btn:hover {
	background: #eef4fe; /* fallback where color-mix is unsupported */
	background: color-mix(in srgb, var(--availo-accent) 8%, #fff);
}

/* Form */
.availo-back {
	background: none;
	border: none;
	color: var(--availo-accent);
	cursor: pointer;
	padding: 0;
	margin-bottom: 20px;
	font-size: 14px;
}

.availo-selected-slot {
	background: #f7f8fa;
	border-radius: 8px;
	padding: 14px 16px;
	margin-bottom: 24px;
}

/* "Enter Details" heading on the form step. */
.availo-picker h3 {
	margin: 0 0 18px;
	line-height: 1.3;
}

.availo-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.availo-field span {
	display: block;
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 4px;
}

.availo-field input,
.availo-field textarea {
	width: 100%;
	border: 1px solid #d5d8dd;
	border-radius: 6px;
	padding: 9px 12px;
	font-size: 14px;
	box-sizing: border-box;
}

.availo-field input:focus,
.availo-field textarea:focus {
	outline: 2px solid var(--availo-accent);
	outline-offset: -1px;
	border-color: transparent;
}

.availo-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.availo-primary-btn {
	background: var(--availo-accent);
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	align-self: flex-start;
}

.availo-primary-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.availo-secondary-btn {
	background: #fff;
	color: var(--availo-accent);
	border: 1px solid var(--availo-accent);
	border-radius: 999px;
	padding: 10px 20px;
	font-weight: 600;
	cursor: pointer;
}

.availo-danger-btn {
	background: #fff;
	color: #c0392b;
	border: 1px solid #c0392b;
	border-radius: 999px;
	padding: 10px 20px;
	font-weight: 600;
	cursor: pointer;
}

.availo-error {
	background: #fdecea;
	color: #b71c1c;
	border-radius: 6px;
	padding: 10px 14px;
	margin-bottom: 12px;
	font-size: 14px;
}

.availo-muted {
	color: #4b5563;
	font-size: 14px;
}

/* Confirmation */
.availo-confirmation {
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 44px 28px;
}

.availo-confirmation h2 {
	margin: 0 0 10px;
	color: #1f2937;
}

/* Per-event thank-you / status message under the heading. */
.availo-confirmation > p {
	margin: 0 0 22px;
	color: #374151;
	font-size: 15px;
	line-height: 1.6;
}

.availo-confirmation .availo-selected-slot {
	margin-bottom: 0;
	color: #1f2937;
}

.availo-confirmation .availo-selected-slot strong {
	color: #111827;
}

.availo-confirmation .availo-selected-slot .availo-muted {
	color: #4b5563;
}

.availo-check {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #2e9e5b;
	color: #fff;
	font-size: 26px;
	line-height: 48px;
	margin-bottom: 16px;
}

.availo-check.is-pending {
	background: #1d4ed8;
}

.availo-confirm-links {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: center;
	margin-top: 26px;
}

.availo-confirm-links a {
	color: var(--availo-accent);
	font-weight: 600;
	text-decoration: none;
}

/* Manage view */
.availo-manage-card {
	flex-direction: column;
	padding: 28px;
}

.availo-manage-card h2 {
	margin-top: 0;
}

.availo-manage-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.availo-cancel-area {
	flex-basis: 100%;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-width: 420px;
}

.availo-cancel-area textarea {
	border: 1px solid #d5d8dd;
	border-radius: 6px;
	padding: 8px 12px;
}

.availo-status-badge {
	display: inline-block;
	margin-top: 8px;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	background: #eef2f7;
	color: #555;
}

.availo-status--confirmed {
	background: #e6f4ec;
	color: #21713f;
}

.availo-status--pending {
	background: #e8f0fe;
	color: #1d4ed8;
}

.availo-status--cancelled {
	background: #fdecea;
	color: #b71c1c;
}

.availo-status--rescheduled {
	background: #fff4e0;
	color: #9a6700;
}

/* Popup */
.availo-overlay {
	position: fixed;
	top: 0; /* longhand fallback where the inset shorthand is unsupported */
	right: 0;
	bottom: 0;
	left: 0;
	inset: 0;
	background: rgba(20, 22, 26, 0.6);
	z-index: 99999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 40px 16px;
	overflow-y: auto;
}

.availo-overlay-inner {
	position: relative;
	width: 100%;
	max-width: 860px;
}

.availo-overlay-close {
	position: absolute;
	top: -34px;
	right: 0;
	background: none;
	border: none;
	color: #fff;
	font-size: 28px;
	cursor: pointer;
	line-height: 1;
}

/* Responsive */

/* Tablet: drop the times into its own full-width row under the calendar so the
   calendar keeps a usable width (event | calendar, then times below). */
@media (max-width: 899px) {
	.availo-card--3col .availo-event-panel {
		flex-basis: 34%;
	}

	.availo-calendar-col {
		flex: 1 1 300px;
		border-right: none;
	}

	.availo-times-col {
		flex: 1 0 100%;
		max-height: none;
		border-top: 1px solid #e2e4e8;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: flex-start;
		gap: 8px;
	}

	.availo-times-col .availo-times-title {
		flex: 1 0 100%;
	}

	.availo-times-col .availo-times {
		flex-direction: row;
		flex-wrap: wrap;
		max-height: none;
		overflow: visible;
	}

	.availo-times-col .availo-time-btn {
		flex: 0 0 auto;
		min-width: 96px;
	}
}

@media (max-width: 719px) {
	.availo-event-panel,
	.availo-picker {
		/* Let panels shrink below their desktop minimums so the card's
		   overflow:hidden never clips the Saturday column on narrow phones. */
		min-width: 0;
		flex-basis: 100%;
	}

	.availo-event-panel {
		border-right: none;
		border-bottom: 1px solid #e2e4e8;
	}

	/* Stack all three columns. */
	.availo-card--3col .availo-event-panel,
	.availo-calendar-col {
		flex: 1 0 100%;
		border-right: none;
		border-bottom: 1px solid #e2e4e8;
	}
}
