/**
 * Chatbot Drawer — Premium Boutique Hotel Aesthetic
 *
 * Warm bronze/cream palette, serif typography, slide-in drawer.
 * Desktop: fixed right-edge tab + 420px drawer.
 * Mobile: FAB + full-screen slide-up sheet.
 *
 * @package HRAIEnhancer
 */

/* ==========================================================================
   Design Tokens
   ========================================================================== */

:root {
	--hrc-bronze: #B08968;
	--hrc-bronze-light: #C9A882;
	--hrc-bronze-dark: #8C6D52;
	--hrc-cream: #FAF7F2;
	--hrc-cream-dark: #F0EBE3;
	--hrc-charcoal: #2C2C2C;
	--hrc-warm-gray: #6B6358;
	--hrc-border: #E8E0D6;
	--hrc-glow: rgba(176, 137, 104, 0.25);
	--hrc-serif: Georgia, 'Times New Roman', 'Palatino Linotype', serif;
	--hrc-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--hrc-radius: 14px;
	--hrc-shadow: 0 12px 40px rgba(44, 44, 44, 0.12), 0 4px 12px rgba(44, 44, 44, 0.06);
	--hrc-shadow-lg: 0 24px 80px rgba(44, 44, 44, 0.16), 0 8px 24px rgba(44, 44, 44, 0.08);
}

/* ==========================================================================
   Keyframe Animations
   ========================================================================== */

@keyframes hrChatFadeInUp {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes hrChatBounce {
	0%, 80%, 100% {
		transform: translateY(0);
	}
	40% {
		transform: translateY(-8px);
	}
}

@keyframes hrChatMicPulse {
	0%, 100% {
		box-shadow: 0 0 0 0 var(--hrc-glow);
	}
	50% {
		box-shadow: 0 0 0 8px transparent;
	}
}

@keyframes hrChatSpin {
	to { transform: rotate(360deg); }
}

@keyframes hrChatPreloaderDots {
	0%, 20%   { content: ''; }
	40%       { content: '.'; }
	60%       { content: '..'; }
	80%, 100% { content: '...'; }
}

/* ==========================================================================
   1. Desktop Tab — Collapsed Trigger
   ========================================================================== */

.hr-chat-tab {
	position: fixed;
	right: 0;
	bottom: 25%;
	width: 64px;
	height: 82px;
	background: linear-gradient(135deg, var(--hrc-bronze) 0%, var(--hrc-bronze-dark) 100%);
	color: #fff;
	border-radius: 44px 0 0 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 999999;
	border: none;
	padding: 0 6px 0 12px;
	transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1),
	            transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: -4px 4px 16px rgba(44, 44, 44, 0.18),
	            -1px 0 4px rgba(44, 44, 44, 0.08),
	            inset 1px 0 0 rgba(255, 255, 255, 0.10);
}

/* Tab slides left with the drawer when open */
.hr-chat-tab.hr-chat-tab-open {
	right: 420px;
}

.hr-chat-tab:hover {
	box-shadow: -6px 4px 22px var(--hrc-glow),
	            -2px 0 8px rgba(44, 44, 44, 0.14),
	            inset 1px 0 0 rgba(255, 255, 255, 0.12);
}

.hr-chat-tab:hover .hr-chat-tab-icon {
	transform: scale(1.12);
}

.hr-chat-tab:focus-visible {
	outline: 2px solid var(--hrc-bronze-light);
	outline-offset: 2px;
}

.hr-chat-tab-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	transform-origin: center;
}

.hr-chat-tab-icon svg {
	width: 100%;
	height: 100%;
	display: block;
	filter: drop-shadow(0 1px 2px rgba(44, 44, 44, 0.25));
}

/* ----- Tab Tooltip ----- */

.hr-chat-tab-tooltip {
	position: absolute;
	right: calc(100% + 14px);
	top: 50%;
	transform: translateY(-50%) translateX(6px);
	background: var(--hrc-charcoal);
	color: #fff;
	padding: 10px 14px;
	border-radius: 10px;
	font-family: var(--hrc-sans);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	white-space: normal;
	width: max-content;
	max-width: 260px;
	box-shadow: 0 8px 24px rgba(44, 44, 44, 0.18),
	            0 2px 6px rgba(44, 44, 44, 0.10);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 1;
}

/* Arrow pointing right toward the tab */
.hr-chat-tab-tooltip::after {
	content: '';
	position: absolute;
	left: 100%;
	top: 50%;
	transform: translateY(-50%);
	border-width: 6px 0 6px 7px;
	border-style: solid;
	border-color: transparent transparent transparent var(--hrc-charcoal);
}

