/* Meiova Lina Widget — Faithful Scheme 3 Visual Design & Safe Perimeter Styles */

/* Fix 1280x800 footer Medical disclaimer overlap: ensure >= 34px bottom clearance below footer links */
footer.site-footer,
#footer {
	padding-bottom: 108px !important;
}

.meiova-lina-root {
	font-family: Manrope, Arial, sans-serif;
	color: #27212c;
	position: relative;
	z-index: 120;
}

.meiova-lina-root [hidden] {
	display: none !important;
}

/* Floating launcher pill */
.mc-fab {
	position: fixed;
	right: 22px;
	bottom: 20px;
	z-index: 125;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 10px 20px;
	border-radius: 999px;
	background: #27212c;
	color: #ffffff;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.01em;
	border: 1px solid #27212c;
	box-shadow: 0 10px 28px rgba(39, 33, 44, 0.18);
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.mc-fab:hover {
	background: #3d3544;
	transform: translateY(-1px);
}

.mc-fab-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #d8c8f0;
	flex: none;
}

/* Slide-over conversation drawer */
.mc-drawer {
	position: fixed;
	right: 22px;
	bottom: 20px;
	z-index: 130;
	width: min(430px, calc(100vw - 24px));
	height: min(690px, calc(100dvh - 36px));
	background: #ffffff;
	border: 1px solid #dbd7df;
	border-radius: 20px;
	box-shadow: 0 24px 64px rgba(39, 33, 44, 0.2);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.mc-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 14px;
	background: #faf6ef;
	border-bottom: 1px solid #dbd7df;
	flex: none;
}

.mc-title-group {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.mc-title {
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: #27212c;
	line-height: 1.25;
}

.mc-sub {
	font-size: 11px;
	color: #6b6570;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mc-head-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: none;
}

.mc-icon-btn {
	min-width: 44px;
	min-height: 44px;
	padding: 0 10px;
	border-radius: 999px;
	border: 1px solid #dbd7df;
	background: #ffffff;
	color: #27212c;
	font-size: 12px;
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.mc-icon-btn:hover {
	background: #f7f5f0;
}

/* Account & Session Ribbon */
.mc-session-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	padding: 8px 14px;
	background: #ffffff;
	border-bottom: 1px solid #dbd7df;
	font-size: 11px;
	color: #6b6570;
	flex-wrap: wrap;
}

.mc-session-select {
	font: inherit;
	font-size: 12px;
	color: #27212c;
	background: #f7f5f0;
	border: 1px solid #dbd7df;
	border-radius: 999px;
	padding: 4px 10px;
	min-height: 36px;
	max-width: 170px;
}

.mc-mini-btn {
	min-height: 36px;
	padding: 5px 10px;
	border-radius: 999px;
	border: 1px solid #dbd7df;
	background: #faf6ef;
	color: #27212c;
	font-size: 11px;
	cursor: pointer;
}

/* Conversation scroll region */
.mc-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #ffffff;
}

/* LD-1 Soft First-Open AI Notice Card */
.mc-ld1-card {
	background: #faf6ef;
	border: 1px solid #dbd7df;
	border-radius: 14px;
	padding: 12px 14px;
	font-size: 12px;
	line-height: 1.5;
	color: #27212c;
}

.mc-ld1-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 8px;
}

.mc-link-btn {
	background: transparent;
	border: 0;
	padding: 4px 0;
	color: #27212c;
	font-size: 12px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* Chat bubbles */
.mc-msg {
	max-width: 90%;
	padding: 11px 14px;
	border-radius: 16px;
	font-size: 14px;
	line-height: 1.55;
	word-break: break-word;
	white-space: pre-wrap;
}

.mc-msg.user {
	align-self: flex-end;
	background: #27212c;
	color: #ffffff;
	border-bottom-right-radius: 4px;
}

.mc-msg.assistant {
	align-self: flex-start;
	background: #f7f5f0;
	color: #27212c;
	border: 1px solid #dbd7df;
	border-bottom-left-radius: 4px;
}

.mc-msg.emergency {
	align-self: stretch;
	max-width: 100%;
	background: #fef2f2;
	border: 1px solid #a02924;
	color: #27212c;
}

.mc-ld3-note {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px dashed #dbd7df;
	font-size: 11px;
	color: #6b6570;
}

/* Quick chips */
.mc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}

.mc-chip {
	min-height: 44px;
	padding: 8px 13px;
	border-radius: 999px;
	border: 1px solid #dbd7df;
	background: #ffffff;
	color: #27212c;
	font-size: 12px;
	text-align: left;
	cursor: pointer;
}

