.niwa-scheduler-form {
	--niwa-scheduler-gap: var(--niwa-space-xl, 32px);
}

.niwa-scheduler-form > .niwa-card {
	margin-bottom: var(--niwa-scheduler-gap);
}

.niwa-scheduler-form > .niwa-card > .niwa-card__body {
	padding: clamp(24px, 3vw, 36px);
}

.niwa-scheduler-status-card .niwa-card__body {
	display: flex;
	align-items: center;
	gap: var(--niwa-space-md, 16px);
}

.niwa-scheduler-usage-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.niwa-scheduler-usage-option {
	display: grid;
	align-content: start;
	gap: 7px;
	min-width: 0;
	padding: 18px;
	border: 1px solid var(--niwa-edge-2, #dcdcde);
	border-radius: var(--niwa-radius-md, 12px);
	background: var(--niwa-tile, #fff);
}

.niwa-scheduler-usage-option > strong {
	color: var(--niwa-ink, #1d2327);
	font-size: 13px;
}

.niwa-scheduler-usage-option > span {
	min-height: 38px;
	color: var(--niwa-ink-4, #646970);
	font-size: 12px;
	line-height: 1.5;
}

.niwa-scheduler-usage-code {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	margin-top: 5px;
}

.niwa-scheduler-usage-code code {
	min-width: 0;
	flex: 1 1 auto;
	padding: 8px 10px;
	overflow: hidden;
	border-radius: var(--niwa-radius-sm, 8px);
	background: var(--niwa-panel, #f6f7f7);
	color: var(--niwa-ink-2, #2c3338);
	font-size: 11px;
	line-height: 1.4;
	overflow-wrap: anywhere;
	white-space: normal;
	user-select: all;
}

.niwa-scheduler-copy-usage.button {
	flex: 0 0 auto;
	min-height: 32px;
	border-color: var(--niwa-edge, #c3c4c7);
	border-radius: var(--niwa-radius-sm, 8px);
	background: var(--niwa-tile, #fff);
	color: var(--niwa-ink-2, #2c3338);
	cursor: pointer;
}

.niwa-scheduler-copy-usage.button:hover,
.niwa-scheduler-copy-usage.button:focus-visible {
	border-color: var(--niwa-ink-4, #646970);
	color: var(--niwa-ink, #1d2327);
}

.niwa-calendar-admin-card > .niwa-card__body {
	padding: clamp(24px, 3vw, 36px);
}

.niwa-calendar-admin-card {
	margin-bottom: var(--niwa-space-xl, 32px);
}

.niwa-calendar-provider-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.niwa-calendar-provider {
	display: grid;
	align-content: start;
	gap: 12px;
	min-height: 132px;
	padding: 20px;
	border: 1px solid var(--niwa-edge-2, #dcdcde);
	border-radius: var(--niwa-radius-md, 12px);
	background: var(--niwa-tile, #fff);
}

.niwa-calendar-provider.is-unavailable {
	background: var(--niwa-panel, #f6f7f7);
}

.niwa-calendar-provider__actions,
.niwa-calendar-member-controls {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.niwa-calendar-member-controls {
	margin-top: 10px;
}

.niwa-calendar-member-controls .niwa-field__hint {
	flex-basis: 100%;
	margin: 0;
}

.niwa-calendar-member-controls .button .dashicons {
	width: 17px;
	height: 17px;
	margin-right: 5px;
	font-size: 17px;
	line-height: 1;
}

.niwa-calendar-connection-status {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 6px;
	color: #166534;
	font-size: 12px;
	font-weight: 600;
}

.niwa-calendar-connection-status .dashicons {
	width: 16px;
	height: 16px;
	font-size: 16px;
}

.niwa-calendar-disconnect {
	color: var(--niwa-danger, #b32d2e);
	font-size: 12px;
}

.niwa-scheduler-status-card__icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	flex: 0 0 44px;
	border-radius: var(--niwa-radius-md, 12px);
	background: var(--niwa-tint, #f7f7f8);
	color: var(--niwa-ink-2, #2c3338);
}

.niwa-scheduler-status-card__icon svg {
	width: 22px;
	height: 22px;
}

.niwa-scheduler-status-card__copy {
	display: grid;
	gap: 4px;
}

.niwa-scheduler-status-card__copy .niwa-field__hint,
.niwa-scheduler-intro .niwa-field__hint {
	margin: 3px 0 0;
}

.niwa-scheduler-intro {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: var(--niwa-space-md, 16px);
	padding: 20px 28px;
}

.niwa-scheduler-intro p {
	max-width: 800px;
}

.niwa-scheduler-repeatables {
	display: grid;
	gap: 30px;
}

.niwa-scheduler-repeatable {
	border: 1px solid var(--niwa-edge-2, #dcdcde);
	border-radius: var(--niwa-radius-lg, 16px);
	background: var(--niwa-tile, #fff);
	overflow: hidden;
	box-shadow: 0 1px 2px rgb(0 0 0 / 0.025);
}

.niwa-scheduler-repeatable__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--niwa-space-md, 16px);
	padding: 18px 24px;
	background: var(--niwa-panel, #f6f7f7);
	border-bottom: 1px solid var(--niwa-edge-2, #dcdcde);
}

.niwa-scheduler-repeatable__title {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.niwa-scheduler-repeatable__number {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	border: 1px solid var(--niwa-edge, #c3c4c7);
	border-radius: 50%;
	background: var(--niwa-tile, #fff);
	color: var(--niwa-ink-2, #2c3338);
	font-size: 12px;
	font-weight: 700;
}

.niwa-scheduler-repeatable__title strong,
.niwa-scheduler-repeatable__title span:not(.niwa-scheduler-repeatable__number) {
	display: block;
}

.niwa-scheduler-repeatable__title strong {
	font-size: 14px;
	line-height: 1.35;
	color: var(--niwa-ink, #1d2327);
}

.niwa-scheduler-repeatable__title span:not(.niwa-scheduler-repeatable__number) {
	margin-top: 2px;
	font-size: 12px;
	line-height: 1.35;
	color: var(--niwa-ink-4, #646970);
}

.niwa-scheduler-repeatable__header .niwa-btn--danger {
	flex: 0 0 auto;
	padding: 5px 14px;
	font-size: 12px;
}

.niwa-scheduler-repeatable__body {
	display: grid;
	gap: 30px;
	padding: clamp(24px, 3vw, 32px);
}

.niwa-scheduler-subsection + .niwa-scheduler-subsection {
	padding-top: 30px;
	border-top: 1px solid var(--niwa-edge-2, #dcdcde);
}

.niwa-scheduler-subsection__heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}

.niwa-scheduler-subsection__heading h3 {
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
	color: var(--niwa-ink, #1d2327);
}

.niwa-scheduler-subsection__heading p {
	margin: 3px 0 0;
	font-size: 12px;
	line-height: 1.45;
	color: var(--niwa-ink-4, #646970);
}

.niwa-scheduler-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
}

.niwa-scheduler-grid--service {
	grid-template-columns: minmax(280px, 1.5fr) minmax(180px, .5fr);
}

.niwa-scheduler-grid .niwa-field {
	margin: 0;
}

.niwa-scheduler-service .niwa-scheduler-subsection > .niwa-scheduler-grid {
	margin-bottom: 24px;
}

.niwa-scheduler-form input.niwa-input--wide,
.niwa-scheduler-form textarea.niwa-input--wide {
	width: 100%;
	max-width: none;
}

.niwa-scheduler-form input[type="time"],
.niwa-scheduler-form input[type="date"] {
	min-height: 38px;
	margin: 0;
	padding: 7px 10px;
	border: 1px solid var(--niwa-edge, #c3c4c7);
	border-radius: var(--niwa-radius-sm, 8px);
	background: var(--niwa-tile, #fff);
	color: var(--niwa-ink, #1d2327);
	font-size: 13px;
	line-height: 1.5;
	box-shadow: none;
	transition: border-color var(--niwa-transition, .15s ease), box-shadow var(--niwa-transition, .15s ease);
}

.niwa-scheduler-form input[type="time"]:focus,
.niwa-scheduler-form input[type="date"]:focus {
	border-color: var(--niwa-ink-4, #646970);
	box-shadow: var(--niwa-shadow-ring, 0 0 0 1px #646970);
	outline: none;
}

.niwa-scheduler-form input:disabled {
	cursor: not-allowed;
	background: var(--niwa-panel, #f6f7f7);
	color: var(--niwa-ink-5, #8c8f94);
}

.niwa-scheduler-icon-button.button {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	min-height: 28px;
	padding: 0;
	border: 1px solid color-mix(in srgb, var(--niwa-danger, #b32d2e) 30%, transparent);
	border-radius: 50%;
	background: color-mix(in srgb, var(--niwa-danger, #b32d2e) 7%, var(--niwa-tile, #fff));
	color: var(--niwa-danger, #b32d2e);
	font-size: 17px;
	line-height: 1;
	text-decoration: none;
	box-shadow: none;
}

.niwa-scheduler-icon-button.button:hover,
.niwa-scheduler-icon-button.button:focus {
	border-color: var(--niwa-danger, #b32d2e);
	background: var(--niwa-danger, #b32d2e);
	color: #fff;
}

.niwa-scheduler-add-break.button.niwa-btn,
.niwa-scheduler-add-local.button.niwa-btn {
	display: inline-flex;
	align-items: center;
	margin-top: 10px;
	min-height: 32px;
	padding: 5px 12px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
}

.niwa-scheduler-member-list,
.niwa-service-member-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.niwa-scheduler-check {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 7px 11px;
	border: 1px solid var(--niwa-edge-2, #dcdcde);
	border-radius: var(--niwa-radius-sm, 8px);
	background: var(--niwa-tile, #fff);
	color: var(--niwa-ink-2, #2c3338);
}

.niwa-scheduler-empty-inline {
	color: var(--niwa-ink-4, #646970);
	font-style: italic;
}

.niwa-scheduler-add-row {
	display: inline-flex;
	align-items: center;
	margin-top: 36px;
}

.niwa-scheduler-member-exclusions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.niwa-scheduler-exclusion-panel {
	padding: 20px;
	border: 1px solid var(--niwa-edge-2, #dcdcde);
	border-radius: var(--niwa-radius-md, 12px);
	background: var(--niwa-panel, #f6f7f7);
}

.niwa-member-excluded-dates,
.niwa-member-excluded-ranges {
	display: grid;
	gap: 10px;
	margin: 14px 0 6px;
}

.niwa-member-excluded-date,
.niwa-member-excluded-range {
	display: flex;
	align-items: center;
	gap: 9px;
}

.niwa-member-excluded-date input[type="date"] {
	width: min(220px, 100%);
}

.niwa-member-excluded-range input[type="date"] {
	width: 148px;
}

.niwa-member-excluded-range input[type="text"] {
	min-width: 130px;
	flex: 1;
}

.niwa-scheduler-form #niwa-scheduler-buffer {
	min-width: 220px;
}

.niwa-scheduler-table-wrap {
	overflow-x: auto;
}

.niwa-schedule-cell {
	min-width: 142px;
}

.niwa-schedule-time {
	display: block;
	font-weight: 600;
	color: var(--niwa-ink, #1d2327);
}

.niwa-schedule-meta {
	display: block;
	font-size: 11px;
	color: var(--niwa-ink-4, #646970);
	margin-top: 2px;
}

.niwa-contact-details-trigger.has-details::before {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	margin: 0 6px 1px 0;
	border-radius: 50%;
	background: #238636;
}

.niwa-calendar-card .niwa-card__header {
	justify-content: space-between;
}

.niwa-calendar-heading {
	display: flex;
	align-items: center;
	gap: 10px;
}

.niwa-calendar-nav {
	display: flex;
	align-items: center;
	gap: 6px;
}

.niwa-calendar {
	border-top: 1px solid var(--niwa-edge-2, #dcdcde);
	border-left: 1px solid var(--niwa-edge-2, #dcdcde);
	min-width: 780px;
}

.niwa-calendar__weekdays,
.niwa-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}

.niwa-calendar__weekday {
	padding: 8px 10px;
	border-right: 1px solid var(--niwa-edge-2, #dcdcde);
	border-bottom: 1px solid var(--niwa-edge-2, #dcdcde);
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--niwa-ink-4, #646970);
	background: #f7f7f8;
}

.niwa-calendar__day {
	min-height: 128px;
	padding: 8px;
	border-right: 1px solid var(--niwa-edge-2, #dcdcde);
	border-bottom: 1px solid var(--niwa-edge-2, #dcdcde);
	background: #fff;
}

.niwa-calendar__day.is-outside {
	background: #fafafa;
	color: #a7aaad;
}

.niwa-calendar__day.is-today .niwa-calendar__date {
	display: inline-grid;
	place-items: center;
	width: 25px;
	height: 25px;
	margin: -3px 0 3px -3px;
	border-radius: 50%;
	background: #1d2327;
	color: #fff;
}

.niwa-calendar__date {
	display: block;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 6px;
}

.niwa-calendar__events {
	display: grid;
	gap: 4px;
}

.niwa-calendar-event {
	display: block;
	padding: 5px 6px;
	border-left: 3px solid #7069f0;
	border-radius: 4px;
	background: #f0efff;
	color: #2f2b69;
	font-size: 11px;
	line-height: 1.35;
	overflow: hidden;
}

.niwa-calendar-event__time {
	font-weight: 700;
}

.niwa-calendar-event__meta {
	display: block;
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}

.niwa-modal-open {
	overflow: hidden;
}

.niwa-contact-details-modal[hidden] {
	display: none;
}

.niwa-contact-details-modal {
	position: fixed;
	inset: 0;
	z-index: 100100;
	display: grid;
	place-items: center;
	padding: 20px;
}

.niwa-contact-details-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(29, 35, 39, .55);
}

.niwa-contact-details-modal__dialog {
	position: relative;
	width: min(680px, 100%);
	max-height: calc(100vh - 40px);
	overflow: auto;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .24);
}

.niwa-contact-details-modal__header,
.niwa-contact-details-modal__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
}

.niwa-contact-details-modal__header {
	border-bottom: 1px solid #dcdcde;
}

.niwa-contact-details-modal__header h2 {
	margin: 0;
	font-size: 18px;
}

.niwa-contact-details-modal__body {
	padding: 20px;
}

.niwa-contact-details-modal textarea {
	width: 100%;
	min-height: 240px;
	resize: vertical;
}

.niwa-contact-details-modal__footer {
	justify-content: flex-end;
	border-top: 1px solid #dcdcde;
}

.niwa-details-status {
	margin-right: auto;
	color: #238636;
}

.niwa-details-status.is-error {
	color: #b32d2e;
}

@media (max-width: 1100px) {
	.niwa-scheduler-grid--service,
	.niwa-scheduler-member-exclusions {
		grid-template-columns: 1fr;
	}

	.niwa-member-excluded-range input[type="date"] {
		width: min(190px, 100%);
	}
}

@media (max-width: 900px) {
	.niwa-calendar-card .niwa-card__header {
		align-items: stretch;
		flex-direction: column;
	}
}

@media (max-width: 782px) {
	.niwa-scheduler-form {
		--niwa-scheduler-gap: 24px;
	}

	.niwa-scheduler-form > .niwa-card > .niwa-card__body,
	.niwa-scheduler-repeatable__body {
		padding: 20px;
	}

	.niwa-scheduler-intro {
		align-items: flex-start;
		padding: 18px 20px;
	}

	.niwa-scheduler-repeatable__header {
		align-items: flex-start;
		padding: 16px 18px;
	}

	.niwa-scheduler-repeatable__title span:not(.niwa-scheduler-repeatable__number) {
		display: none;
	}

	.niwa-scheduler-repeatable__header .niwa-btn--danger {
		padding: 5px 11px;
	}

	.niwa-scheduler-grid,
	.niwa-scheduler-grid--service,
	.niwa-calendar-provider-grid {
		grid-template-columns: 1fr;
	}

	.niwa-scheduler-subsection + .niwa-scheduler-subsection {
		padding-top: 24px;
	}

	.niwa-member-excluded-range {
		align-items: stretch;
		flex-direction: column;
	}

	.niwa-member-excluded-range > span {
		display: none;
	}

	.niwa-member-excluded-range input[type="date"],
	.niwa-member-excluded-range input[type="text"],
	.niwa-member-excluded-date input[type="date"] {
		width: 100%;
		min-width: 0;
	}

	.niwa-member-excluded-range .niwa-scheduler-remove-local {
		align-self: flex-end;
	}

	.niwa-calendar__day {
		min-height: 105px;
	}
}

@media (max-width: 520px) {
	.niwa-scheduler-status-card .niwa-card__body {
		align-items: flex-start;
	}

	.niwa-scheduler-status-card__icon {
		display: none;
	}

	.niwa-scheduler-repeatable__header {
		flex-direction: column;
	}

	.niwa-scheduler-repeatable__header .niwa-btn--danger {
		align-self: flex-end;
	}

	.niwa-scheduler-exclusion-panel {
		padding: 16px;
	}
}

/* Screenshot-matched weekly availability rows. */
.niwa-scheduler-week {
	display: block;
	width: 100%;
	max-width: 480px;
	border: 1px solid var(--niwa-edge-2, #dcdcde);
	border-radius: 12px;
	background: var(--niwa-tile, #fff);
	overflow: visible;
}

.niwa-scheduler-day {
	display: grid;
	grid-template-columns: 68px minmax(170px, 220px) 62px;
	gap: 8px;
	align-items: center;
	padding: 8px 10px;
	border: 0;
	border-bottom: 1px solid var(--niwa-edge-2, #ececef);
	border-radius: 0;
	background: var(--niwa-tile, #fff);
}

.niwa-scheduler-day:last-child {
	border-bottom: 0;
}

.niwa-scheduler-day:hover {
	border-color: var(--niwa-edge-2, #ececef);
	background: var(--niwa-panel, #fafafa);
}

.niwa-scheduler-day.is-disabled {
	background: var(--niwa-panel, #fafafa);
}

.niwa-scheduler-day.is-copy-highlight {
	background: #f0f7ff;
}

.niwa-scheduler-day__control .niwa-toggle {
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 6px;
	align-items: center;
	min-height: 32px;
}

.niwa-scheduler-day__control .niwa-toggle input[type="checkbox"] {
	width: 28px;
	height: 16px;
	min-width: 28px;
	min-height: 16px;
	max-height: 16px;
	border-radius: 9px;
}

.niwa-scheduler-day__control .niwa-toggle input[type="checkbox"]::before {
	top: 2px;
	left: 2px;
	width: 12px;
	height: 12px;
}

.niwa-scheduler-day__control .niwa-toggle input[type="checkbox"]:checked::before {
	transform: translateX(12px);
}

.niwa-scheduler-day__control .niwa-toggle strong {
	font-size: 11px;
	font-weight: 500;
	color: var(--niwa-ink-4, #646970);
}

.niwa-scheduler-day__hours {
	justify-content: flex-start;
	gap: 6px;
}

.niwa-scheduler-day__hours > span,
.niwa-scheduler-break > span:not(.screen-reader-text) {
	color: var(--niwa-ink, #1d2327);
	font-weight: 700;
}

.niwa-scheduler-day__hours input[type="time"],
.niwa-scheduler-break input[type="time"] {
	box-sizing: border-box;
	width: 82px;
	height: 32px;
	min-height: 32px;
	padding: 3px 5px;
	border: 1px solid var(--niwa-edge-2, #dcdcde);
	border-radius: 8px;
	background: var(--niwa-tile, #fff);
	font-size: 11px;
	box-shadow: none;
}

.niwa-scheduler-day__hours input[type="time"]::-webkit-calendar-picker-indicator,
.niwa-scheduler-break input[type="time"]::-webkit-calendar-picker-indicator {
	display: none;
}

.niwa-scheduler-day__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 4px;
}

.niwa-schedule-row-action.button,
a.niwa-schedule-row-action.button {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	min-height: 28px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--niwa-ink-3, #50575e);
	box-shadow: none;
}

.niwa-schedule-row-action.button:hover,
.niwa-schedule-row-action.button:focus {
	background: var(--niwa-edge-1, #f0f0f1);
	color: var(--niwa-ink, #1d2327);
}

.niwa-schedule-row-action .dashicons {
	width: 15px;
	height: 15px;
	font-size: 15px;
}

.niwa-scheduler-day__break-column {
	grid-column: 2 / 4;
	display: grid;
	grid-template-columns: 48px 1fr;
	gap: 8px;
	align-items: start;
	padding: 2px 0 4px;
}

.niwa-scheduler-day__break-column:not(:has(.niwa-scheduler-break:not([hidden]))) {
	display: none;
}

.niwa-scheduler-day__break-column .niwa-scheduler-day__column-label {
	margin: 9px 0 0;
}

.niwa-scheduler-breaks {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
}

.niwa-scheduler-break {
	gap: 7px;
}

/* Calendar view inspired by the supplied weekly reference. */
.niwa-calendar-card {
	overflow: hidden;
}

.niwa-calendar-card > .niwa-card__header {
	gap: 20px;
	padding: 18px 22px;
}

.niwa-calendar-heading > div:last-child {
	display: grid;
	gap: 2px;
}

.niwa-calendar-heading .niwa-field__hint {
	margin: 0;
}

.niwa-calendar-toolbar,
.niwa-calendar-nav {
	display: flex;
	align-items: center;
}

.niwa-calendar-toolbar {
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 12px;
}

.niwa-calendar-nav {
	gap: 7px;
}

.niwa-calendar-nav strong {
	min-width: 150px;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	color: var(--niwa-ink-2, #2c3338);
}

.niwa-calendar-view-switch,
.niwa-calendar-time-switch {
	display: inline-flex;
	align-items: center;
	padding: 3px;
	border-radius: 9px;
	background: var(--niwa-edge-1, #f0f0f1);
}

.niwa-calendar-view-switch a,
.niwa-calendar-time-switch button {
	min-height: 28px;
	padding: 5px 10px;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: var(--niwa-ink-4, #777);
	font-size: 11px;
	font-weight: 600;
	line-height: 18px;
	text-decoration: none;
	cursor: pointer;
}

.niwa-calendar-view-switch a.is-active,
.niwa-calendar-time-switch button.is-active {
	background: #fff;
	color: var(--niwa-ink, #1d2327);
	box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
}

.niwa-calendar-card > .niwa-card__body {
	padding: 0;
}

.niwa-week-calendar {
	min-width: 820px;
	background: #fff;
}

.niwa-week-calendar__grid {
	display: grid;
	grid-template-columns: 58px repeat(7, minmax(108px, 1fr));
}

.niwa-week-calendar__time-axis {
	position: relative;
	min-width: 0;
	border-right: 1px solid var(--niwa-edge-2, #e5e5e7);
	background: #fff;
}

.niwa-week-calendar__time-corner {
	box-sizing: border-box;
	height: 48px;
	border-bottom: 1px solid var(--niwa-edge-2, #e5e5e7);
}

.niwa-week-calendar__time-scale {
	position: relative;
	height: var(--niwa-week-height, 480px);
	min-height: 288px;
}

.niwa-week-calendar__time-label {
	position: absolute;
	top: var(--niwa-time-top, 0);
	right: 8px;
	transform: translateY(-50%);
	color: var(--niwa-ink-4, #73777b);
	font-size: 10px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
}

.niwa-week-calendar__time-label:first-child {
	transform: translateY(0);
}

.niwa-week-calendar__time-label:last-child {
	transform: translateY(-100%);
}

.niwa-week-calendar__day {
	min-width: 0;
	border-right: 1px solid var(--niwa-edge-2, #e5e5e7);
}

.niwa-week-calendar__day:last-child {
	border-right: 0;
}

.niwa-week-calendar__day > header {
	display: flex;
	box-sizing: border-box;
	align-items: baseline;
	justify-content: center;
	gap: 5px;
	height: 48px;
	padding: 14px 8px;
	border-bottom: 1px solid var(--niwa-edge-2, #e5e5e7);
	color: var(--niwa-ink-4, #73777b);
	font-size: 12px;
	font-weight: 500;
}

.niwa-week-calendar__day > header strong {
	font-size: 12px;
	font-weight: 600;
}

.niwa-week-calendar__day.is-today > header {
	color: var(--niwa-ink, #1d2327);
	background: #f8fbff;
}

.niwa-week-calendar__events {
	position: relative;
	display: block;
	height: var(--niwa-week-height, 480px);
	min-height: 288px;
	background:
		repeating-linear-gradient(
			to bottom,
			transparent 0,
			transparent calc(var(--niwa-hour-size, 48px) - 1px),
			var(--niwa-edge-2, #e5e5e7) calc(var(--niwa-hour-size, 48px) - 1px),
			var(--niwa-edge-2, #e5e5e7) var(--niwa-hour-size, 48px)
		);
}

.niwa-calendar-event {
	display: grid;
	box-sizing: border-box;
	gap: 3px;
	padding: 9px;
	border: 0;
	border-radius: 7px;
	background: #eee7ff;
	color: #5945b7;
	font-size: 11px;
	line-height: 1.3;
	overflow: hidden;
}

.niwa-calendar-event.is-color-2 {
	background: #f8dddd;
	color: #c65c59;
}

.niwa-calendar-event.is-color-3 {
	background: #dcecff;
	color: #3278b8;
}

.niwa-calendar-event.is-color-4 {
	background: #f0f1f3;
	color: #555d66;
}

.niwa-calendar-event__name {
	color: var(--niwa-ink-2, #33383d);
	font-size: 11px;
	font-weight: 600;
}

.niwa-calendar-event__time {
	font-size: 10px;
	font-weight: 600;
}

.niwa-calendar-event__meta {
	display: block;
	color: inherit;
	font-size: 10px;
	opacity: .82;
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
}

.niwa-week-calendar__events .niwa-calendar-event.is-week-layout {
	position: absolute;
	top: var(--niwa-event-top, 0);
	left: calc(var(--niwa-event-left, 0%) + 4px);
	width: calc(var(--niwa-event-width, 100%) - 8px);
	height: var(--niwa-event-height, 30px);
	min-height: 30px;
	padding: 6px;
	overflow: hidden;
}

.niwa-calendar {
	border-top: 0;
}

@media (max-width: 1050px) {
	.niwa-scheduler-usage-grid {
		grid-template-columns: 1fr;
	}

	.niwa-scheduler-usage-option > span {
		min-height: 0;
	}

	.niwa-calendar-card > .niwa-card__header {
		align-items: stretch;
		flex-direction: column;
	}

	.niwa-calendar-toolbar {
		justify-content: space-between;
	}
}

@media (max-width: 700px) {
	.niwa-scheduler-day {
		grid-template-columns: 62px minmax(0, 1fr) 58px;
		gap: 6px;
		padding: 8px;
	}

	.niwa-scheduler-day__hours input[type="time"] {
		width: calc(50% - 10px);
		min-width: 0;
	}

	.niwa-scheduler-day__break-column {
		grid-column: 1 / -1;
	}

	.niwa-calendar-toolbar {
		align-items: stretch;
		flex-direction: column;
	}

	.niwa-calendar-nav {
		justify-content: space-between;
	}
}

@media (max-width: 420px) {
	.niwa-scheduler-day {
		grid-template-columns: 58px minmax(0, 1fr);
	}

	.niwa-scheduler-day__actions {
		grid-column: 2;
		justify-content: flex-end;
	}

	.niwa-scheduler-day__break-column {
		grid-column: 1 / -1;
	}
}
