/* Perso Fitting Appointments - widget styles
   Brand: #F9DA23 (yellow), #212121 (dark), #383838 (card). Fonts: Montserrat + Lato. */

.pfa-widget {
	--pfa-yellow: #F9DA23;
	--pfa-dark: #212121;
	--pfa-card: #383838;
	--pfa-line: rgba(255, 255, 255, .14);
	--pfa-muted: rgba(255, 255, 255, .68);

	box-sizing: border-box;
	clear: both;
	width: 100%;
	max-width: 100%;
	margin: 28px 0 8px;
	padding: 24px;
	background: var(--pfa-card);
	color: #fff;
	border: 1px solid var(--pfa-line);
	border-radius: 18px;
	font-family: 'Lato', sans-serif;
	font-size: 16px;
	line-height: 1.5;
	text-align: left;
}

.pfa-widget *,
.pfa-widget *::before,
.pfa-widget *::after { box-sizing: border-box; }

.pfa-widget [hidden] { display: none !important; }

/* Header */
.pfa-head { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; }

.pfa-icon {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--pfa-yellow);
	color: var(--pfa-dark);
	border-radius: 12px;
}
.pfa-icon svg { width: 24px; height: 24px; }

.pfa-widget .pfa-title {
	margin: 0;
	padding: 0;
	color: #fff;
	font-family: 'Montserrat', 'Lato', sans-serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
}

/* Switch */
.pfa-toggle { position: relative; display: flex; align-items: center; gap: 14px; margin: 0; cursor: pointer; user-select: none; }
.pfa-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }

.pfa-switch {
	position: relative;
	flex: 0 0 52px;
	height: 30px;
	background: var(--pfa-dark);
	border: 2px solid var(--pfa-line);
	border-radius: 30px;
	transition: background .2s, border-color .2s;
}
.pfa-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	background: #fff;
	border-radius: 50%;
	transition: transform .2s, background .2s;
}
.pfa-toggle input:checked + .pfa-switch { background: var(--pfa-yellow); border-color: var(--pfa-yellow); }
.pfa-toggle input:checked + .pfa-switch::after { background: var(--pfa-dark); transform: translateX(22px); }
.pfa-toggle input:focus-visible + .pfa-switch { outline: 2px solid var(--pfa-yellow); outline-offset: 3px; }
.pfa-toggle-text { font-family: 'Montserrat', 'Lato', sans-serif; font-size: 15px; font-weight: 600; }

.pfa-widget.is-required .pfa-toggle { display: none; }

/* Body */
.pfa-body { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--pfa-line); }
.pfa-field { margin: 0 0 20px; }
.pfa-label {
	display: block;
	margin: 0 0 8px;
	color: #fff;
	font-family: 'Montserrat', 'Lato', sans-serif;
	font-size: 14px;
	font-weight: 700;
}

.pfa-widget select.pfa-location {
	display: block;
	width: 100%;
	height: 52px;
	margin: 0;
	padding: 0 44px 0 18px;
	background-color: var(--pfa-dark);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' d='M0 0h12L6 8z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 18px center;
	color: #fff;
	border: 1px solid transparent;
	border-radius: 12px;
	font-family: 'Lato', sans-serif;
	font-size: 16px;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}
.pfa-widget select.pfa-location:focus { border-color: var(--pfa-yellow); outline: none; }

.pfa-muted { margin: 0; color: var(--pfa-muted); font-size: 14px; }

/* Calendar */
.pfa-cal-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.pfa-cal-title { font-family: 'Montserrat', 'Lato', sans-serif; font-size: 15px; font-weight: 700; text-transform: capitalize; }

.pfa-widget button.pfa-nav {
	width: 38px;
	height: 38px;
	min-width: 0;
	margin: 0;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--pfa-dark);
	color: #fff;
	border: 1px solid transparent;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	box-shadow: none;
	cursor: pointer;
}
.pfa-widget button.pfa-nav:hover:not(:disabled) { border-color: var(--pfa-yellow); }
.pfa-widget button.pfa-nav:disabled { opacity: .3; cursor: not-allowed; }

.pfa-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.pfa-wd { padding: 4px 0; color: var(--pfa-muted); font-size: 12px; font-weight: 700; text-align: center; text-transform: capitalize; }

.pfa-widget button.pfa-day {
	position: relative;
	min-width: 0;
	min-height: 46px;
	margin: 0;
	padding: 4px 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: var(--pfa-dark);
	color: #fff;
	border: 1px solid transparent;
	border-radius: 12px;
	font-family: 'Lato', sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0;
	text-transform: none;
	text-shadow: none;
	box-shadow: none;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.pfa-widget button.pfa-day:hover:not(:disabled) { border-color: var(--pfa-yellow); }
.pfa-widget button.pfa-day:focus-visible { outline: 2px solid var(--pfa-yellow); outline-offset: 2px; }
.pfa-widget button.pfa-day:disabled { background: transparent; color: rgba(255, 255, 255, .28); font-weight: 400; cursor: not-allowed; }
.pfa-widget button.pfa-day.is-full:disabled { text-decoration: line-through; }
.pfa-widget button.pfa-day.is-selected { background: var(--pfa-yellow); color: var(--pfa-dark); border-color: var(--pfa-yellow); }
.pfa-day-fee { margin-top: 3px; font-size: 10px; font-weight: 400; opacity: .8; white-space: nowrap; }
.pfa-empty { min-height: 46px; }

/* Time slots */
.pfa-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.pfa-widget button.pfa-slot {
	min-width: 0;
	margin: 0;
	padding: 10px 18px;
	background: var(--pfa-dark);
	color: #fff;
	border: 1px solid transparent;
	border-radius: 999px;
	font-family: 'Lato', sans-serif;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	text-shadow: none;
	box-shadow: none;
	cursor: pointer;
}
.pfa-widget button.pfa-slot:hover:not(:disabled) { border-color: var(--pfa-yellow); }
.pfa-widget button.pfa-slot:focus-visible { outline: 2px solid var(--pfa-yellow); outline-offset: 2px; }
.pfa-widget button.pfa-slot:disabled { background: transparent; color: rgba(255, 255, 255, .28); text-decoration: line-through; cursor: not-allowed; }
.pfa-widget button.pfa-slot.is-selected { background: var(--pfa-yellow); color: var(--pfa-dark); border-color: var(--pfa-yellow); }

/* Summary */
.pfa-summary { margin: 0; padding: 16px 18px; background: var(--pfa-dark); border-left: 4px solid var(--pfa-yellow); border-radius: 12px; }
.pfa-row { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; }
.pfa-row span { color: var(--pfa-muted); }
.pfa-row strong { color: #fff; text-align: right; }
.pfa-row:last-of-type strong { color: var(--pfa-yellow); font-family: 'Montserrat', 'Lato', sans-serif; font-size: 18px; }
.pfa-note { margin: 8px 0 0; color: var(--pfa-muted); font-size: 13px; }

/* Error */
.pfa-error {
	margin-top: 16px;
	padding: 10px 14px;
	background: rgba(255, 90, 90, .12);
	color: #ffb4b4;
	border: 1px solid rgba(255, 90, 90, .55);
	border-radius: 10px;
	font-size: 14px;
}

@media (max-width: 480px) {
	.pfa-widget { padding: 18px; border-radius: 14px; }
	.pfa-grid { gap: 4px; }
	.pfa-row { flex-direction: column; gap: 0; }
	.pfa-row strong { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
	.pfa-switch, .pfa-switch::after, .pfa-widget button.pfa-day { transition: none; }
}
