/* ==========================================================================
   CIXIZOC — Header customer service panel
   ========================================================================== */

body.cz-support-open {
	overflow: hidden;
}

.cz-support {
	position: fixed;
	inset: 0;
	z-index: 10000;
}

.cz-support__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(26, 26, 26, 0.42);
}

.cz-support__panel {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	width: min(100%, 24rem);
	height: 100%;
	background: #fdf5f6;
	border-left: 1px solid rgba(209, 123, 143, 0.15);
	box-shadow: -12px 0 40px rgba(209, 123, 143, 0.1);
}

.cz-support__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1rem 1rem 0.85rem;
	border-bottom: 1px solid #e8e6e2;
}

.cz-support__head-copy {
	min-width: 0;
}

.cz-support__full-link {
	display: inline-block;
	margin-top: 0.25rem;
	font-size: 0.72rem;
	font-weight: 400;
	color: #6b6b6b;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.cz-support__full-link:hover {
	color: #1a1a1a;
}

.cz-support__title {
	margin: 0;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: 1.35rem;
	font-weight: 500;
	color: #1a1a1a;
}

.cz-support__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: #1a1a1a;
	cursor: pointer;
}

.cz-support__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 0;
	padding: 1rem;
}

.cz-support__thread {
	flex: 1;
	min-height: 6rem;
	max-height: 14rem;
	margin-bottom: 1rem;
	padding: 0.35rem 0.15rem 0.35rem 0;
	overflow-y: auto;
}

.cz-chat-msg {
	display: flex;
	align-items: flex-end;
	gap: 0.55rem;
	max-width: 88%;
	margin-bottom: 0.85rem;
}

.cz-chat-msg--brand {
	margin-right: auto;
}

.cz-chat-msg--user {
	flex-direction: row-reverse;
	margin-left: auto;
}

.cz-chat-msg__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1.85rem;
	height: 1.85rem;
	border-radius: 50%;
	background: #d17b8f;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 500;
}

.cz-chat-msg__bubble {
	padding: 0.75rem 0.9rem;
	border-radius: 1.15rem;
}

.cz-chat-msg--brand .cz-chat-msg__bubble {
	background: #d17b8f;
	color: #fff;
	border-bottom-left-radius: 0.35rem;
}

.cz-chat-msg--user .cz-chat-msg__bubble {
	background: #f3f3f3;
	color: #1a1a1a;
	border-bottom-right-radius: 0.35rem;
}

.cz-chat-msg__bubble p {
	margin: 0;
	font-size: 0.84rem;
	font-weight: 300;
	line-height: 1.6;
}

.cz-support__bubble {
	max-width: 92%;
	margin-bottom: 0.75rem;
	padding: 0.75rem 0.85rem;
	border: 1px solid #e8e6e2;
}

.cz-support__bubble p {
	margin: 0;
	font-size: 0.84rem;
	font-weight: 300;
	line-height: 1.6;
	color: #1a1a1a;
}

.cz-support__bubble--brand {
	margin-right: auto;
	background: #fff;
}

.cz-support__bubble--user {
	margin-left: auto;
	background: #fafafa;
}

.cz-support__quick {
	display: grid;
	gap: 0.55rem;
	margin-bottom: 1rem;
}

.cz-support__quick-link {
	display: grid;
	gap: 0.15rem;
	padding: 0.75rem 0.85rem;
	border: 1px solid #e8e6e2;
	background: #fff;
	color: #1a1a1a;
	text-decoration: none;
}

.cz-support__quick-link:hover {
	opacity: 0.75;
}

.cz-support__quick-label {
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #6b6b6b;
}

.cz-support__quick-link span:not(.cz-support__quick-label) {
	font-size: 0.86rem;
}

.cz-support__quick-link small {
	font-size: 0.74rem;
	color: #6b6b6b;
}

.cz-support__topics {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-bottom: 0.85rem;
	padding: 0 0.15rem;
}

.cz-support__topic {
	padding: 0.45rem 0.75rem;
	border: 1px solid rgba(209, 123, 143, 0.28);
	border-radius: 999px;
	background: #fff;
	color: #1a1a1a;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 0.72rem;
	font-weight: 400;
	line-height: 1.3;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.cz-support__topic:hover {
	background: rgba(253, 245, 246, 0.85);
	border-color: #d17b8f;
}

.cz-support__form {
	margin: 0;
	padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
}

.cz-support__panel .cz-support__form {
	padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
	border-top: 1px solid rgba(209, 123, 143, 0.12);
	background: rgba(255, 255, 255, 0.88);
}

.cz-chat-composer__bar {
	display: flex;
	align-items: flex-end;
	gap: 0.65rem;
	padding: 0.45rem 0.45rem 0.45rem 0.85rem;
	border: 1px solid rgba(209, 123, 143, 0.16);
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(209, 123, 143, 0.08);
}

.cz-chat-composer__input {
	flex: 1;
	min-width: 0;
}

.cz-chat-composer__input textarea {
	width: 100%;
	min-height: 1.5rem;
	max-height: 6rem;
	padding: 0.45rem 0;
	border: 0;
	background: transparent;
	resize: none;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 0.88rem;
	line-height: 1.5;
	color: #1a1a1a;
}

.cz-chat-composer__input textarea:focus {
	outline: none;
}

.cz-chat-composer__input textarea::placeholder {
	color: rgba(107, 107, 107, 0.72);
}

.cz-chat-composer__send {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2.65rem;
	height: 2.65rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #d17b8f;
	color: #fff;
	cursor: pointer;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.cz-chat-composer__send:hover:not(:disabled) {
	transform: scale(1.04);
}

.cz-chat-composer__send:disabled {
	opacity: 0.6;
	cursor: wait;
}

.cz-support__field input,
.cz-support__field textarea {
	width: 100%;
	padding: 0.75rem 0.85rem;
	border: 1px solid #e8e6e2;
	border-radius: 0;
	background: #fff;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 0.84rem;
	color: #1a1a1a;
}

.cz-support__field textarea {
	min-height: 4.5rem;
	resize: vertical;
}

.cz-support__field input:focus,
.cz-support__field textarea:focus {
	outline: none;
	border-color: #1a1a1a;
}

.cz-support__honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.cz-support__status {
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.5;
}

.cz-support__status--error {
	color: #9a2c2c;
}

.cz-support__submit {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0.85rem 1rem;
	border: 1px solid #1a1a1a;
	background: #fff;
	color: #1a1a1a;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 0.78rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	cursor: pointer;
}

.cz-support__submit:hover:not(:disabled) {
	background: #1a1a1a;
	color: #fff;
}

.cz-support__submit:disabled {
	opacity: 0.6;
	cursor: wait;
}

@media (max-width: 768px) {
	.cz-support__panel {
		top: auto;
		bottom: 0;
		right: 0;
		left: 0;
		width: 100%;
		height: min(92vh, 42rem);
		border-left: 0;
		border-top: 1px solid #e8e6e2;
		border-radius: 1rem 1rem 0 0;
		box-shadow: 0 -12px 40px rgba(26, 26, 26, 0.12);
	}

	.cz-support__thread {
		max-height: 10rem;
	}

	.cz-support__field input,
	.cz-support__field textarea {
		font-size: 16px;
	}

	.cz-support__submit {
		min-height: 48px;
	}
}

@media (max-width: 480px) {
	.cz-support__body {
		padding: 0.85rem 0.85rem calc(0.85rem + env(safe-area-inset-bottom));
	}
}