/* Show on hover/focus OR when JS adds the auto class */
.hr-chat-tab:hover .hr-chat-tab-tooltip,
.hr-chat-tab:focus-visible .hr-chat-tab-tooltip,
.hr-chat-tab.hr-chat-tab-tooltip-auto .hr-chat-tab-tooltip {
	opacity: 1;
	transform: translateY(-50%) translateX(0);
}

/* Hide tooltip entirely when drawer is open */
.hr-chat-tab.hr-chat-tab-open .hr-chat-tab-tooltip {
	display: none;
}

/* ==========================================================================
   2. Desktop Drawer
   ========================================================================== */

.hr-chat-drawer {
	position: fixed;
	right: 0;
	bottom: 10%;
	transform: translateX(100%);
	width: 420px;
	height: 70vh;
	max-height: 700px;
	min-height: 400px;
	background: var(--hrc-cream);
	border-radius: 16px 0 0 16px;
	box-shadow: var(--hrc-shadow-lg);
	z-index: 999998;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	pointer-events: none;
	visibility: hidden;
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
	            visibility 0s linear 0.35s;
}

.hr-chat-drawer.hr-chat-open {
	transform: translateX(0);
	pointer-events: auto;
	visibility: visible;
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
	            visibility 0s linear 0s;
}

/* Overlay behind drawer — click to close */
.hr-chat-overlay {
	position: fixed;
	inset: 0;
	z-index: 999997;
	background: rgba(44, 44, 44, 0);
	pointer-events: none;
	transition: background 0.35s ease;
}

.hr-chat-overlay.hr-chat-overlay-visible {
	background: rgba(44, 44, 44, 0.15);
	pointer-events: auto;
}

/* ==========================================================================
   3. Drawer Header
   ========================================================================== */

.hr-chat-header {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--hrc-border);
	background: #fff;
	border-radius: 16px 0 0 0;
	flex-shrink: 0;
}

.hr-chat-header-name {
	font-family: var(--hrc-serif);
	font-size: 16px;
	font-weight: 600;
	color: var(--hrc-charcoal);
	line-height: 1.3;
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Bronze presence dot */
.hr-chat-header-name::before {
	content: '';
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--hrc-bronze);
	flex-shrink: 0;
}

.hr-chat-header-subtitle {
	font-family: var(--hrc-sans);
	font-size: 12px;
	color: var(--hrc-warm-gray);
	margin-top: 2px;
}

.hr-chat-header-info {
	display: flex;
	flex-direction: column;
}

.hr-chat-header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.hr-chat-reset-btn {
	font-family: var(--hrc-sans);
	font-size: 11px;
	color: var(--hrc-warm-gray);
	background: transparent;
	border: 1px solid var(--hrc-border);
	border-radius: 14px;
	padding: 4px 12px;
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
	white-space: nowrap;
}

.hr-chat-reset-btn:hover {
	color: var(--hrc-bronze-dark);
	border-color: var(--hrc-bronze-light);
	background: var(--hrc-cream);
}

.hr-chat-reset-btn:focus-visible {
	outline: 2px solid var(--hrc-bronze);
	outline-offset: 2px;
}

.hr-chat-close-btn {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: transparent;
	border: none;
	color: var(--hrc-warm-gray);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.15s ease, color 0.15s ease;
	padding: 0;
}

.hr-chat-close-btn:hover {
	background: var(--hrc-cream-dark);
	color: var(--hrc-charcoal);
}

.hr-chat-close-btn:focus-visible {
	outline: 2px solid var(--hrc-bronze);
	outline-offset: 2px;
	box-shadow: 0 0 0 4px var(--hrc-glow);
}

.hr-chat-close-btn svg {
	width: 16px;
	height: 16px;
	pointer-events: none;
}

/* ==========================================================================
   4. Message Area
   ========================================================================== */

.hr-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 20px 16px;
	scroll-behavior: smooth;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Webkit custom scrollbar */
.hr-chat-messages::-webkit-scrollbar {
	width: 4px;
}

.hr-chat-messages::-webkit-scrollbar-track {
	background: transparent;
}

.hr-chat-messages::-webkit-scrollbar-thumb {
	background: rgba(176, 137, 104, 0.3);
	border-radius: 4px;
}

.hr-chat-messages::-webkit-scrollbar-thumb:hover {
	background: rgba(176, 137, 104, 0.55);
}

/* Firefox */
.hr-chat-messages {
	scrollbar-width: thin;
	scrollbar-color: rgba(176, 137, 104, 0.3) transparent;
}

