/* Virtual 새만금 챗봇 */
.saemg-chat-panel .blind {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}
.saemg-chat-panel {
	display: none;
	flex-direction: column;
	position: fixed;
	width: 380px;
	max-width: calc(100vw - 24px);
	height: 560px;
	max-height: calc(100vh - 100px);
	bottom: 90px;
	right: 15px;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
	z-index: 200;
	overflow: hidden;
	font-family: inherit;
}

.saemg-chat-panel.is-open {
	display: flex;
}

.saemg-chat-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	border-bottom: 1px solid #eee;
	flex-shrink: 0;
}

.saemg-chat-panel__brand {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	font-size: 16px;
	font-weight: 700;
	color: #222;
}

.saemg-chat-panel__brand img {
	width: 36px;
	height: 36px;
	object-fit: contain;
}

.saemg-chat-panel__actions {
	display: flex;
	align-items: center;
	gap: 4px;
}

.saemg-chat-panel__icon-btn {
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	border: none;
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 20px 20px;
	cursor: pointer;
	border-radius: 8px;
	flex-shrink: 0;
	box-sizing: border-box;
}

.saemg-chat-panel__icon-btn:hover {
	background-color: #f0f0f0;
}

.saemg-chat-panel__icon-btn--refresh {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M23 4v6h-6'/%3E%3Cpath d='M1 20v-6h6'/%3E%3Cpath d='M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15'/%3E%3C/svg%3E");
}

.saemg-chat-panel__icon-btn--settings {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E");
}

.saemg-chat-panel__icon-btn--close {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
}

.saemg-chat-panel__messages-area {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	background: #fafafa;
}

.saemg-chat-snackbar {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 12px 12px;
	padding: 10px 12px;
	box-sizing: border-box;
	background: #009e00;
	border: none;
	border-radius: 10px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
	flex-shrink: 0;
}

.saemg-chat-snackbar__icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23FFCC00' d='M12 3.2 2.5 20h19L12 3.2z'/%3E%3Cpath fill='%23222222' d='M11.25 9h1.5v5.5h-1.5V9zm0 7h1.5V18h-1.5v-2z'/%3E%3C/svg%3E") center / 24px no-repeat;
}

.saemg-chat-snackbar[hidden] {
	display: none !important;
}

.saemg-chat-snackbar.is-hidden {
	display: none;
}

.saemg-chat-snackbar__text {
	flex: 1;
	margin: 0;
	padding: 0;
	font-size: 16px;
	line-height: 1.5;
	font-weight: 500;
	color: #fff;
}

.saemg-chat-snackbar__close {
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	margin: 0 -4px 0 0;
	padding: 0;
	align-self: center;
	border: none;
	border-radius: 6px;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E") center / 16px no-repeat;
	cursor: pointer;
}

.saemg-chat-snackbar__close:hover {
	background-color: rgba(255, 255, 255, 0.15);
}

.saemg-chat-panel__messages {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 16px 16px 8px;
	display: flex;
	flex-direction: column;
}

.saemg-chat-msg {
	display: flex;
	flex-direction: column;
	margin-bottom: 14px;
	max-width: 92%;
}

.saemg-chat-msg--user {
	align-self: flex-end;
	margin-left: auto;
}

.saemg-chat-msg--assistant {
	align-self: flex-start;
}

.saemg-chat-msg__bubble {
	padding: 12px 14px;
	border-radius: 14px;
	font-size: 16px;
	line-height: 1.5;
	word-break: break-word;
	white-space: pre-wrap;
}

.saemg-chat-msg--user .saemg-chat-msg__bubble {
	background: #000000;
	color: #fff;
	border-bottom-right-radius: 4px;
}

.saemg-chat-msg--assistant .saemg-chat-msg__bubble {
	background: #fff;
	color: #333;
	border: 1px solid #e8e8e8;
	border-bottom-left-radius: 4px;
}

.saemg-chat-msg__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #eee;
}

.saemg-chat-msg__action-btn {
	display: block;
	width: 100%;
	margin: 0;
	padding: 10px 14px;
	box-sizing: border-box;
	border: 1px solid #009e00;
	border-radius: 10px;
	background: #fff;
	color: #009e00;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	text-align: center;
	cursor: pointer;
	font-family: inherit;
}

.saemg-chat-msg__action-btn:hover {
	background: rgba(0, 158, 0, 0.06);
}

.saemg-chat-msg__action-btn:focus-visible {
	outline: 2px solid #009e00;
	outline-offset: 2px;
}

