/* Licinio Event Calendar – Block styles (editor & frontend) */

/* ServerSideRender output shown inside the Gutenberg WYSIWYG. */
.licinio-editor-server-preview {
	box-sizing: border-box;
	width: 100%;
	padding: 1rem;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #fff;
	color: #1e1e1e;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
	line-height: 1.4;
}

.licinio-editor-server-preview *,
.licinio-editor-server-preview *::before,
.licinio-editor-server-preview *::after {
	box-sizing: inherit;
}

.licinio-editor-server-preview__heading,
.licinio-editor-server-preview__toolbar,
.licinio-editor-server-preview__controls {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.licinio-editor-server-preview__heading {
	justify-content: space-between;
	margin-bottom: 0.75rem;
}

.licinio-editor-server-preview__heading span {
	color: #646970;
	font-size: 0.8rem;
}

.licinio-editor-server-preview__toolbar {
	flex-wrap: wrap;
	margin-bottom: 0.7rem;
	padding-bottom: 0.7rem;
	border-bottom: 1px solid #e2e4e7;
}

.licinio-editor-server-preview button,
.licinio-editor-server-preview select {
	min-height: 28px;
	padding: 0.25rem 0.55rem;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	background: #fff;
	color: #1d2327;
	font-size: 0.8rem;
}

.licinio-editor-server-preview button:disabled,
.licinio-editor-server-preview select:disabled {
	opacity: 1;
	cursor: default;
}

.licinio-editor-server-preview__calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	border-top: 1px solid #e2e4e7;
	border-left: 1px solid #e2e4e7;
}

.licinio-editor-server-preview__weekday,
.licinio-editor-server-preview__day {
	min-width: 0;
	padding: 0.35rem;
	border-right: 1px solid #e2e4e7;
	border-bottom: 1px solid #e2e4e7;
}

.licinio-editor-server-preview__weekday {
	background: #f6f7f7;
	color: #50575e;
	font-size: 0.75rem;
	font-weight: 600;
	text-align: center;
}

.licinio-editor-server-preview__day {
	min-height: 42px;
	font-size: 0.78rem;
}

.licinio-editor-server-preview__day.is-muted {
	color: #a7aaad;
}

.licinio-editor-server-preview__event {
	display: block;
	overflow: hidden;
	margin-top: 0.2rem;
	padding: 0.12rem 0.25rem;
	border-radius: 2px;
	background: #3858e9;
	color: #fff;
	font-size: 0.68rem;
	line-height: 1.2;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.licinio-editor-server-preview__event-card {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: 0.5rem;
	padding: 0.65rem;
	border: 1px solid #e2e4e7;
	border-radius: 5px;
}

.licinio-editor-server-preview__event-card time {
	flex: 0 0 5rem;
	color: #3858e9;
	font-size: 0.8rem;
}

.licinio-editor-server-preview__event-card a {
	min-width: 0;
	flex: 1;
	color: #1d2327;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.licinio-editor-server-preview__badge {
	flex: 0 0 auto;
	padding: 0.2rem 0.35rem;
	border-radius: 3px;
	background: #f0f0f1;
	color: #50575e;
	font-size: 0.72rem;
}

.licinio-editor-server-preview__timeline {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.65rem;
}

.licinio-editor-server-preview__timeline-card {
	min-width: 0;
	padding: 0.65rem;
	border: 1px solid #e2e4e7;
	border-radius: 5px;
}

.licinio-editor-server-preview__timeline-card time,
.licinio-editor-server-preview__timeline-card a {
	display: block;
}

.licinio-editor-server-preview__timeline-card time {
	margin-bottom: 0.35rem;
	color: #3858e9;
	font-size: 0.8rem;
}

.licinio-editor-server-preview__timeline-card a {
	color: #1d2327;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.licinio-editor-server-preview {
		padding: 0.75rem;
	}

	.licinio-editor-server-preview__timeline {
		grid-template-columns: 1fr;
	}
}

