/* ====================================================================
   Petal Booking — public widget styles
   ==================================================================== */

/* The widget is max 480px for form steps; the service grid step
   overrides this to a wider container via .petal-service-step.      */
.petal-widget {
	max-width: 480px;
	font-family: inherit;
	color: #2a2a2a;
}
.petal-manage-page { background: #faf7f2; padding: 40px 16px; }
.petal-manage-page .petal-widget { margin: 0 auto; }

.petal-widget * { box-sizing: border-box; }

/* On the service step, allow the grid to breathe wider */
.petal-widget:has(.petal-service-step) {
	max-width: 960px;
}
/* Fallback for browsers without :has() */
.petal-service-step {
	width: 100%;
}

/* ---- Chrome -------------------------------------------------------- */
.petal-step-title {
	font-size: 20px;
	margin: 0 0 16px;
	font-weight: 600;
}
.petal-lang-switch {
	float: right;
	border: 1px solid #ccc;
	background: #fff;
	border-radius: 4px;
	padding: 2px 10px;
	cursor: pointer;
	font-size: 13px;
}

/* ---- Loading ------------------------------------------------------- */
.petal-loading { color: #999; font-size: 14px; padding: 20px 0; }

/* ---- Category header (Booktics-style) ------------------------------ */
.petal-category-header {
	display: flex;
	align-items: center;
	margin: 28px 0 14px;
	gap: 12px;
}
.petal-category-label {
	font-family: Georgia, "Times New Roman", serif;
	font-style: italic;
	font-size: 18px;
	color: #2a2a2a;
	white-space: nowrap;
	font-weight: 400;
}
.petal-category-rule {
	flex: 1;
	height: 1px;
	background: #d0b99a;
}

/* ---- Service card grid --------------------------------------------- */
.petal-service-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
	margin-bottom: 8px;
}
@media (max-width: 700px) {
	.petal-service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
	.petal-service-grid { grid-template-columns: 1fr; }
}

/* ---- Service card -------------------------------------------------- */
.petal-service-card {
	background: #fff;
	border: 1px solid #d4aa7d;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	cursor: default;
}
.petal-service-card:hover { border-color: #b08968; box-shadow: 0 2px 8px rgba(176,137,104,0.15); }

/* Image */
.petal-card-img-wrap {
	width: 100%;
	height: 190px;
	overflow: hidden;
}
.petal-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.petal-card-img-placeholder {
	width: 100%;
	height: 100px;
	background: #f5ece2;
}

/* Card body */
.petal-card-body {
	padding: 14px;
	display: flex;
	flex-direction: column;
	flex: 1;
}
.petal-card-name {
	font-weight: 700;
	font-size: 15px;
	color: #1a1a1a;
	margin-bottom: 6px;
}
.petal-card-desc {
	font-size: 13px;
	color: #777;
	line-height: 1.45;
	margin-bottom: 10px;
	flex: 1;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.petal-card-price {
	font-size: 17px;
	font-weight: 600;
	color: #c9a96e;
	margin-bottom: 12px;
}
.petal-card-btn {
	display: block;
	width: 100%;
	background: linear-gradient(115deg, rgb(244,232,200) 0%, rgb(220,195,143) 26%, rgb(194,160,102) 50%, rgb(234,216,168) 74%, rgb(184,146,79) 100%);
	color: #04070f;
	border: none;
	border-radius: 5px;
	padding: 10px 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	cursor: pointer;
	text-transform: uppercase;
}
.petal-card-btn:hover { filter: brightness(0.93); }

/* Toggle-select label on the multi-service step.
 * Default state: same gold gradient as the old BOEK NU button.
 * Selected state (card has .petal-service-selected): dark/inverted so
 * it's obvious the service is already in the selection. */
.petal-card-select-label {
	display: block;
	width: 100%;
	background: linear-gradient(115deg, rgb(244,232,200) 0%, rgb(220,195,143) 26%, rgb(194,160,102) 50%, rgb(234,216,168) 74%, rgb(184,146,79) 100%);
	color: #04070f;
	border: none;
	border-radius: 5px;
	padding: 10px 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	cursor: pointer;
	text-transform: uppercase;
	text-align: center;
	user-select: none;
	transition: filter 0.15s, background 0.2s, color 0.2s;
}
.petal-service-card:hover .petal-card-select-label { filter: brightness(0.93); }
/* Selected state */
.petal-service-selected .petal-card-select-label {
	background: #4a3728;
	color: #f3ece3;
	filter: none;
	letter-spacing: 0.05em;
}
.petal-service-selected:hover .petal-card-select-label {
	background: #3a2a1e;
}

/* ---- Selected-services chip bar (datetime + details steps) --------- */
/*
 * Shows the current service selection above the calendar / form so the
 * visitor can remove a service or add more without hunting for a back button.
 */
.petal-selected-services-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 18px;
	padding-bottom: 14px;
	border-bottom: 1px solid #ede5d8;
}
.petal-service-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #f3ece3;
	border: 1px solid #d4aa7d;
	border-radius: 20px;
	padding: 5px 10px 5px 13px;
	font-size: 13px;
	font-weight: 600;
	color: #4a3728;
}
.petal-chip-remove {
	background: none;
	border: none;
	color: #b08968;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	margin: 0 0 0 2px;
	transition: color 0.15s;
}
.petal-chip-remove:hover { color: #c0392b; }
.petal-service-chip-add {
	background: none;
	border: 1px dashed #d4aa7d;
	border-radius: 20px;
	padding: 5px 13px;
	font-size: 13px;
	color: #b08968;
	cursor: pointer;
	transition: background 0.15s;
}
.petal-service-chip-add:hover { background: #f3ece3; }

/* ---- Date / time step --------------------------------------------- */
/* Header row (Mon–Sun labels) mirrors the grid's 7 columns */
.petal-calendar-header {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	margin: 10px 0 2px;
}

.petal-calendar {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	margin: 0 0 10px;
}

/* Month label spans the full 7-column width */
.petal-month-label {
	grid-column: 1 / -1;
	font-family: Georgia, "Times New Roman", serif;
	font-style: italic;
	font-size: 14px;
	color: #b08968;
	padding: 10px 0 4px;
	font-weight: 400;
}

.petal-date-cell {
	text-align: center;
	padding: 8px 0;
	border-radius: 6px;
	font-size: 14px;
	border: 1px solid transparent;
	cursor: pointer;
}
.petal-date-cell.available { background: #f3ece3; font-weight: 600; }
.petal-date-cell.available:hover { background: #e4d3bc; }
.petal-date-cell.selected { background: #b08968; color: #fff; }
.petal-date-cell.disabled { color: #ccc; cursor: default; }
.petal-date-cell.empty { background: none; border-color: transparent; cursor: default; }
.petal-date-label { font-size: 11px; color: #999; text-align: center; }

.petal-slots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Inline slot row — spans all 7 calendar columns, appears right below the selected date */
.petal-slots-inline {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 12px 4px 14px;
	border-top: 1px solid #ede5d8;
	border-bottom: 1px solid #ede5d8;
	margin: 2px 0 6px;
	animation: petal-fade-in 0.18s ease;
}
@keyframes petal-fade-in {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: translateY(0); }
}

.petal-slot-btn {
	border: 1px solid #d4aa7d;
	background: #faf7f2;
	color: #4a3728;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	letter-spacing: 0.02em;
}
.petal-slot-btn:hover,
.petal-slot-btn.selected {
	background: linear-gradient(115deg, rgb(244,232,200) 0%, rgb(220,195,143) 26%, rgb(194,160,102) 50%, rgb(234,216,168) 74%, rgb(184,146,79) 100%);
	color: #04070f;
	border-color: transparent;
}

/* ---- Details form -------------------------------------------------- */
.petal-field { margin-bottom: 12px; }
.petal-field label { display: block; margin-bottom: 4px; font-size: 13px; }
.petal-field input, .petal-field textarea {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 14px;
}

/* ---- Buttons ------------------------------------------------------- */
.petal-btn {
	background: linear-gradient(115deg, rgb(244,232,200) 0%, rgb(220,195,143) 26%, rgb(194,160,102) 50%, rgb(234,216,168) 74%, rgb(184,146,79) 100%);
	color: #04070f;
	border: none;
	padding: 10px 20px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 700;
}
.petal-btn:hover { filter: brightness(0.93); }
.petal-btn:disabled { opacity: 0.5; cursor: default; }
.petal-btn-secondary { background: #fff; color: #333; border: 1px solid #ccc; filter: none; }
.petal-btn-secondary:hover { background: #f5f5f5; }
.petal-btn-danger { background: #c0392b; color: #fff; filter: none; }
.petal-btn-danger:hover { background: #a93226; }

/* ---- Back button --------------------------------------------------- */
.petal-back-btn {
	display: inline-flex;
	align-items: center;
	background: none;
	border: none;
	color: #888;
	font-size: 13px;
	cursor: pointer;
	padding: 0 0 12px;
	letter-spacing: 0.03em;
}
.petal-back-btn:hover { color: #333; }

/* ---- Misc ---------------------------------------------------------- */
.petal-row { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.petal-total { font-weight: 600; font-size: 16px; }
.petal-error { color: #c0392b; margin: 8px 0; font-size: 14px; }
.petal-success { text-align: center; padding: 20px 0; }
.petal-success h3 { margin-bottom: 8px; }

/* ---- Floating booking button --------------------------------------- */
.petal-float-wrap {
	position: fixed;
	z-index: 99998;
	bottom: 24px;
}
.petal-float-pos-right { right: 24px; }
.petal-float-pos-left  { left: 24px; }

.petal-float-btn {
	display: inline-flex;
	align-items: center;
	background: linear-gradient(115deg, rgb(244,232,200) 0%, rgb(220,195,143) 26%, rgb(194,160,102) 50%, rgb(234,216,168) 74%, rgb(184,146,79) 100%);
	color: #04070f;
	border: none;
	border-radius: 40px;
	padding: 14px 22px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	cursor: pointer;
	box-shadow: 0 4px 18px rgba(176,137,104,0.35);
	transition: filter 0.2s, box-shadow 0.2s, transform 0.15s;
	white-space: nowrap;
}
.petal-float-btn:hover {
	filter: brightness(0.93);
	box-shadow: 0 6px 24px rgba(176,137,104,0.45);
	transform: translateY(-2px);
}

/* Overlay — darkens the page when panel is open */
.petal-float-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.45);
	z-index: 99999;
	opacity: 0;
	transition: opacity 0.3s;
}
.petal-float-overlay.petal-float-open {
	display: block;
	opacity: 1;
}

/* Slide-in panel */
.petal-float-panel {
	position: fixed;
	top: 0;
	bottom: 0;
	width: 420px;
	max-width: 100vw;
	background: #faf7f2;
	z-index: 100000;
	overflow-y: auto;
	padding: 24px 20px 40px;
	box-shadow: -4px 0 32px rgba(0,0,0,0.18);
	transform: translateX(105%);
	transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
	right: 0;
}
.petal-float-panel.petal-float-open {
	transform: translateX(0);
}

/* Close button inside the panel */
.petal-float-close {
	position: sticky;
	top: 0;
	float: right;
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: #666;
	padding: 4px 6px;
	line-height: 1;
	z-index: 1;
}
.petal-float-close:hover { color: #222; }

@media (max-width: 480px) {
	.petal-float-panel { width: 100vw; padding: 16px 12px 32px; }
	.petal-float-btn { font-size: 13px; padding: 12px 18px; }
}

/* ---- Service step floating selection pill -------------------------- */
/*
 * Fixed to the bottom-right of the viewport so it always appears
 * regardless of the widget's parent container. Appended to document.body
 * by JS and removed when leaving the service step.
 * Hidden (opacity 0, pointer-events none) until a service is selected.
 */
.petal-service-footer {
	position: fixed;
	bottom: 28px;
	right: 28px;
	background: #fff;
	border: 1px solid #d4aa7d;
	border-radius: 40px;
	box-shadow: 0 6px 28px rgba(176,137,104,0.35);
	padding: 12px 16px 12px 22px;
	display: flex;
	align-items: center;
	gap: 14px;
	z-index: 100002;

	/* Hidden until a service is selected */
	opacity: 0;
	transform: translateY(16px);
	pointer-events: none;
	transition: opacity 0.22s ease, transform 0.22s ease;
}
.petal-service-footer.petal-footer-active {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
.petal-service-footer-label {
	font-size: 14px;
	font-weight: 600;
	color: #4a3728;
	white-space: nowrap;
}
/* On phones: full-width bar at the bottom */
@media (max-width: 500px) {
	.petal-service-footer {
		left: 12px;
		right: 12px;
		bottom: 16px;
		border-radius: 12px;
		justify-content: space-between;
	}
}

/* ---- Booking summary card (details step) --------------------------- */
.petal-booking-summary {
	background: #faf7f2;
	border: 1px solid #d4aa7d;
	border-radius: 8px;
	padding: 16px 18px;
	margin-bottom: 20px;
}
.petal-summary-title {
	font-family: Georgia, "Times New Roman", serif;
	font-style: italic;
	font-size: 16px;
	color: #b08968;
	margin-bottom: 12px;
	font-weight: 400;
}
.petal-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 5px 0;
	border-bottom: 1px solid #ede5d8;
	font-size: 14px;
}
.petal-summary-row:last-child { border-bottom: none; }
.petal-summary-label {
	color: #999;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	flex-shrink: 0;
	margin-right: 12px;
}
.petal-summary-value {
	color: #1a1a1a;
	font-weight: 600;
	text-align: right;
}

/* ---- GDPR consent checkbox ----------------------------------------- */
.petal-consent-field {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 16px;
	margin-bottom: 4px;
}
.petal-consent-field input[type="checkbox"] {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	margin-top: 2px;
	accent-color: #b08968;
	cursor: pointer;
}
.petal-consent-label {
	font-size: 13px;
	color: #555;
	line-height: 1.5;
	cursor: pointer;
}
.petal-consent-label a {
	color: #b08968;
	text-decoration: underline;
}
.petal-consent-label a:hover {
	color: #8a6543;
}