.saemg-chat-msg__api-debug {
	margin-top: 12px;
	padding-top: 8px;
	border-top: 1px dashed #ccc;
	font-size: 12px;
	color: #555;
}

.saemg-chat-msg__api-debug summary {
	cursor: pointer;
	font-weight: 600;
	color: #666;
	user-select: none;
}

.saemg-chat-msg__api-debug-pre {
	margin: 8px 0 0;
	padding: 8px;
	max-height: 200px;
	overflow: auto;
	background: #f5f5f5;
	border-radius: 6px;
	font-size: 11px;
	line-height: 1.4;
	white-space: pre-wrap;
	word-break: break-all;
}

.saemg-chat-msg__api-debug-url {
	margin: 8px 0 0;
	padding: 6px 8px;
	background: #eef8ee;
	border-radius: 6px;
	font-size: 11px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-all;
	color: #1a5c1a;
}

.saemg-chat-proxy-debug {
	flex-shrink: 0;
	margin: 0;
	padding: 6px 12px;
	font-size: 11px;
	line-height: 1.35;
	color: #1a5c1a;
	background: #eef8ee;
	border-bottom: 1px solid #cce6cc;
	word-break: break-all;
}

.saemg-chat-report__other--visible {
	display: block;
	margin-top: 8px;
}

.saemg-chat-msg__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin-top: 3px;
	padding: 0 2px;
}

.saemg-chat-msg--user .saemg-chat-msg__meta {
	align-self: flex-end;
	justify-content: flex-end;
}

.saemg-chat-msg--assistant .saemg-chat-msg__meta {
	align-self: flex-start;
	width: 100%;
	max-width: 92%;
	justify-content: space-between;
	box-sizing: border-box;
}

.saemg-chat-msg__time {
	font-size: 16px;
	line-height: 1.25;
	color: #434343;
	margin: 0;
	padding: 0;
	flex-shrink: 0;
}

.saemg-chat-msg__report-wrap {
	display: inline-flex;
	align-items: center;
	gap: 0;
	margin-left: auto;
	flex-shrink: 0;
	min-height: 44px;
	padding: 2px 4px;
	box-sizing: border-box;
}

.saemg-chat-msg__report-icon {
	display: inline-block;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 14h16v3H4z' fill='%239ca3af'/%3E%3Cpath d='M7 14V11h10v3' fill='%236b7280'/%3E%3Cellipse cx='12' cy='8' rx='5' ry='4' fill='%23ef4444'/%3E%3Cpath d='M12 3v2M8 5l1 1.5M16 5l-1 1.5M6 8H4M20 8h-2' stroke='%23fbbf24' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E") center center no-repeat;
	background-size: contain;
}

.saemg-chat-msg__report {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0 8px;
	min-width: 44px;
	min-height: 44px;
	border: none;
	border-radius: 8px;
	background: none;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.25;
	color: #1a3a6e;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	box-sizing: border-box;
}

.saemg-chat-msg__report:hover {
	color: #0f2847;
	text-decoration-thickness: 2px;
}

.saemg-chat-msg__report:focus {
	outline: none;
}

.saemg-chat-msg__report:focus-visible {
	outline: 2px solid #1a2744;
	outline-offset: 2px;
	background: #eef2f8;
}

.saemg-chat-msg__report-wrap:hover .saemg-chat-msg__report-icon {
	opacity: 0.92;
}

.saemg-chat-report-overlay {
	display: none;
	position: absolute;
	inset: 0;
	z-index: 10;
	background: #fff;
	flex-direction: column;
}

.saemg-chat-report-overlay.is-open {
	display: flex;
}

.saemg-chat-report {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	min-height: 0;
}

.saemg-chat-report__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
	padding: 12px 12px 12px 16px;
	border-bottom: 1px solid #eee;
	background: #fff;
}

.saemg-chat-report__heading {
	margin: 0;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	color: #1a1a1a;
}

.saemg-chat-report__body {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: #fafafa;
}

.saemg-chat-report__section {
	margin: 0 0 16px;
	padding: 16px;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 12px;
	box-sizing: border-box;
}

.saemg-chat-report__section:last-child {
	margin-bottom: 0;
}

.saemg-chat-report__section-title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	color: #2d2d2d;
}

.saemg-chat-report__section-desc {
	margin: 0 0 12px;
	font-size: 16px;
	line-height: 1.4;
	color: #434343;
}

