/**
 * 在线留言表单（联系我们页 + 右侧悬浮弹窗）
 * 主色：#2d7a4f（与站点 brand-700 一致）
 */

/* ---------- 悬浮栏留言按钮 ---------- */
.floating-sidebar .sidebar-msg {
	background: #2d7a4f;
	border: none;
	color: #fff;
	box-shadow: 0 4px 14px rgba(45, 122, 79, .35);
}
.floating-sidebar .sidebar-msg:hover {
	background: #246340;
	transform: scale(1.05);
	box-shadow: 0 6px 20px rgba(45, 122, 79, .45);
}

/* ---------- 弹窗 ---------- */
.gb-modal {
	position: fixed;
	inset: 0;
	z-index: 90;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.gb-modal[hidden] { display: none; }
.gb-mask {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .5);
	opacity: 0;
	transition: opacity .2s ease;
}
.gb-panel {
	position: relative;
	width: 100%;
	max-width: 430px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
	padding: 24px 22px 22px;
	opacity: 0;
	transform: translateY(14px) scale(.98);
	transition: opacity .2s ease, transform .2s ease;
}
.gb-modal.gb-show .gb-mask { opacity: 1; }
.gb-modal.gb-show .gb-panel { opacity: 1; transform: translateY(0) scale(1); }
.gb-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	border-radius: 8px;
	font-size: 22px;
	line-height: 1;
	color: #94a3b8;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.gb-close:hover { background: #f1f5f9; color: #334155; }

.gb-title {
	margin: 0 0 4px;
	font-size: 18px;
	font-weight: 700;
	color: #1e293b;
}
.gb-sub {
	margin: 0 0 16px;
	font-size: 12px;
	color: #94a3b8;
}
.gb-sub strong { color: #2d7a4f; font-weight: 600; }

/* ---------- 表单 ---------- */
.gb-form { display: block; }
.gb-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.gb-field { display: block; }
.gb-field.gb-full { grid-column: 1 / -1; }
.gb-label {
	display: block;
	margin-bottom: 5px;
	font-size: 13px;
	font-weight: 500;
	color: #334155;
}
.gb-label .req { color: #dc2626; margin-left: 2px; }
.gb-input,
.gb-select,
.gb-textarea {
	width: 100%;
	padding: 9px 12px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	font-size: 14px;
	color: #334155;
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
	box-sizing: border-box;
}
.gb-textarea { resize: none; min-height: 88px; }
.gb-input:focus,
.gb-select:focus,
.gb-textarea:focus {
	border-color: #2d7a4f;
	box-shadow: 0 0 0 3px rgba(45, 122, 79, .12);
}
.gb-input::placeholder,
.gb-textarea::placeholder { color: #b6c2d1; }

/* 蜜罐字段：对人不呈现，对机器人可填 */
.gb-hp {
	position: absolute !important;
	left: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

/* 错误提示 */
.gb-error {
	margin: 10px 0 0;
	padding: 8px 12px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 6px;
	font-size: 13px;
	color: #b91c1c;
}
.gb-error[hidden] { display: none; }

/* 提交按钮 */
.gb-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-top: 14px;
	padding: 10px 16px;
	border: none;
	border-radius: 6px;
	background: #2d7a4f;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease, transform .15s ease;
}
.gb-submit:hover { background: #246340; }
.gb-submit:active { transform: scale(.98); }
.gb-submit:disabled,
.gb-form button[type="submit"]:disabled { opacity: .65; cursor: not-allowed; }
.gb-tip {
	margin: 10px 0 0;
	font-size: 12px;
	color: #94a3b8;
	text-align: center;
}

/* ---------- 成功状态 ---------- */
.gb-success {
	text-align: center;
	padding: 26px 10px 14px;
}
.gb-success[hidden] { display: none; }
.gb-success-icon {
	width: 52px;
	height: 52px;
	margin: 0 auto 12px;
	border-radius: 50%;
	background: #ecf7f0;
	color: #2d7a4f;
	display: flex;
	align-items: center;
	justify-content: center;
}
.gb-success h4 {
	margin: 0 0 6px;
	font-size: 17px;
	color: #1e293b;
}
.gb-success p {
	margin: 0 0 14px;
	font-size: 13px;
	color: #64748b;
}
.gb-again {
	display: inline-block;
	padding: 6px 18px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	color: #475569;
	font-size: 13px;
	cursor: pointer;
	transition: border-color .15s ease, color .15s ease;
}
.gb-again:hover { border-color: #2d7a4f; color: #2d7a4f; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
	.gb-panel { padding: 20px 16px 16px; }
	.gb-grid { grid-template-columns: 1fr; gap: 10px; }
	.gb-modal { padding: 12px; align-items: flex-end; }
	.gb-panel { max-width: 100%; }
}
