/* support chat widget. floats bottom-right of any page that includes
   the partial. cross-iframe compatible: positioned fixed with high
   z-index, no parent-document assumptions. */

.support-widget {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 2147483600;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #1f2a26;
}

.support-widget-launcher {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #1a7a4f;
	color: #fff;
	border: none;
	box-shadow: 0 12px 28px rgba(15, 50, 35, 0.28);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease, background 0.15s ease;
}

.support-widget-launcher:hover {
	transform: translateY(-2px);
	background: #156a44;
}

.support-widget-launcher svg {
	width: 26px;
	height: 26px;
	fill: currentColor;
}

.support-widget-launcher .support-widget-unread {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 20px;
	height: 20px;
	border-radius: 10px;
	background: #d93b3b;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 6px;
}

.support-widget-panel {
	position: fixed;
	right: 18px;
	bottom: 90px;
	width: 360px;
	max-width: calc(100vw - 36px);
	height: 520px;
	max-height: calc(100vh - 120px);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(15, 50, 35, 0.22);
	border: 1px solid #d9e5d5;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.support-widget-panel.hidden {
	display: none;
}

.support-widget-header {
	background: #1a7a4f;
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
}

.support-widget-header h3 {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.support-widget-header p {
	margin: 2px 0 0;
	font-size: 12px;
	opacity: 0.85;
}

.support-widget-close {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
	padding: 4px 8px;
	border-radius: 6px;
}

.support-widget-close:hover {
	background: rgba(255, 255, 255, 0.16);
}

.support-widget-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px;
	background: #f5f8f3;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.support-widget-empty {
	color: #6b7d76;
	font-size: 13px;
	text-align: center;
	margin: auto 0;
	padding: 12px;
}

.support-message {
	display: flex;
	flex-direction: column;
	max-width: 80%;
	font-size: 13.5px;
	line-height: 1.4;
}

.support-message-meta {
	font-size: 11px;
	color: #6b7d76;
	margin-bottom: 3px;
}

.support-message-body {
	padding: 9px 13px;
	border-radius: 14px;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.support-message.customer {
	align-self: flex-end;
	align-items: flex-end;
}

.support-message.customer .support-message-body {
	background: #1a7a4f;
	color: #fff;
	border-bottom-right-radius: 4px;
}

.support-message.staff {
	align-self: flex-start;
	align-items: flex-start;
}

.support-message.staff .support-message-body {
	background: #fff;
	color: #1f2a26;
	border: 1px solid #d9e5d5;
	border-bottom-left-radius: 4px;
}

.support-widget-form {
	flex-shrink: 0;
	border-top: 1px solid #d9e5d5;
	padding: 10px 12px;
	background: #fff;
	display: flex;
	gap: 8px;
}

.support-widget-form textarea {
	flex: 1 1 auto;
	resize: none;
	border: 1px solid #d9e5d5;
	border-radius: 10px;
	padding: 8px 10px;
	font-family: inherit;
	font-size: 13.5px;
	color: #1f2a26;
	min-height: 38px;
	max-height: 120px;
	outline: none;
}

.support-widget-form textarea:focus {
	border-color: #1a7a4f;
	box-shadow: 0 0 0 2px rgba(26, 122, 79, 0.18);
}

.support-widget-form button {
	background: #1a7a4f;
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 0 14px;
	font-weight: 600;
	cursor: pointer;
	font-size: 13px;
}

.support-widget-form button:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.support-widget-status {
	font-size: 11px;
	color: #6b7d76;
	padding: 4px 14px 0;
	min-height: 14px;
}

.support-widget-status.error {
	color: #c0392b;
}