.saemg-chat-report__options {
	margin: 0;
	padding: 0;
}

.saemg-chat-report__radio {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 8px;
	padding: 12px 14px;
	font-size: 16px;
	color: #2d2d2d;
	background: #fafafa;
	border: 1px solid #ddd;
	border-radius: 10px;
	cursor: pointer;
	box-sizing: border-box;
}

.saemg-chat-report__radio:last-child {
	margin-bottom: 0;
}

.saemg-chat-report__radio input {
	margin-top: 4px;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	accent-color: #1a2744;
	cursor: pointer;
}

.saemg-chat-report__radio span {
	flex: 1;
	line-height: 1.4;
}

.saemg-chat-report__radio.is-checked,
.saemg-chat-report__radio:hover {
	border-color: #1a2744;
	background: #f8f9fc;
}

.saemg-chat-report__other {
	margin-top: 12px;
}

.saemg-chat-report__other textarea {
	width: 100%;
	box-sizing: border-box;
	margin: 0;
	padding: 12px;
	font-size: 16px;
	line-height: 1.4;
	color: #2d2d2d;
	border: 1px solid #767676;
	border-radius: 8px;
	resize: vertical;
	font-family: inherit;
}

.saemg-chat-report__footer {
	flex-shrink: 0;
	padding: 12px 16px 16px;
	border-top: 1px solid #eee;
	background: #fff;
}

.saemg-chat-report__submit {
	width: 100%;
	min-height: 48px;
	padding: 12px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.25;
	color: #fff;
	background: #1a2744;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	margin-bottom: 8px;
}

.saemg-chat-report__submit:focus-visible {
	outline: 2px solid #1a2744;
	outline-offset: 2px;
}

.saemg-chat-report__cancel {
	width: 100%;
	min-height: 48px;
	padding: 12px;
	font-size: 16px;
	line-height: 1.25;
	color: #434343;
	background: #f5f5f5;
	border: none;
	border-radius: 8px;
	cursor: pointer;
}

.saemg-chat-report__cancel:focus-visible {
	outline: 2px solid #434343;
	outline-offset: 2px;
}

/* 설정 패널 (전체 덮개, 항목 확장 가능) */
.saemg-chat-settings-overlay {
	display: none;
	position: absolute;
	inset: 0;
	z-index: 11;
	background: #fff;
	flex-direction: column;
}

.saemg-chat-settings-overlay.is-open {
	display: flex;
}

.saemg-chat-settings {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	min-height: 0;
}

.saemg-chat-settings__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
	padding: 12px 12px 12px 16px;
	border-bottom: 1px solid #eee;
	background: #fff;
}

.saemg-chat-settings__heading {
	margin: 0;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	color: #1a1a1a;
}

.saemg-chat-settings__body {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: #fafafa;
}

.saemg-chat-settings__section {
	margin: 0 0 16px;
	padding: 16px;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 12px;
	box-sizing: border-box;
}

.saemg-chat-settings__section:last-child {
	margin-bottom: 0;
}

.saemg-chat-settings__section-title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	color: #2d2d2d;
}

.saemg-chat-settings__section-desc {
	margin: 0 0 12px;
	font-size: 16px;
	line-height: 1.4;
	color: #434343;
}

.saemg-chat-settings__options {
	margin: 0;
	padding: 0;
}

.saemg-chat-settings__radio {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 8px;
	padding: 12px 14px;
	font-size: 16px;
	color: #2d2d2d;
	background: #fafafa;
	border: 1px solid #ddd;
	border-radius: 10px;
	cursor: pointer;
	box-sizing: border-box;
}

.saemg-chat-settings__radio:last-child {
	margin-bottom: 0;
}

.saemg-chat-settings__radio input {
	margin-top: 4px;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	accent-color: #1a2744;
	cursor: pointer;
}

.saemg-chat-settings__radio span {
	flex: 1;
	line-height: 1.4;
}

.saemg-chat-settings__radio.is-checked,
.saemg-chat-settings__radio:hover {
	border-color: #1a2744;
	background: #f8f9fc;
}

.saemg-chat-settings__footer {
	flex-shrink: 0;
	padding: 12px 16px 16px;
	border-top: 1px solid #eee;
	background: #fff;
}

.saemg-chat-settings__apply {
	width: 100%;
	min-height: 48px;
	padding: 12px;
	margin-bottom: 8px;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.25;
	color: #fff;
	background: #1a2744;
	border: none;
	border-radius: 8px;
	cursor: pointer;
}

