/**
 * Contact drawer — slide-in panel from the right.
 */

.cmc-contact-drawer__overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9998;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.3s ease,
		visibility 0.3s ease;
}

.cmc-contact-drawer__overlay--open {
	opacity: 1;
	visibility: visible;
}

.admin-bar .cmc-contact-drawer__overlay {
	top: 32px;
}

.cmc-contact-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: 500px;
	z-index: 9999;
	background: var(--wp--preset--color--white, #fff);
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
	transform: translateX(100%);
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.admin-bar .cmc-contact-drawer {
	top: 32px;
}

.cmc-contact-drawer--open {
	transform: translateX(0);
}

.cmc-contact-drawer__toolbar {
	display: flex;
	justify-content: flex-end;
	padding: 0.5rem 1rem 0;
	flex-shrink: 0;
}

.cmc-contact-drawer__header {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-shrink: 0;
	padding: 0 1.5rem 1rem;
}

.cmc-contact-drawer__photo {
	width: 70px;
	height: 70px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.cmc-contact-drawer__header-text {
	flex: 1;
	min-width: 0;
}

.cmc-contact-drawer__title {
	font-family: var(--wp--preset--font-family--body, serif);
	font-size: 1.875rem;
	font-weight: 700;
	color: var(--wp--preset--color--primary, #233c61);
	margin: 0;
}

.cmc-contact-drawer__close {
	background: none;
	border: none;
	cursor: pointer;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: var(--wp--preset--color--primary, #233c61);
	font-size: 2rem;
	line-height: 1;
	transition: background-color 0.2s ease;
}

.cmc-contact-drawer__close:hover {
	background-color: var(--wp--preset--color--soft-blue, #e8edf5);
}

.cmc-contact-drawer__body {
	flex: 1;
	overflow-y: auto;
	padding: 1.5rem;
}

.cmc-contact-drawer__subtitle {
	color: var(--wp--preset--color--dark-grey, #666);
	font-size: 0.95rem;
	margin: 0.25rem 0 0;
}

/* Adjust GF form styling inside the drawer */
.cmc-contact-drawer__body .gform_wrapper {
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

/* Mobile: full-width drawer */
@media (max-width: 600px) {
	.cmc-contact-drawer {
		width: 100%;
	}
}