.mc-chip:hover {
	background: #faf6ef;
	border-color: #27212c;
}

.mc-chip.danger {
	border-color: #a02924;
	color: #a02924;
	font-weight: 600;
}

/* HITL Confirm Card & Auth Card */
.mc-card {
	background: #faf6ef;
	border: 1px solid #dbd7df;
	border-radius: 14px;
	padding: 14px;
	font-size: 13px;
}

.mc-card h4 {
	margin: 0 0 6px;
	font-family: Editorial, Georgia, serif;
	font-size: 20px;
	font-weight: 400;
	color: #27212c;
}

.mc-card-btn {
	width: 100%;
	min-height: 44px;
	margin-top: 8px;
	padding: 10px 14px;
	border-radius: 999px;
	border: 1px solid #27212c;
	background: #27212c;
	color: #ffffff;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-decoration: none;
}

.mc-card-btn.secondary {
	background: #ffffff;
	color: #27212c;
}

.mc-card-btn.danger {
	background: #a02924;
	border-color: #a02924;
	color: #ffffff;
}

.mc-card-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.mc-input-field {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid #dbd7df;
	background: #ffffff;
	color: #27212c;
	font: inherit;
	font-size: 16px;
	margin-top: 8px;
}

/* Voice dictionary correction pill strip */
.mc-voice-strip {
	padding: 8px 14px;
	background: #faf6ef;
	border-top: 1px solid #dbd7df;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	color: #27212c;
}

.mc-voice-pill {
	min-height: 36px;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid #27212c;
	background: #ffffff;
	color: #27212c;
	font-size: 11px;
	cursor: pointer;
}

/* Composer + LD-2 footer */
.mc-foot {
	padding: 10px 14px 12px;
	border-top: 1px solid #dbd7df;
	background: #ffffff;
	flex: none;
}

.mc-compose-row {
	display: flex;
	align-items: flex-end;
	gap: 8px;
}

#lina-input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 44px;
	max-height: 110px;
	resize: none;
	padding: 10px 12px;
	border: 1px solid #dbd7df;
	border-radius: 14px;
	font-family: inherit;
	font-size: 16px !important;
	line-height: 1.4;
	color: #27212c;
	background: #ffffff;
}

#lina-input:focus {
	outline: 2px solid #27212c;
	outline-offset: 1px;
}

.mc-send-btn {
	min-width: 44px;
	min-height: 44px;
	padding: 0 14px;
	border-radius: 999px;
	border: 0;
	background: #27212c;
	color: #ffffff;
	font-size: 13px;
	cursor: pointer;
	flex: none;
}

.mc-send-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.mc-ptt-btn {
	min-width: 44px;
	min-height: 44px;
	padding: 0 10px;
	border-radius: 999px;
	border: 1px solid #dbd7df;
	background: #faf6ef;
	color: #27212c;
	font-size: 12px;
	cursor: pointer;
	flex: none;
}

.mc-ptt-btn.listening {
	background: #a02924;
	border-color: #a02924;
	color: #ffffff;
}

.mc-ld2-footer {
	margin-top: 7px;
	font-size: 11px;
	line-height: 1.35;
	color: #6b6570;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
}

/* LD-4 Modal Dialog */
dialog.mc-ld4-dialog {
	width: min(560px, calc(100vw - 24px));
	max-width: 560px;
	padding: 28px 24px;
	border: 1px solid #dbd7df;
	border-radius: 18px;
	background: #ffffff;
	color: #27212c;
	z-index: 200;
}

dialog.mc-ld4-dialog::backdrop {
	background: rgba(39, 33, 44, 0.55);
	backdrop-filter: blur(6px);
}

dialog.mc-ld4-dialog h2 {
	font-family: Editorial, Georgia, serif;
	font-size: 32px;
	line-height: 1.15;
	margin: 0 0 14px;
}

dialog.mc-ld4-dialog ul {
	margin: 12px 0 18px;
	padding-left: 18px;
}

dialog.mc-ld4-dialog li {
	margin-bottom: 10px;
	font-size: 13px;
	line-height: 1.55;
}

@media (max-width: 600px) {
	.mc-drawer {
		right: 0;
		left: 0;
		bottom: 0;
		width: 100%;
		max-width: 100vw;
		height: min(92dvh, 100dvh);
		border-radius: 18px 18px 0 0;
		border-left: 0;
		border-right: 0;
		border-bottom: 0;
	}
	.mc-fab {
		right: 14px;
		bottom: 14px;
	}
}
