/**
 * Frontend styles for the calendar.
 *
 * @package KCALENDAR
 */

.kc-calendar {
	position: relative;
	min-height: 300px;
}

.kc-calendar.kc-loading {
	opacity: 0.65;
	pointer-events: none;
}

.kc-calendar .fc .fc-event {
	cursor: default;
}

.kc-calendar .fc .fc-daygrid-day,
.kc-calendar .fc .fc-timegrid-slot {
	cursor: default;
}

/* Private events are highlighted with a marker. */
.kc-calendar .fc .kc-event-private .fc-event-main {
	background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.18) 0 6px, transparent 6px 12px);
}

.kc-legend {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
	margin-top: 12px;
	font-size: 13px;
}

.kc-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.kc-legend-item::before {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 3px;
	background: #3788d8;
}

.kc-legend-item.kc-legend-private::before {
	background: #b0601f;
	background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.25) 0 4px, transparent 4px 8px);
}

/* Modal dialog */
.kc-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.45);
	font-family: inherit;
}

.kc-modal-box {
	background: #fff;
	color: #1e1e1e;
	border-radius: 8px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
	width: min(480px, 92vw);
	max-height: 90vh;
	overflow: auto;
	padding: 22px;
	box-sizing: border-box;
}

.kc-modal-title {
	margin: 0 0 16px;
	font-size: 18px;
	line-height: 1.3;
}

.kc-field {
	display: block;
	margin: 10px 0;
	font-size: 13px;
	font-weight: 600;
}

.kc-field input[type='text'],
.kc-field input[type='date'],
.kc-field input[type='datetime-local'],
.kc-field select,
.kc-field textarea {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 7px 9px;
	border: 1px solid #b9b9b9;
	border-radius: 4px;
	font: inherit;
	box-sizing: border-box;
}

.kc-field.kc-inline {
	font-weight: normal;
}

.kc-field.kc-inline input {
	vertical-align: middle;
}

.kc-modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 18px;
}

.kc-btn {
	padding: 8px 16px;
	border: 1px solid #b9b9b9;
	border-radius: 4px;
	background: #f6f7f7;
	color: #1e1e1e;
	cursor: pointer;
	font: inherit;
}

.kc-btn-primary {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.kc-btn-primary:hover {
	background: #135e96;
}