/* Daisy Homecare — "Ask Daisy" chat widget.
   Standalone stylesheet, deliberately scoped under .daisy-chat so it can't
   leak into the rest of the theme's block styles. Brand colours match
   theme.json: primary #006AB9, navy #003F6F, accent #FF9200. */

.daisy-chat {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 9999;
	font-family: 'Poppins', sans-serif;
	font-size: 1rem;
	line-height: 1.5;
}

.daisy-chat__sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Toggle button */

.daisy-chat__toggle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	background: #006AB9;
	color: #ffffff;
	border: none;
	border-radius: 999px;
	padding: 0.85rem 1.25rem;
	box-shadow: 0 4px 16px rgba(0, 63, 111, 0.28);
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.daisy-chat__toggle:hover {
	background: #003F6F;
	transform: translateY(-1px);
}

.daisy-chat__toggle:focus-visible {
	outline: 3px solid #FF9200;
	outline-offset: 2px;
}

.daisy-chat__toggle-icon {
	display: flex;
	align-items: center;
}

.daisy-chat__toggle-icon--close {
	display: none;
}

.daisy-chat--open .daisy-chat__toggle-icon:not(.daisy-chat__toggle-icon--close) {
	display: none;
}

.daisy-chat--open .daisy-chat__toggle-icon--close {
	display: flex;
}

.daisy-chat__toggle-label {
	font-family: 'Raleway', sans-serif;
	font-weight: 600;
	font-size: 0.95rem;
	white-space: nowrap;
}

.daisy-chat--open .daisy-chat__toggle-label {
	display: none;
}

/* Panel */

.daisy-chat__panel {
	position: absolute;
	right: 0;
	bottom: calc(100% + 0.75rem);
	width: 360px;
	max-width: calc(100vw - 2.5rem);
	height: 500px;
	max-height: calc(100vh - 8rem);
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0, 63, 111, 0.22);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.daisy-chat__panel[hidden] {
	display: none;
}

.daisy-chat__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #003F6F;
	color: #ffffff;
	padding: 0.9rem 1rem;
	flex-shrink: 0;
}

.daisy-chat__header-title {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.daisy-chat__header-logo {
	width: 30px;
	height: 30px;
	flex-shrink: 0;
}

.daisy-chat__header-name {
	display: block;
	font-family: 'Raleway', sans-serif;
	font-weight: 700;
	font-size: 1rem;
}

.daisy-chat__header-sub {
	display: block;
	font-size: 0.75rem;
	opacity: 0.85;
}

.daisy-chat__close {
	background: transparent;
	border: none;
	color: #ffffff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.25rem 0.5rem;
	border-radius: 6px;
}

.daisy-chat__close:hover,
.daisy-chat__close:focus-visible {
	background: rgba(255, 255, 255, 0.15);
	outline: none;
}

.daisy-chat__intro {
	font-size: 0.8rem;
	color: #333333;
	background: #F8F9FB;
	padding: 0.65rem 1rem;
	border-bottom: 1px solid #E0E0E0;
	flex-shrink: 0;
}

.daisy-chat__intro a {
	color: #006AB9;
	font-weight: 600;
}

.daisy-chat__messages {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.daisy-chat__msg {
	display: flex;
	flex-direction: column;
	max-width: 85%;
}

.daisy-chat__msg--bot {
	align-self: flex-start;
	align-items: flex-start;
}

.daisy-chat__msg--user {
	align-self: flex-end;
	align-items: flex-end;
}

.daisy-chat__bubble {
	padding: 0.6rem 0.85rem;
	border-radius: 14px;
	font-size: 0.92rem;
	white-space: pre-wrap;
	word-break: break-word;
}

.daisy-chat__msg--bot .daisy-chat__bubble {
	background: #F8F9FB;
	color: #333333;
	border-bottom-left-radius: 4px;
}

.daisy-chat__msg--user .daisy-chat__bubble {
	background: #006AB9;
	color: #ffffff;
	border-bottom-right-radius: 4px;
}

.daisy-chat__msg-link {
	margin-top: 0.3rem;
	font-size: 0.78rem;
}

.daisy-chat__msg-link a {
	color: #006AB9;
	font-weight: 600;
}

.daisy-chat__typing-dots {
	display: flex;
	gap: 4px;
	padding: 0.75rem 0.9rem;
}

.daisy-chat__typing-dots span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #9AA5B1;
	animation: daisy-chat-bounce 1.1s infinite ease-in-out;
}

.daisy-chat__typing-dots span:nth-child(2) {
	animation-delay: 0.15s;
}

.daisy-chat__typing-dots span:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes daisy-chat-bounce {
	0%, 60%, 100% {
		transform: translateY(0);
		opacity: 0.5;
	}
	30% {
		transform: translateY(-4px);
		opacity: 1;
	}
}

.daisy-chat__form {
	display: flex;
	gap: 0.5rem;
	padding: 0.75rem;
	border-top: 1px solid #E0E0E0;
	flex-shrink: 0;
}

.daisy-chat__input {
	flex: 1 1 auto;
	border: 1px solid #E0E0E0;
	border-radius: 999px;
	padding: 0.55rem 1rem;
	font-family: inherit;
	font-size: 0.9rem;
	color: #333333;
}

.daisy-chat__input:focus-visible {
	outline: none;
	border-color: #006AB9;
	box-shadow: 0 0 0 3px rgba(0, 106, 185, 0.15);
}

.daisy-chat__send {
	background: #FF9200;
	color: #ffffff;
	border: none;
	border-radius: 999px;
	padding: 0.55rem 1.1rem;
	font-family: 'Raleway', sans-serif;
	font-weight: 600;
	font-size: 0.85rem;
	cursor: pointer;
	flex-shrink: 0;
}

.daisy-chat__send:hover {
	background: #e08400;
}

.daisy-chat__send:disabled,
.daisy-chat__input:disabled {
	opacity: 0.6;
	cursor: default;
}

@media (max-width: 480px) {
	.daisy-chat {
		right: 0.75rem;
		bottom: 0.75rem;
	}

	.daisy-chat__panel {
		width: calc(100vw - 1.5rem);
		height: calc(100vh - 6.5rem);
	}

	.daisy-chat__toggle-label {
		display: none;
	}

	.daisy-chat__toggle {
		padding: 0.85rem;
	}
}