.saemg-chat-settings__apply:focus-visible {
	outline: 2px solid #1a2744;
	outline-offset: 2px;
}

.saemg-chat-settings__cancel {
	width: 100%;
	min-height: 48px;
	padding: 12px;
	font-size: 16px;
	line-height: 1.25;
	color: #434343;
	background: #f5f5f5;
	border: none;
	border-radius: 8px;
	cursor: pointer;
}

.saemg-chat-settings__cancel:focus-visible {
	outline: 2px solid #434343;
	outline-offset: 2px;
}

.saemg-chat-settings__secondary {
	width: 100%;
	min-height: 44px;
	padding: 12px 14px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.25;
	color: #1a2744;
	background: #fff;
	border: 1px solid #1a2744;
	border-radius: 8px;
	cursor: pointer;
}

.saemg-chat-settings__secondary:focus-visible {
	outline: 2px solid #1a2744;
	outline-offset: 2px;
}

/* 이용 안내(동의) 패널 */
.saemg-chat-consent-overlay {
	display: none;
	position: absolute;
	inset: 0;
	z-index: 12;
	background: #fff;
	flex-direction: column;
}

.saemg-chat-consent-overlay.is-open {
	display: flex;
}

.saemg-chat-consent {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	min-height: 0;
}

.saemg-chat-consent__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
	padding: 12px 12px 12px 16px;
	border-bottom: 1px solid #eee;
	background: #fff;
}

.saemg-chat-consent__heading {
	margin: 0;
	padding: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	color: #1a1a1a;
}

.saemg-chat-consent__body {
	flex: 1;
	overflow: hidden;
	padding: 16px;
	background: #fafafa;
	min-height: 0;
}

.saemg-chat-consent__section {
	margin: 0;
	padding: 0;
	background: transparent;
	border: none;
	height: 100%;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.saemg-chat-consent__scroll {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 12px;
	box-sizing: border-box;
}

.saemg-chat-consent__status {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	color: #434343;
}

.saemg-chat-consent__retry {
	margin-top: 12px;
	min-height: 44px;
	padding: 10px 16px;
	font-size: 16px;
	font-weight: 600;
	color: #1a2744;
	background: #fff;
	border: 1px solid #1a2744;
	border-radius: 8px;
	cursor: pointer;
}

.saemg-chat-consent__lead {
	margin: 0 0 12px;
	font-size: 16px;
	line-height: 1.5;
	color: #2d2d2d;
}

.saemg-chat-consent__lead:last-of-type {
	margin-bottom: 16px;
}

.saemg-chat-consent__topic {
	margin: 16px 0 8px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	color: #2d2d2d;
}

.saemg-chat-consent__topic:first-of-type {
	margin-top: 0;
}

.saemg-chat-consent__list {
	margin: 0 0 4px;
	padding: 0 0 0 20px;
	font-size: 16px;
	line-height: 1.5;
	color: #434343;
}

.saemg-chat-consent__list li {
	margin-bottom: 8px;
}

.saemg-chat-consent__list li:last-child {
	margin-bottom: 0;
}

.saemg-chat-consent__agree {
	flex-shrink: 0;
	padding: 12px 16px;
	border-top: 1px solid #eee;
	background: #fff;
}

.saemg-chat-consent__agree-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font-size: 16px;
	line-height: 1.4;
	color: #1a2744;
	font-weight: 600;
	cursor: pointer;
}

.saemg-chat-consent__agree-label input {
	margin-top: 3px;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	accent-color: #1a2744;
	cursor: pointer;
}

.saemg-chat-consent__footer {
	flex-shrink: 0;
	display: flex;
	gap: 8px;
	padding: 12px 16px 16px;
	border-top: 1px solid #eee;
	background: #fff;
}

.saemg-chat-consent__cancel,
.saemg-chat-consent__start {
	flex: 1;
	min-height: 48px;
	padding: 12px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.25;
	border-radius: 8px;
	cursor: pointer;
	box-sizing: border-box;
}

.saemg-chat-consent__cancel {
	color: #434343;
	background: #fff;
	border: 1px solid #767676;
}

.saemg-chat-consent__start {
	color: #fff;
	background: #1a2744;
	border: none;
}

.saemg-chat-consent__start:disabled {
	color: #fff;
	background: #b0b8c4;
	cursor: not-allowed;
	opacity: 0.85;
}

.saemg-chat-consent__cancel:focus-visible,
.saemg-chat-consent__start:focus-visible {
	outline: 2px solid #1a2744;
	outline-offset: 2px;
}

