/* ============================================
   DISPLAY MODE
   ============================================ */

.fse-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.fse-empty {
	color: #888;
	font-style: italic;
	padding: 20px 0;
}

.fse-row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 16px;
	background: #fff;
	border-radius: 8px;
}

/* Calendar icon. Both halves carry the same border so widths match
   precisely — fixes the misalignment caused by border-box vs no-border. */
.fse-cal {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	width: 60px;
	height: 60px;
	overflow: hidden;
	border-radius: 6px;
	box-sizing: border-box;
}

.fse-cal-month,
.fse-cal-day {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	border: 1px solid #ddd;
	width: 100%;
}

.fse-cal-month {
	flex: 0 0 36%;
	background: #e23b3b;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	line-height: 1;
	border-radius: 6px 6px 0 0;
	border-bottom: 0;
}

.fse-cal-day {
	flex: 1 1 auto;
	background: #fff;
	color: #1a1a1a;
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
	border-radius: 0 0 6px 6px;
}

.fse-meta {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.fse-date {
	font-size: 16px;
	font-weight: 600;
	color: #1a1a1a;
	line-height: 1.3;
}

.fse-recurrence {
	font-size: 12px;
	color: #6a4a8a;
	font-style: italic;
	line-height: 1.3;
}

.fse-time {
	font-size: 14px;
	color: #555;
	line-height: 1.3;
}

.fse-location {
	font-size: 13px;
	color: #444;
	line-height: 1.3;
}

.fse-type {
	display: inline-block;
	margin-top: 4px;
	padding: 2px 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: 999px;
	background: #f0f0f0;
	color: #555;
	width: max-content;
}

.fse-type--online { background: #e3f2fd; color: #1565c0; }
.fse-type--dropin { background: #fff3e0; color: #ef6c00; }
.fse-type--appt   { background: #f3e5f5; color: #6a1b9a; }

.fse-book-btn {
	flex: 0 0 auto;
	display: inline-block;
	padding: 10px 18px;
	background: #1a1a1a;
	color: #fff;
	border-radius: 6px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.fse-book-btn:hover,
.fse-book-btn:focus {
	background: #000;
	color: #fff;
}

/* "No Booking Required" pill — replaces the book button for drop-in rows. */
.fse-no-booking {
	flex: 0 0 auto;
	display: inline-block;
	padding: 8px 14px;
	background: #f0f0f0;
	color: #666;
	border-radius: 6px;
	font-weight: 600;
	font-size: 13px;
	font-style: italic;
	text-align: center;
}

@media (max-width: 600px) {
	.fse-row {
		flex-wrap: wrap;
	}
	.fse-book-btn,
	.fse-no-booking {
		width: 100%;
		text-align: center;
		margin-top: 8px;
	}
}

/* ============================================
   EDITOR MODE
   ============================================ */

.fse-editor {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.fse-editor-add-buttons {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
}

.fse-editor-add-buttons--top    { margin-bottom: 4px; }
.fse-editor-add-buttons--bottom { margin-top: 4px; }

.fse-editor-add {
	display: inline-block;
	padding: 8px 14px;
	margin: 0;
	background: #fff;
	color: #333;
	border: 1px dashed #999;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	line-height: 1.4;
	width: auto;
	text-decoration: none;
	box-shadow: none;
}

.fse-editor-add:hover {
	background: #f0f0f0;
	border-color: #555;
	color: #000;
}

.fse-editor-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.fse-editor-list--empty {
	display: none;
}

.fse-editor-row {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 14px;
	background: #fff;
	border: 1px solid rgba(0,0,0,0.1);
	border-radius: 8px;
}

.fse-editor-row--kind-recurring {
	background: #faf7fc;
	border-color: #d8c8e6;
}

.fse-editor-row-label {
	position: absolute;
	top: -10px;
	left: 14px;
	padding: 1px 8px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	background: #1a1a1a;
	color: #fff;
	border-radius: 999px;
}

.fse-editor-row--kind-recurring .fse-editor-row-label {
	background: #6a4a8a;
}

.fse-editor-fields {
	flex: 1 1 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 10px;
	min-width: 0;
}

.fse-editor-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.fse-editor-field[hidden] {
	display: none !important;
}

.fse-editor-label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #666;
}

.fse-editor-input {
	width: 100%;
	padding: 12px 14px;
	font-size: 15px;
	line-height: 1.4;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	color: #1a1a1a;
	box-sizing: border-box;
}

.fse-editor-input:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.fse-editor-remove {
	flex: 0 0 auto;
	align-self: flex-start;
	margin-top: 18px;
	width: 28px;
	height: 28px;
	background: transparent;
	border: 1px solid #ccc;
	border-radius: 50%;
	color: #888;
	cursor: pointer;
	font-size: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fse-editor-remove:hover {
	background: #fee;
	border-color: #c62828;
	color: #c62828;
}

/* Save button + state colors */

.fse-editor-actions {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
}

.fse-editor .fse-editor-save {
	display: inline-block;
	margin: 0;
	padding: 10px 20px;
	background: #1a1a1a;
	color: #fff;
	border: 1px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	width: auto;
	text-decoration: none;
	box-shadow: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.fse-editor .fse-editor-save:hover {
	background: #000;
	color: #fff;
}

.fse-editor .fse-editor-save.fse-editor-save--saving,
.fse-editor .fse-editor-save.fse-editor-save--saving:hover {
	background: #a8d8a8;
	color: #1a1a1a;
	cursor: progress;
}

.fse-editor .fse-editor-save.fse-editor-save--ok,
.fse-editor .fse-editor-save.fse-editor-save--ok:hover {
	background: #2a8c2a;
	color: #fff;
}

.fse-editor .fse-editor-save.fse-editor-save--err,
.fse-editor .fse-editor-save.fse-editor-save--err:hover {
	background: #c62828;
	color: #fff;
}

.fse-editor .fse-editor-save:disabled:not(.fse-editor-save--saving) {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Floating save bar */

.fse-sticky-yes .fse-editor-actions {
	position: fixed;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
	z-index: 9999;
	max-width: calc(100vw - 40px);
	padding: 12px 16px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.fse-sticky-yes .fse-editor::after {
	content: '';
	display: block;
	height: 80px;
}
