/* CUPM Tenant Chat — floating widget styles. Plain CSS, no external fonts. */

#cupm-chat-toggle {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 999998;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #1B2A4A;
	border: 2px solid #C9A227;
	color: #ffffff;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease-in-out;
}

#cupm-chat-toggle:hover,
#cupm-chat-toggle:focus {
	transform: scale(1.06);
	outline: 2px solid #C9A227;
	outline-offset: 2px;
}

#cupm-chat-panel {
	position: fixed;
	right: 20px;
	bottom: 92px;
	z-index: 999999;
	width: 360px;
	max-width: calc(100vw - 40px);
	height: 500px;
	max-height: calc(100vh - 120px);
	background: #ffffff;
	border-radius: 10px;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
	font-family: Arial, Helvetica, sans-serif;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

#cupm-chat-panel[hidden] {
	display: none;
}

/* Inline mode (tenant hub page): part of the page's own layout instead of a
   fixed-position corner overlay. Sizing/shadow are toned down to read as
   page content rather than a floating widget; colors/fonts are unchanged.
   Selector includes the #cupm-chat-panel id (not just the class) so this
   reliably outranks the plain #cupm-chat-panel rules above, including
   inside the sub-480px media query further down this file. */
#cupm-chat-panel.cupm-chat-panel--inline {
	position: static;
	right: auto;
	bottom: auto;
	width: 100%;
	max-width: none;
	height: 600px;
	max-height: 80vh;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
}

.cupm-chat-header {
	background: #1B2A4A;
	color: #ffffff;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 3px solid #C9A227;
}

.cupm-chat-header h2 {
	margin: 0;
	font-size: 15px;
	font-weight: bold;
}

.cupm-chat-close {
	background: transparent;
	border: none;
	color: #ffffff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}

.cupm-chat-close:hover,
.cupm-chat-close:focus {
	color: #C9A227;
	outline: 1px solid #C9A227;
}

#cupm-chat-messages {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 12px;
	font-size: 14px;
	line-height: 1.4;
	color: #1a1a1a;
}

.cupm-chat-msg {
	max-width: 85%;
	margin-bottom: 10px;
	padding: 8px 12px;
	border-radius: 12px;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.cupm-chat-msg-bot {
	background: #f2f2f2;
	color: #1a1a1a;
	border: 1px solid #e0e0e0;
	margin-right: auto;
}

.cupm-chat-msg-user {
	background: #1B2A4A;
	color: #ffffff;
	margin-left: auto;
}

.cupm-chat-typing {
	display: inline-block;
	margin-right: auto;
	margin-bottom: 10px;
	padding: 8px 12px;
	border-radius: 12px;
	background: #f2f2f2;
	color: #666666;
	font-style: italic;
	font-size: 13px;
}

.cupm-chat-input-row {
	border-top: 1px solid #e0e0e0;
	padding: 10px 12px;
	display: flex;
	gap: 8px;
	align-items: flex-end;
}

#cupm-chat-input {
	flex: 1 1 auto;
	resize: none;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	padding: 8px 10px;
	border: 1px solid #cccccc;
	border-radius: 6px;
	max-height: 80px;
}

#cupm-chat-input:focus {
	outline: 2px solid #C9A227;
	border-color: #C9A227;
}

#cupm-chat-send {
	background: #1B2A4A;
	color: #ffffff;
	border: none;
	border-radius: 6px;
	padding: 8px 14px;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	cursor: pointer;
}

#cupm-chat-send:hover:not(:disabled),
#cupm-chat-send:focus:not(:disabled) {
	background: #263a63;
	outline: 2px solid #C9A227;
}

#cupm-chat-send:disabled {
	background: #9aa3b5;
	cursor: not-allowed;
}

.cupm-chat-need-person {
	font-size: 12px;
	color: #444444;
	text-align: center;
	padding: 6px 12px 10px;
	border-top: 1px solid #f0f0f0;
}

.cupm-chat-need-person a {
	color: #1B2A4A;
	font-weight: bold;
	text-decoration: none;
}

.cupm-chat-need-person a:hover,
.cupm-chat-need-person a:focus {
	text-decoration: underline;
}

/* Honeypot: hidden from sighted users and assistive tech, but present in
   the DOM for simple bots that auto-fill every input. */
.cupm-chat-hp {
	position: absolute;
	left: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
}

@media (max-width: 480px) {
	#cupm-chat-panel {
		right: 0;
		left: 0;
		bottom: 0;
		width: 100%;
		max-width: 100%;
		height: 100%;
		max-height: 100%;
		border-radius: 0;
	}

	#cupm-chat-toggle {
		right: 14px;
		bottom: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	#cupm-chat-toggle {
		transition: none;
	}
}
