/* AH Messenger widget - atomic-hosting.com palette:
   navy #0f2233, brand blue #27638c / #2d6397, light #eef4f9 / #dcebf7,
   accent green #94ce18, slate text #51606c. */

/* The hidden attribute must win over the flex layouts below. */
.ahmsg-root[hidden],
.ahmsg-panel[hidden],
.ahmsg-view[hidden] { display: none !important; }

.ahmsg-root {
	position: fixed;
	inset-inline-end: 20px;
	bottom: 20px;
	z-index: 99990;
	font-family: inherit;
	font-size: 15px;
	color: #0f2233;
}

.ahmsg-bubble {
	position: relative;
	width: 60px;
	height: 60px;
	border: none;
	border-radius: 50%;
	background: linear-gradient(135deg, #27638c, #0f2233);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(15, 34, 51, .35);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .15s ease;
}
.ahmsg-bubble:hover { transform: scale(1.06); }

.ahmsg-badge {
	position: absolute;
	top: -4px;
	inset-inline-end: -4px;
	min-width: 22px;
	height: 22px;
	padding: 0 5px;
	border-radius: 11px;
	background: #94ce18;
	color: #0f2233;
	font-size: 12px;
	font-weight: 700;
	line-height: 22px;
	text-align: center;
}

.ahmsg-panel {
	position: absolute;
	bottom: 74px;
	inset-inline-end: 0;
	width: 360px;
	max-width: calc(100vw - 32px);
	height: 540px;
	max-height: calc(100vh - 110px);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(15, 34, 51, .35);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.ahmsg-head {
	background: linear-gradient(135deg, #27638c, #0f2233);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
}
.ahmsg-title { font-weight: 700; font-size: 16px; }
.ahmsg-presence { font-size: 12.5px; opacity: .85; margin-top: 2px; }
.ahmsg-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0 2px;
}

.ahmsg-view {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	padding: 16px;
	overflow-y: auto;
}
#ahmsg-view-chat { padding: 0; overflow: hidden; }

.ahmsg-auth-note { margin: 0 0 14px; color: #51606c; font-size: 14px; }
.ahmsg-form label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 12px; }
.ahmsg-form input {
	display: block;
	width: 100%;
	margin-top: 5px;
	padding: 10px 12px;
	border: 1px solid #b7c9d8;
	border-radius: 8px;
	font-size: 15px;
	box-sizing: border-box;
}
.ahmsg-form input:focus { outline: 2px solid #27638c; border-color: #27638c; }
.ahmsg-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.ahmsg-btn {
	width: 100%;
	padding: 11px;
	border: none;
	border-radius: 8px;
	background: #27638c;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.ahmsg-btn:hover { background: #1d4c6c; }
.ahmsg-btn:disabled { opacity: .6; cursor: wait; }
.ahmsg-link {
	background: none;
	border: none;
	color: #27638c;
	cursor: pointer;
	margin-top: 10px;
	font-size: 13.5px;
	text-decoration: underline;
}
.ahmsg-error { color: #b3261e; font-size: 13.5px; margin: 10px 0 0; }
.ahmsg-ok { color: #3f6212; font-size: 13.5px; margin: 10px 0 0; }

.ahmsg-messages {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 14px 12px;
	background: #eef4f9;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ahmsg-msg { display: flex; }
.ahmsg-msg--visitor { justify-content: flex-end; }
.ahmsg-msg--owner { justify-content: flex-start; }

.ahmsg-bubble-msg {
	max-width: 82%;
	padding: 8px 11px 6px;
	border-radius: 10px;
	font-size: 14.5px;
	line-height: 1.45;
	white-space: normal;
	word-break: break-word;
	box-shadow: 0 1px 2px rgba(15, 34, 51, .12);
}
.ahmsg-msg--visitor .ahmsg-bubble-msg { background: #dcebf7; border-end-end-radius: 2px; }
.ahmsg-msg--owner .ahmsg-bubble-msg { background: #fff; border-end-start-radius: 2px; }

.ahmsg-meta {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: #51606c;
	margin-top: 3px;
}
.ahmsg-ticks { font-size: 11px; letter-spacing: -2px; color: #8aa0b4; }
.ahmsg-ticks--read { color: #2d6397; }
.ahmsg-msg--error .ahmsg-bubble-msg { outline: 1px solid #b3261e; }

.ahmsg-closed-note {
	margin: 0;
	padding: 10px 14px;
	background: #fdf3e3;
	color: #6b4e12;
	font-size: 13.5px;
	text-align: center;
}
.ahmsg-closed-note button {
	background: none;
	border: none;
	color: #27638c;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
}

.ahmsg-composer {
	display: flex;
	gap: 8px;
	align-items: flex-end;
	padding: 10px;
	background: #fff;
	border-top: 1px solid #dde6ee;
}
.ahmsg-composer textarea {
	flex: 1;
	resize: none;
	border: 1px solid #b7c9d8;
	border-radius: 18px;
	padding: 9px 13px;
	font-size: 14.5px;
	max-height: 110px;
	box-sizing: border-box;
}
.ahmsg-composer textarea:focus { outline: 2px solid #27638c; border-color: #27638c; }
.ahmsg-send {
	width: 42px;
	height: 42px;
	border: none;
	border-radius: 50%;
	background: #94ce18;
	color: #0f2233;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
}
.ahmsg-send:hover { filter: brightness(1.05); }

/* reCAPTCHA gate (v1.1.0) */
.ahmsg-recaptcha-box { margin: 6px 0 2px; }
.ahmsg-captcha-note { font-size: 11px; color: #8a94a0; margin: 8px 0 0; line-height: 1.45; }