/* ==========================================================================
   5. Chat Bubbles
   ========================================================================== */

.hr-chat-bubble-user,
.hr-chat-bubble-assistant {
	max-width: 85%;
	word-break: break-word;
	overflow-wrap: break-word;
}

/* User bubble */
.hr-chat-bubble-user {
	background: var(--hrc-bronze);
	color: #fff;
	border-radius: 16px 16px 4px 16px;
	align-self: flex-end;
	padding: 10px 16px;
	font-family: var(--hrc-sans);
	font-size: 14px;
	line-height: 1.5;
}

/* Assistant bubble */
.hr-chat-bubble-assistant {
	background: #fff;
	border: 1px solid var(--hrc-border);
	color: var(--hrc-charcoal);
	border-radius: 16px 16px 16px 4px;
	align-self: flex-start;
	padding: 12px 16px;
	font-family: var(--hrc-serif);
	font-size: 14px;
	line-height: 1.6;
}

.hr-chat-bubble-assistant p {
	margin: 0 0 8px;
}

.hr-chat-bubble-assistant p:last-child {
	margin-bottom: 0;
}

.hr-chat-bubble-assistant strong {
	color: var(--hrc-bronze-dark);
	font-weight: 700;
}

.hr-chat-bubble-assistant a {
	color: var(--hrc-bronze);
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color 0.15s ease;
}

.hr-chat-bubble-assistant a:hover {
	color: var(--hrc-bronze-dark);
}

/* Bubble entrance animation */
.hr-chat-bubble-enter {
	animation: hrChatFadeInUp 0.3s ease forwards;
}

/* ==========================================================================
   6. Typing Indicator
   ========================================================================== */

.hr-chat-typing {
	background: #fff;
	border: 1px solid var(--hrc-border);
	border-radius: 16px 16px 16px 4px;
	align-self: flex-start;
	padding: 14px 18px;
	display: flex;
	align-items: center;
	gap: 5px;
}

.hr-chat-typing span {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--hrc-bronze-light);
	opacity: 0.4;
	animation: hrChatBounce 1.2s ease-in-out infinite;
}

.hr-chat-typing span:nth-child(1) {
	animation-delay: 0s;
}

.hr-chat-typing span:nth-child(2) {
	animation-delay: 0.15s;
}

.hr-chat-typing span:nth-child(3) {
	animation-delay: 0.3s;
}

/* ==========================================================================
   7. Property Cards
   ========================================================================== */

.hr-chat-cards {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 8px 0 4px;
	margin-top: 10px;
}