/* Gutenberg editor and inserter previews for dynamic blocks. */
.licinio-editor-preview {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 1rem;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #fff;
	color: #1e1e1e;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 14px;
	line-height: 1.4;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.licinio-editor-preview *,
.licinio-editor-preview *::before,
.licinio-editor-preview *::after {
	box-sizing: inherit;
}

.licinio-editor-preview__header,
.licinio-editor-preview__toolbar,
.licinio-editor-preview__category-controls {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.licinio-editor-preview__header {
	margin-bottom: 0.85rem;
	color: #1d2327;
}

.licinio-editor-preview__header .dashicons {
	color: #3858e9;
}

.licinio-editor-preview__status {
	margin-left: auto;
	color: #646970;
	font-size: 0.8rem;
}

.licinio-editor-preview__toolbar {
	justify-content: space-between;
	margin-bottom: 0.7rem;
	padding-bottom: 0.7rem;
	border-bottom: 1px solid #e2e4e7;
}

.licinio-editor-preview__nav,
.licinio-editor-preview__views {
	display: flex;
	gap: 0.25rem;
}

.licinio-editor-preview button,
.licinio-editor-preview select {
	min-height: 28px;
	padding: 0.25rem 0.55rem;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	background: #fff;
	color: #1d2327;
	font-size: 0.8rem;
}

.licinio-editor-preview button.is-active {
	border-color: #3858e9;
	background: #3858e9;
	color: #fff;
}

.licinio-editor-preview button:disabled,
.licinio-editor-preview select:disabled {
	opacity: 1;
	cursor: default;
}

.licinio-editor-preview__month {
	font-size: 1.15rem;
}

.licinio-editor-preview__calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	border-top: 1px solid #e2e4e7;
	border-left: 1px solid #e2e4e7;
}

.licinio-editor-preview__weekday,
.licinio-editor-preview__day {
	min-width: 0;
	padding: 0.35rem;
	border-right: 1px solid #e2e4e7;
	border-bottom: 1px solid #e2e4e7;
}

.licinio-editor-preview__weekday {
	background: #f6f7f7;
	color: #50575e;
	font-size: 0.75rem;
	font-weight: 600;
	text-align: center;
}

.licinio-editor-preview__day {
	min-height: 42px;
	color: #1d2327;
	font-size: 0.78rem;
}

.licinio-editor-preview__day .is-muted {
	color: #a7aaad;
}

.licinio-editor-preview__event-dot {
	display: block;
	margin-top: 0.2rem;
	overflow: hidden;
	padding: 0.12rem 0.25rem;
	border-radius: 2px;
	background: #3858e9;
	color: #fff;
	font-size: 0.68rem;
	line-height: 1.2;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.licinio-editor-preview__hint,
.licinio-editor-preview__meta {
	display: block;
	margin-top: 0.65rem;
	color: #646970;
	font-size: 0.78rem;
}

.licinio-editor-preview__list-heading {
	margin-bottom: 0.55rem;
	color: #50575e;
	font-size: 0.82rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.licinio-editor-preview__event-card {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: 0.5rem;
	padding: 0.65rem;
	border: 1px solid #e2e4e7;
	border-radius: 5px;
}

.licinio-editor-preview__event-date {
	flex: 0 0 3.5rem;
	color: #3858e9;
	font-size: 0.8rem;
	font-weight: 600;
}

.licinio-editor-preview__event-body {
	min-width: 0;
	flex: 1;
}

.licinio-editor-preview__event-body strong {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.licinio-editor-preview__badge {
	flex: 0 0 auto;
	padding: 0.2rem 0.35rem;
	border-radius: 3px;
	background: #f0f0f1;
	color: #50575e;
	font-size: 0.72rem;
}

.licinio-editor-preview__category-controls {
	margin-bottom: 0.75rem;
}

.licinio-editor-preview__category-controls select {
	min-width: 10rem;
	flex: 1;
}

.licinio-editor-preview--timeline .licinio-editor-preview__header {
	margin-bottom: 0.7rem;
}

.licinio-editor-preview__timeline-track {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.65rem;
	position: relative;
}

.licinio-editor-preview__timeline-track::before {
	content: "";
	position: absolute;
	top: 1.1rem;
	right: 7%;
	left: 7%;
	height: 2px;
	background: #c3c4c7;
}

.licinio-editor-preview__timeline-track .licinio-editor-preview__event-card {
	display: block;
	position: relative;
	z-index: 1;
	background: #fff;
}

.licinio-editor-preview__timeline-track .licinio-editor-preview__event-date {
	margin-bottom: 0.45rem;
}

@media (max-width: 600px) {
	.licinio-editor-preview {
		padding: 0.75rem;
	}

	.licinio-editor-preview__toolbar {
		flex-wrap: wrap;
	}

	.licinio-editor-preview__month {
		order: -1;
		width: 100%;
		text-align: center;
	}

	.licinio-editor-preview__category-controls,
	.licinio-editor-preview__timeline-track {
		grid-template-columns: 1fr;
		flex-wrap: wrap;
	}

	.licinio-editor-preview__timeline-track {
		display: grid;
	}

	.licinio-editor-preview__timeline-track::before {
		display: none;
	}
}

/* Category View block: controls row */
.licinio-category-view-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.licinio-category-view-select {
	flex: 1 1 240px;
	max-width: 22rem;
	padding: 0.45rem 0.6rem;
	font-size: 0.95rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
}

/* Calendar / List toggle buttons */
.licinio-category-view-toggle {
	display: flex;
	gap: 0;
}

.licinio-toggle-btn {
	padding: 0.45rem 0.8rem;
	font-size: 0.9rem;
	line-height: 1.25;
	border: 1px solid #ccc;
	background: #f0f0f0;
	color: #444;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.licinio-toggle-btn:first-child {
	border-radius: 4px 0 0 4px;
}

.licinio-toggle-btn:last-child {
	border-radius: 0 4px 4px 0;
}

.licinio-toggle-btn.active {
	background: #007cba;
	color: #fff;
	border-color: #007cba;
}

.licinio-toggle-btn:focus {
	outline: 2px solid #007cba;
	outline-offset: 1px;
}

/* Calendar/list containers */
.licinio-category-view-calendar {
	min-height: 400px;
}

.licinio-category-view-list {
	min-height: 200px;
}

/* Keep FullCalendar compact and prevent theme typography from enlarging it. */
.licinio-event-calendar-block,
.licinio-category-view-block {
		font-size: 1rem;
		line-height: 1.4;
		max-width: 100%;
		overflow: hidden;
}

.licinio-event-calendar-block.fc,
.licinio-category-view-block .fc {
		font-size: 0.875rem;
}

.licinio-event-calendar-block.fc .fc-toolbar,
.licinio-category-view-block .fc .fc-toolbar {
		align-items: center;
		gap: 0.5rem;
		margin-bottom: 0.75rem;
}

.licinio-event-calendar-block.fc .fc-toolbar-title,
.licinio-category-view-block .fc .fc-toolbar-title {
		font-size: clamp(1.25rem, 4vw, 1.75rem);
		line-height: 1.1;
}

.licinio-event-calendar-block.fc .fc-button,
.licinio-category-view-block .fc .fc-button {
		padding: 0.35rem 0.6rem;
		font-size: 0.875rem;
		line-height: 1.25;
}

.licinio-event-calendar-block.fc .fc-daygrid-day-number,
.licinio-category-view-block .fc .fc-daygrid-day-number {
		padding: 0.35rem;
}

@media (max-width: 600px) {
	.licinio-event-calendar-block.fc .fc-toolbar.fc-header-toolbar,
	.licinio-category-view-block .fc .fc-toolbar {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		grid-template-areas:
			"title title"
			"nav views";
		row-gap: 0.6rem;
	}

	.licinio-event-calendar-block.fc .fc-toolbar-chunk:nth-child(1),
	.licinio-category-view-block .fc .fc-toolbar-chunk:nth-child(1) {
		grid-area: nav;
		justify-self: start;
	}

	.licinio-event-calendar-block.fc .fc-toolbar-chunk:nth-child(2),
	.licinio-category-view-block .fc .fc-toolbar-chunk:nth-child(2) {
		grid-area: title;
		justify-self: center;
	}

	.licinio-event-calendar-block.fc .fc-toolbar-chunk:nth-child(3),
	.licinio-category-view-block .fc .fc-toolbar-chunk:nth-child(3) {
		grid-area: views;
		justify-self: end;
	}

	.licinio-event-calendar-block.fc .fc-toolbar-chunk,
	.licinio-category-view-block .fc .fc-toolbar-chunk {
		min-width: 0;
	}

	.licinio-event-calendar-block.fc .fc-button,
	.licinio-category-view-block .fc .fc-button {
		padding: 0.3rem 0.5rem;
		font-size: 0.8rem;
	}

	.licinio-category-view-controls {
		align-items: stretch;
	}

	.licinio-category-view-select {
		flex-basis: 100%;
		max-width: none;
	}

	.licinio-category-view-toggle {
		justify-content: flex-start;
	}
}

/* Event list item: fully-booked state */
.licinio-events-list-item.fully-booked {
	border-left: 3px solid #d63638;
}

.licinio-events-list-item-badge.fully-booked {
	display: inline-block;
	margin-top: 0.3em;
	padding: 0.15em 0.5em;
	background: #d63638;
	color: #fff;
	font-size: 0.75em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-radius: 3px;
}

/* Fully-booked calendar events – red left border */
.licinio-fc-event-fully-booked {
	border-left: 4px solid #d63638 !important;
}