.saemg-chat-consent-overlay.is-view-only .saemg-chat-consent__agree,
.saemg-chat-consent-overlay.is-view-only .saemg-chat-consent__footer {
	display: none;
}

.saemg-chat-msg--typing {
	max-width: 100%;
}

.saemg-chat-msg--typing .saemg-chat-msg__bubble {
	min-width: 168px;
	padding: 12px 16px;
}

.saemg-chat-typing {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: nowrap;
}

.saemg-chat-typing__label {
	font-size: 15px;
	line-height: 1.4;
	color: #333;
	white-space: nowrap;
	flex-shrink: 0;
}

.saemg-chat-typing-dots {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	line-height: 1;
	color: #333;
	flex-shrink: 0;
}

.saemg-chat-typing-dots__dot {
	display: block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.22;
	animation: saemg-chat-typing-dot 1.05s ease-in-out infinite;
}

.saemg-chat-typing-dots__dot:nth-child(1) {
	animation-delay: 0s;
}

.saemg-chat-typing-dots__dot:nth-child(2) {
	animation-delay: 0.18s;
}

.saemg-chat-typing-dots__dot:nth-child(3) {
	animation-delay: 0.36s;
}

@keyframes saemg-chat-typing-dot {
	0%,
	55%,
	100% {
		opacity: 0.22;
	}
	28% {
		opacity: 1;
	}
}

.saemg-chat-panel__footer {
	flex-shrink: 0;
	padding: 12px 16px 16px;
	border-top: 1px solid #eee;
	background: #fff;
}

.saemg-chat-panel__input-row {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #f5f5f7;
	border-radius: 28px;
	padding: 4px 4px 4px 16px;
	min-height: 52px;
	box-sizing: border-box;
}

.saemg-chat-panel__input {
	flex: 1;
	border: none;
	background: transparent;
	resize: none;
	max-height: 120px;
	min-height: 44px;
	padding: 10px 0;
	font-size: 16px;
	line-height: 1.375;
	outline: none;
	font-family: inherit;
	box-sizing: border-box;
}

.saemg-chat-panel__send {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	min-width: 44px;
	min-height: 44px;
	border: none;
	border-radius: 50%;
	background-color: #009e00;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23fff' stroke-width='2'%3E%3Cpath d='M9 15V3M9 3l4 4M9 3L5 7'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	box-sizing: border-box;
}

.saemg-chat-panel__send:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

/* 채팅 패널 내 버튼 최소 터치 영역 (WCAG 44×44) */
.saemg-chat-panel button {
	min-width: 44px;
	min-height: 44px;
	box-sizing: border-box;
}

/* TODO: 챗봇 아이콘 임시 숨김 — 재오픈 시 display:none 제거 */
.quickWrap ul li.chatbot-quick {
	display: none;
	margin: 10px auto 0;
}

.quickWrap ul li.chatbot-quick:last-child {
	margin-bottom: 0;
}

.quickWrap ul li.chatbot-quick .saemg-chat-quick-btn {
	display: block;
	width: 100%;
	border: none;
	cursor: pointer;
	position: relative;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	background: transparent;
	box-shadow: none;
	border-radius: 0;
	text-align: center;
}

.quickWrap ul li.chatbot-quick .saemg-chat-quick-btn:focus-visible {
	outline: 2px solid #009e00;
	outline-offset: 2px;
	border-radius: 12px;
}

.quickWrap ul li.chatbot-quick .saemg-chat-quick-btn__img {
	display: block;
	width: 100%;
	height: auto;
	vertical-align: top;
}

.quickWrap ul li.chatbot-quick .saemg-chat-quick-btn__img--active {
	display: none;
}

.quickWrap ul li.chatbot-quick .saemg-chat-quick-btn.is-open .saemg-chat-quick-btn__img--default {
	display: none;
}

.quickWrap ul li.chatbot-quick .saemg-chat-quick-btn.is-open .saemg-chat-quick-btn__img--active {
	display: block;
}

@media screen and (min-width: 769px) {
	.saemg-chat-panel {
		width: 440px;
		height: min(720px, calc(100vh - 72px));
		max-height: calc(100vh - 72px);
		bottom: 96px;
	}
}

@media screen and (max-width: 768px) {
	.saemg-chat-panel {
		right: 8px;
		bottom: 72px;
		width: calc(100vw - 16px);
		height: min(560px, calc(100vh - 88px));
	}
}
