/*
 * KS Klinik - front end styles for the booking button and modal.
 *
 * Colours are exposed as custom properties so the theme can override them without
 * touching this file.
 */

.ksk-booking {
	--ksk-accent: #3f6f63;
	--ksk-accent-hover: #2f574d;
	--ksk-on-accent: #ffffff;
	--ksk-radius: 8px;

	display: inline-block;
}

.ksk-booking-trigger--button {
	display: inline-block;
	padding: 0.85em 1.7em;
	border: 1px solid var(--ksk-accent);
	border-radius: var(--ksk-radius);
	background: var(--ksk-accent);
	color: var(--ksk-on-accent);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ksk-booking-trigger--button:hover,
.ksk-booking-trigger--button:focus {
	background: var(--ksk-accent-hover);
	border-color: var(--ksk-accent-hover);
	color: var(--ksk-on-accent);
}

.ksk-booking-trigger--link {
	color: var(--ksk-accent);
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ksk-booking-trigger:focus-visible {
	outline: 3px solid var(--ksk-accent);
	outline-offset: 2px;
}

.ksk-notice {
	padding: 0.75em 1em;
	border-left: 4px solid #b8860b;
	background: #fdf6e3;
	color: #5a4300;
}

/* Modal */

body.ksk-modal-open {
	overflow: hidden;
}

.ksk-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba( 18, 26, 24, 0.55 );
	overflow-y: auto;
}

.ksk-modal {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 760px;
	border-radius: 12px;
	background: #ffffff;
	box-shadow: 0 18px 48px rgba( 0, 0, 0, 0.22 );
	overflow: hidden;
}

.ksk-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 18px;
	border-bottom: 1px solid #e6e9e8;
}

.ksk-modal__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.3;
}

.ksk-modal__close {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 50%;
	background: transparent;
	color: #3a4442;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.ksk-modal__close:hover,
.ksk-modal__close:focus {
	border-color: #d5dbd9;
	background: #f2f5f4;
}

.ksk-modal__frame {
	display: block;
	width: 100%;
	border: 0;
	background: #ffffff;
}

.ksk-modal__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 18px;
	border-top: 1px solid #e6e9e8;
	background: #f7f9f8;
	font-size: 0.875rem;
}

.ksk-modal__note {
	color: #55605d;
}

.ksk-modal__newtab {
	flex: 0 0 auto;
	color: #3f6f63;
	font-weight: 500;
	white-space: nowrap;
}

@media ( max-width: 600px ) {
	.ksk-modal-overlay {
		padding: 12px;
	}

	.ksk-modal__footer {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
}
