/* 사이트 공통 디자인 톤(Astra 기본값)에 맞춘 회색조 텍스트 계층 + 기본 시스템
   폰트 스택. make-chatbot-widget 의 플로팅 버튼과 같은 톤으로 맞추되, 서로
   다른 버튼임을 구분할 수 있도록 살짝 다른 위치/여백을 쓴다. */

.sfw-widget {
	--sfw-accent: #0274be;
	font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", "Malgun Gothic", sans-serif;
	color-scheme: light;
	position: fixed;
	z-index: 999998;
	bottom: 90px;
}

.sfw-widget.sfw-position-bottom-right {
	right: 20px;
}

.sfw-widget.sfw-position-bottom-left {
	left: 20px;
}

.sfw-bubble {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: none;
	border-radius: 50%;
	background: #545454;
	color: #fff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	cursor: pointer;
}

.sfw-bubble:hover {
	filter: brightness(0.92);
}

.sfw-icon-close {
	display: none;
}

.sfw-widget.sfw-open .sfw-icon-open {
	display: none;
}

.sfw-widget.sfw-open .sfw-icon-close {
	display: block;
}

.sfw-widget .sfw-panel {
	position: absolute;
	bottom: 62px;
	width: 320px;
	max-width: calc(100vw - 40px);
	max-height: calc(100vh - 160px);
	overflow-y: auto;
	background: #fff;
	border: 1px solid #e1e1e1;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.sfw-position-bottom-right .sfw-panel {
	right: 0;
}

.sfw-position-bottom-left .sfw-panel {
	left: 0;
}

/* author 스타일(display 지정)이 [hidden] 의 user agent 기본값을 이겨버리는
   것을 막기 위해 명시적으로 되살린다(make-chatbot-widget 의 .mcw-panel 과 동일한
   이유). */
.sfw-widget .sfw-panel[hidden] {
	display: none;
}

.sfw-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: var(--sfw-accent);
	color: #fff;
	border-radius: 12px 12px 0 0;
}

.sfw-header-title {
	font-size: 14px;
	font-weight: 700;
}

.sfw-header-close {
	border: none;
	background: transparent;
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 4px;
}

.sfw-body {
	padding: 16px;
}

.sfw-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* author 스타일(display:flex)이 [hidden]의 user agent 기본값(display:none)을
   이겨버리는 것을 막기 위해 명시적으로 되살린다(같은 이유로 .sfw-panel[hidden]도
   따로 두었다). */
.sfw-form[hidden] {
	display: none;
}

.sfw-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #3a3a3a;
}

.sfw-optional {
	font-weight: 400;
	color: #999999;
}

.sfw-radio-group {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
}

.sfw-radio-group label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	color: #3a3a3a;
	cursor: pointer;
}

.sfw-input,
.sfw-textarea {
	width: 100%;
	padding: 8px 10px;
	font-size: 14px;
	font-family: inherit;
	color: #3a3a3a;
	border: 1px solid #cccccc;
	border-radius: 6px;
	box-sizing: border-box;
}

.sfw-textarea {
	resize: vertical;
}

.sfw-input:focus,
.sfw-textarea:focus {
	outline: none;
	border-color: var(--sfw-accent);
}

/* 허니팟 - 실제 방문자에게는 절대 보이지 않지만, 자동화된 스팸 봇은 폼에
   보이는 모든 입력창을 채우는 경우가 많아 이 필드가 채워지면 스팸으로 간주한다. */
.sfw-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.sfw-submit {
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	background: var(--sfw-accent);
	border: none;
	border-radius: 6px;
	cursor: pointer;
}

.sfw-submit:hover:not(:disabled) {
	filter: brightness(0.92);
}

.sfw-submit:disabled {
	opacity: 0.6;
	cursor: default;
}

.sfw-message-note {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
}

.sfw-message-success {
	color: #0274be;
}

.sfw-message-error {
	color: #b42318;
}

@media (max-width: 420px) {
	.sfw-widget .sfw-panel {
		width: calc(100vw - 40px);
	}
}