.hr-chat-card {
	background: #fff;
	border: 1px solid var(--hrc-border);
	border-radius: 10px;
	overflow: hidden;
	cursor: pointer;
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: row;
	align-items: stretch;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hr-chat-card:hover {
	transform: translateY(-1px);
	box-shadow: var(--hrc-shadow);
}

.hr-chat-card:focus-visible {
	outline: 2px solid var(--hrc-bronze);
	outline-offset: 2px;
	box-shadow: 0 0 0 4px var(--hrc-glow);
}

.hr-chat-card-thumb {
	width: 25%;
	min-width: 72px;
	max-width: 90px;
	object-fit: cover;
	display: block;
	flex-shrink: 0;
}

.hr-chat-card-body {
	padding: 8px 12px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	flex: 1;
}

.hr-chat-card-title {
	font-family: var(--hrc-serif);
	font-size: 13px;
	font-weight: 600;
	color: var(--hrc-charcoal);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.hr-chat-card-meta {
	display: flex;
	align-items: center;
	margin-top: 3px;
	font-size: 12px;
	gap: 8px;
}

.hr-chat-card-price {
	color: var(--hrc-bronze);
	font-weight: 700;
	font-family: var(--hrc-sans);
	white-space: nowrap;
}

.hr-chat-card-detail {
	color: var(--hrc-warm-gray);
	font-family: var(--hrc-sans);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* View all results link */
.hr-chat-view-all {
	display: block;
	margin-top: 10px;
	padding: 8px 0;
	font-family: var(--hrc-sans);
	font-size: 13px;
	font-weight: 600;
	color: var(--hrc-bronze);
	text-decoration: none;
	text-align: center;
	border-top: 1px solid var(--hrc-border);
	transition: color 0.15s ease;
}

.hr-chat-view-all:hover {
	color: var(--hrc-bronze-dark);
}

/* ==========================================================================
   8. Suggestion Chips
   ========================================================================== */

.hr-chat-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.hr-chat-chip {
	background: #fff;
	border: 1px solid var(--hrc-border);
	border-radius: 20px;
	padding: 6px 14px;
	font-family: var(--hrc-sans);
	font-size: 13px;
	color: var(--hrc-charcoal);
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
	line-height: 1.4;
}

.hr-chat-chip:hover {
	background: var(--hrc-cream-dark);
	border-color: var(--hrc-bronze-light);
}

.hr-chat-chip:focus-visible {
	outline: 2px solid var(--hrc-bronze);
	outline-offset: 2px;
	box-shadow: 0 0 0 4px var(--hrc-glow);
}

/* ==========================================================================
   9. Input Area
   ========================================================================== */

.hr-chat-input-area {
	flex: none;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	border-top: 1px solid var(--hrc-border);
	background: #fff;
	border-radius: 0 0 0 16px;
}

.hr-chat-input {
	flex: 1;
	border: 1px solid var(--hrc-border);
	border-radius: 22px;
	padding: 10px 16px;
	font-family: var(--hrc-sans);
	font-size: 14px;
	background: var(--hrc-cream);
	color: var(--hrc-charcoal);
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	line-height: 1.4;
	/* Prevent iOS zoom on focus */
	-webkit-appearance: none;
}

.hr-chat-input::placeholder {
	color: var(--hrc-warm-gray);
	opacity: 0.6;
}

.hr-chat-input:focus {
	border-color: var(--hrc-bronze);
	box-shadow: 0 0 0 2px var(--hrc-glow);
}

/* Mic button */
.hr-chat-mic-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: transparent;
	border: 1px solid var(--hrc-border);
	color: var(--hrc-warm-gray);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	padding: 0;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hr-chat-mic-btn:hover {
	background: var(--hrc-cream-dark);
	color: var(--hrc-bronze);
}

.hr-chat-mic-btn:focus-visible {
	outline: 2px solid var(--hrc-bronze);
	outline-offset: 2px;
	box-shadow: 0 0 0 4px var(--hrc-glow);
}

.hr-chat-mic-btn svg {
	width: 16px;
	height: 16px;
	pointer-events: none;
}

.hr-chat-mic-btn.hr-chat-mic-active {
	background: var(--hrc-bronze);
	color: #fff;
	border-color: transparent;
	animation: hrChatMicPulse 1.4s ease-in-out infinite;
}

/* Send button */
.hr-chat-send-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--hrc-bronze) 0%, var(--hrc-bronze-dark) 100%);
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	padding: 0;
	transition: transform 0.15s ease, opacity 0.2s ease;
}

.hr-chat-send-btn:hover {
	transform: scale(1.05);
}

.hr-chat-send-btn:focus-visible {
	outline: 2px solid var(--hrc-bronze-light);
	outline-offset: 2px;
	box-shadow: 0 0 0 4px var(--hrc-glow);
}

.hr-chat-send-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	transform: none;
}

.hr-chat-send-btn svg {
	width: 16px;
	height: 16px;
	pointer-events: none;
}

/* ==========================================================================
   10. Mobile FAB (default hidden; shown ≤768px)
   ========================================================================== */

.hr-chat-fab {
	display: none;
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--hrc-bronze) 0%, var(--hrc-bronze-dark) 100%);
	color: #fff;
	border: none;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	box-shadow: var(--hrc-shadow);
	z-index: 999997;
	transition: transform 0.2s ease;
	padding: 0;
}

.hr-chat-fab:hover {
	transform: scale(1.08);
}

.hr-chat-fab:focus-visible {
	outline: 2px solid var(--hrc-bronze-light);
	outline-offset: 3px;
	box-shadow: 0 0 0 5px var(--hrc-glow);
}

.hr-chat-fab svg {
	width: 24px;
	height: 24px;
	pointer-events: none;
}

/* ==========================================================================
   12. Navigation Preloader
   Fullscreen overlay shown while navigating from chat to the explorer page.
   ========================================================================== */

.hr-chat-preloader {
	position: fixed;
	inset: 0;
	z-index: 9999999;
	background: rgba(250, 247, 242, 0.97);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease;
}

.hr-chat-preloader.hr-chat-preloader-visible {
	opacity: 1;
	pointer-events: auto;
}

.hr-chat-preloader-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	padding: 0 24px;
	text-align: center;
}

.hr-chat-preloader-spinner {
	width: 54px;
	height: 54px;
	border: 3px solid rgba(176, 137, 104, 0.20);
	border-top-color: var(--hrc-bronze);
	border-radius: 50%;
	animation: hrChatSpin 0.9s linear infinite;
}

