/*
 * RedKirin Calendar Flex for Google Calendar – core styles.
 *
 * Always loaded. Contains only what the calendar needs to function
 * (modal layout, accessibility helpers, hidden states). Visual design lives
 * in rk-calendar.css, which can be disabled per calendar.
 */

.rk-calendar [hidden] {
	display: none !important;
}

.rk-calendar__sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.rk-calendar--loading .rk-calendar__view {
	opacity: 0.6;
	pointer-events: none;
}

/* Modal: positioning only. Colors/typography come from the base CSS or the theme. */
.rk-calendar__modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

.rk-calendar__modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.rk-calendar__modal-dialog {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow: auto;
	background: #fff;
	color: #222;
	box-sizing: border-box;
	-webkit-overflow-scrolling: touch;
}

.rk-calendar__modal-dialog:focus {
	outline: none;
}

.rk-calendar-modal-open,
.rk-calendar-modal-open body {
	overflow: hidden;
}

.rk-calendar__modal-back,
.rk-calendar__modal-close {
	cursor: pointer;
}

@media (prefers-reduced-motion: no-preference) {
	.rk-calendar__view {
		transition: opacity 0.15s ease;
	}
}