.hr-chat-preloader-text {
	font-family: var(--hrc-serif);
	font-size: 18px;
	font-style: italic;
	color: var(--hrc-warm-gray);
	letter-spacing: 0.01em;
}

.hr-chat-preloader-text::after {
	content: '';
	display: inline-block;
	width: 1.2em;
	text-align: left;
	animation: hrChatPreloaderDots 1.4s steps(4, end) infinite;
}

@media (prefers-reduced-motion: reduce) {
	.hr-chat-preloader-spinner {
		animation: none;
		border-top-color: rgba(176, 137, 104, 0.20);
	}
	.hr-chat-preloader-text::after {
		animation: none;
		content: '...';
	}
}

/* ==========================================================================
   13. Toast Notification
   ========================================================================== */

.hr-chat-toast {
	position: absolute;
	bottom: 70px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--hrc-charcoal);
	color: #fff;
	padding: 8px 16px;
	border-radius: 8px;
	font-family: var(--hrc-sans);
	font-size: 13px;
	line-height: 1.4;
	white-space: nowrap;
	z-index: 10;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.hr-chat-toast.hr-chat-toast-visible {
	opacity: 1;
	pointer-events: auto;
}

.hr-chat-toast-undo {
	background: none;
	border: none;
	color: var(--hrc-accent, #4dabf7);
	font-weight: 600;
	font-size: 13px;
	font-family: var(--hrc-sans);
	cursor: pointer;
	margin-left: 10px;
	padding: 0;
	text-decoration: underline;
}

/* ==========================================================================
   11. Desktop — hide FAB, show tab (>768px)
   ========================================================================== */

@media (min-width: 769px) {
	.hr-chat-fab {
		display: none !important;
	}

	.hr-chat-tab {
		display: flex;
	}
}

/* ==========================================================================
   10. Mobile — full-screen slide-up drawer (≤768px)
   ========================================================================== */

@media (max-width: 768px) {
	/* Hide desktop tab on mobile */
	.hr-chat-tab {
		display: none !important;
	}

	/* Show FAB */
	.hr-chat-fab {
		display: flex;
	}

	/* Full-screen drawer */
	.hr-chat-drawer {
		position: fixed;
		inset: 0;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		width: 100%;
		height: 100%;
		max-height: none;
		min-height: 0;
		border-radius: 0;
		/* Slide up from bottom instead of right */
		transform: translateY(100%);
		transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
		            visibility 0s linear 0.35s;
	}

	.hr-chat-drawer.hr-chat-open {
		transform: translateY(0);
		transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
		            visibility 0s linear 0s;
	}

	/* Safe area adjustments */
	.hr-chat-header {
		border-radius: 0;
		padding-top: calc(16px + env(safe-area-inset-top));
	}

	.hr-chat-input-area {
		border-radius: 0;
		padding-bottom: calc(12px + env(safe-area-inset-bottom));
	}
}

/* ==========================================================================
   14. Accessibility — Focus & Reduced Motion
   ========================================================================== */

/* Consistent focus ring for all interactive elements */
.hr-chat-tab:focus-visible,
.hr-chat-close-btn:focus-visible,
.hr-chat-chip:focus-visible,
.hr-chat-card:focus-visible,
.hr-chat-mic-btn:focus-visible,
.hr-chat-send-btn:focus-visible,
.hr-chat-fab:focus-visible {
	outline: 2px solid var(--hrc-bronze);
	outline-offset: 2px;
	box-shadow: 0 0 0 4px var(--hrc-glow);
}

/* Input uses inset glow instead of outline */
.hr-chat-input:focus-visible {
	outline: none;
	border-color: var(--hrc-bronze);
	box-shadow: 0 0 0 2px var(--hrc-glow);
}

/* Reduced motion: disable all animations and transitions */
@media (prefers-reduced-motion: reduce) {
	.hr-chat-drawer,
	.hr-chat-tab,
	.hr-chat-fab,
	.hr-chat-close-btn,
	.hr-chat-chip,
	.hr-chat-card,
	.hr-chat-mic-btn,
	.hr-chat-send-btn,
	.hr-chat-input,
	.hr-chat-toast {
		transition: none;
	}

	.hr-chat-bubble-enter {
		animation: none;
		opacity: 1;
		transform: none;
	}

	.hr-chat-typing span {
		animation: none;
		opacity: 0.6;
	}

	.hr-chat-mic-btn.hr-chat-mic-active {
		animation: none;
	}
}
