/**
 * Concierge — Premium Boutique Hotel Aesthetic
 *
 * Warm bronze accent, frosted glass, editorial serif typography.
 * Button lives inside the search input. Popover drops below the form.
 *
 * @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);
}

/* ==========================================================================
   Modal Overlay — Frosted Glass
   ========================================================================== */

.hr-ai-concierge-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(44, 44, 44, 0);
	transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	padding: 24px;
}

.hr-ai-concierge-overlay.hr-ai-concierge-visible {
	background: rgba(44, 44, 44, 0.35);
}

/* ==========================================================================
   Modal Card
   ========================================================================== */

.hr-ai-concierge-modal {
	position: relative;
	background: var(--hrc-cream);
	border-radius: var(--hrc-radius);
	padding: 36px 32px 32px;
	max-width: 400px;
	width: 100%;
	box-shadow: var(--hrc-shadow-lg);
	border: 1px solid var(--hrc-border);
	transform: translateY(24px) scale(0.92);
	opacity: 0;
	transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
	            opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hr-ai-concierge-visible .hr-ai-concierge-modal {
	transform: translateY(0) scale(1);
	opacity: 1;
}

/* Close button — minimal, borderless */
.hr-ai-concierge-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: none !important;
	outline: none !important;
	background: transparent !important;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--hrc-warm-gray);
	transition: color 0.2s ease, background-color 0.2s ease;
	padding: 0;
	margin: 0;
	box-shadow: none !important;
	-webkit-appearance: none;
	appearance: none;
	font-size: 0;
	line-height: 0;
}

.hr-ai-concierge-close:hover {
	background-color: var(--hrc-cream-dark) !important;
	color: var(--hrc-charcoal);
}

.hr-ai-concierge-close:focus {
	outline: none !important;
	box-shadow: none !important;
}

.hr-ai-concierge-close svg {
	flex-shrink: 0;
}

/* Concierge icon — bronze circle with bell */
.hr-ai-concierge-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--hrc-bronze-light) 0%, var(--hrc-bronze) 100%);
	color: #fff;
	margin: 0 auto 18px;
	box-shadow: 0 4px 16px var(--hrc-glow);
}

/* Label */
.hr-ai-concierge-label {
	display: block;
	text-align: center;
	font-family: var(--hrc-sans);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hrc-bronze);
	margin-bottom: 10px;
}

/* Decorative divider */
.hr-ai-concierge-divider {
	width: 32px;
	height: 1px;
	background: var(--hrc-border);
	margin: 0 auto 14px;
}

/* Message — unified editorial serif, boutique hotel note feel */
.hr-ai-concierge-message {
	font-family: var(--hrc-serif);
	font-size: 15px;
	line-height: 1.7;
	color: var(--hrc-charcoal);
	text-align: left;
	margin: 0;
}

.hr-ai-concierge-message p {
	margin: 0 0 14px 0;
}

.hr-ai-concierge-message p:last-child {
	margin-bottom: 0;
}

/* Opening line — warm italic, slightly softer color */
.hr-ai-concierge-message p:first-child {
	font-style: italic;
	color: var(--hrc-warm-gray);
}

.hr-ai-concierge-message strong {
	font-weight: 600;
	color: var(--hrc-bronze-dark);
}

/* ==========================================================================
   Links Inside Concierge Messages
   ========================================================================== */

.hr-ai-concierge-message a,
.hr-ai-concierge-pill-content p a {
	color: var(--hrc-bronze-dark);
	text-decoration: underline;
	text-decoration-color: var(--hrc-bronze-light);
	text-underline-offset: 2px;
	font-style: italic;
	font-weight: 600;
	transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.hr-ai-concierge-message a:hover,
.hr-ai-concierge-pill-content p a:hover {
	color: var(--hrc-bronze);
	text-decoration-color: var(--hrc-bronze);
}

/* ==========================================================================
   Inline Button — Inside the Search Input
   ========================================================================== */

/* Make the input container a positioning context */
.hfse-ai-form-input-container {
	position: relative !important;
}

.hr-ai-concierge-pill {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	animation: hrcBtnEntrance 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes hrcBtnEntrance {
	0% {
		opacity: 0;
		transform: translateY(-50%) scale(0);
	}
	100% {
		opacity: 1;
		transform: translateY(-50%) scale(1);
	}
}

/* The button itself — force circle shape */
button.hr-ai-concierge-pill-toggle,
.hr-ai-concierge-pill .hr-ai-concierge-pill-toggle {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 34px !important;
	height: 34px !important;
	min-width: 34px !important;
	min-height: 34px !important;
	max-width: 34px !important;
	max-height: 34px !important;
	border: none !important;
	border-radius: 50% !important;
	background: linear-gradient(135deg, var(--hrc-bronze-light) 0%, var(--hrc-bronze) 100%) !important;
	color: #fff !important;
	cursor: pointer;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: 0 2px 8px var(--hrc-glow);
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
	            box-shadow 0.25s ease;
	position: relative;
	box-sizing: border-box !important;
	-webkit-appearance: none;
	appearance: none;
	outline: none !important;
	overflow: hidden;
	flex-shrink: 0 !important;
	flex-grow: 0 !important;
}

button.hr-ai-concierge-pill-toggle:hover,
.hr-ai-concierge-pill .hr-ai-concierge-pill-toggle:hover {
	transform: scale(1.1);
	box-shadow: 0 4px 16px var(--hrc-glow), 0 0 0 3px rgba(176, 137, 104, 0.12);
}

button.hr-ai-concierge-pill-toggle:active,
.hr-ai-concierge-pill .hr-ai-concierge-pill-toggle:active {
	transform: scale(0.95);
}

.hr-ai-concierge-pill-toggle svg {
	flex-shrink: 0;
}

/* Active state */
.hr-ai-concierge-pill-open .hr-ai-concierge-pill-toggle {
	background: linear-gradient(135deg, var(--hrc-bronze) 0%, var(--hrc-bronze-dark) 100%) !important;
	box-shadow: 0 2px 12px var(--hrc-glow);
}

/* ==========================================================================
   Popover — Drops Below the Search Form
   ========================================================================== */

.hr-ai-concierge-pill-content {
	position: absolute;
	right: 0;
	top: calc(100% + 12px);
	width: 320px;
	background: var(--hrc-cream);
	border: 1px solid var(--hrc-border);
	border-radius: var(--hrc-radius);
	box-shadow: var(--hrc-shadow);
	padding: 20px 22px 18px;
	transform-origin: top right;
}

/* Popover arrow */
.hr-ai-concierge-pill-content::before {
	content: '';
	position: absolute;
	top: -6px;
	right: 14px;
	width: 12px;
	height: 12px;
	background: var(--hrc-cream);
	border-top: 1px solid var(--hrc-border);
	border-left: 1px solid var(--hrc-border);
	transform: rotate(45deg);
}

/* Popover label */
.hr-ai-concierge-popover-label {
	font-family: var(--hrc-sans);
	font-size: 9px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--hrc-bronze);
	margin: 0 0 6px 0;
}

/* Popover divider */
.hr-ai-concierge-popover-divider {
	width: 24px;
	height: 1px;
	background: var(--hrc-border);
	margin-bottom: 10px;
}

/* Popover message */
.hr-ai-concierge-pill-content p {
	font-family: var(--hrc-serif);
	font-size: 14px;
	line-height: 1.6;
	color: var(--hrc-charcoal);
	margin: 0;
	font-style: italic;
}

/* ==========================================================================
   Loading State — Concierge Thinking
   ========================================================================== */

/* Icon breathing glow while AI composes the response */
.hr-ai-concierge-icon-loading {
	animation: hrcIconBreathe 2.4s ease-in-out infinite;
}

@keyframes hrcIconBreathe {
	0%, 100% {
		box-shadow: 0 4px 16px var(--hrc-glow);
	}
	50% {
		box-shadow: 0 6px 28px rgba(176, 137, 104, 0.35),
		            0 0 0 10px rgba(176, 137, 104, 0.06);
	}
}

/* Loading container — shared layout */
.hr-ai-concierge-loading {
	text-align: center;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.hr-ai-concierge-loading-exit {
	opacity: 0;
	transform: translateY(-8px);
	pointer-events: none;
}

/* Flowing dots — gentle sine wave, not a bounce */
.hr-ai-concierge-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 14px;
}

.hr-ai-concierge-dots span {
	display: block;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: var(--hrc-bronze);
	opacity: 0.3;
	animation: hrcDotFlow 1.4s ease-in-out infinite;
}

.hr-ai-concierge-dots span:nth-child(2) {
	animation-delay: 0.2s;
}

.hr-ai-concierge-dots span:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes hrcDotFlow {
	0%, 100% {
		transform: translateY(0);
		opacity: 0.3;
	}
	50% {
		transform: translateY(-6px);
		opacity: 1;
	}
}

/* Rotating loading text */
.hr-ai-concierge-loading-text {
	font-family: var(--hrc-serif);
	font-size: 14px;
	line-height: 1.5;
	color: var(--hrc-warm-gray);
	text-align: center;
	margin: 0;
	font-style: italic;
	transition: opacity 0.3s ease;
}

.hr-ai-concierge-loading-text-out {
	opacity: 0;
}

/* Message entrance after loading resolves */
.hr-ai-concierge-message-entering {
	opacity: 0;
	transform: translateY(8px);
}

.hr-ai-concierge-message-revealed {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.45s ease, transform 0.45s ease;
}

/* ==========================================================================
   Date Alternatives — "Also Available" Chips
   ========================================================================== */

.hr-ai-concierge-alts {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--hrc-border);
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.hr-ai-concierge-alts-revealed {
	opacity: 1;
	transform: translateY(0);
}

.hr-ai-concierge-alts-label {
	font-family: var(--hrc-sans);
	font-size: 9px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--hrc-bronze);
	margin-bottom: 10px;
}

.hr-ai-concierge-alts-chips {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

/* Individual date chip */
button.hr-ai-concierge-alt-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 7px 14px;
	border: 1.5px solid var(--hrc-bronze-light);
	border-radius: 20px;
	background: transparent;
	color: var(--hrc-charcoal);
	font-family: var(--hrc-sans);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
	            transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
	-webkit-appearance: none;
	appearance: none;
	outline: none;
	animation: hrcChipEntrance 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

button.hr-ai-concierge-alt-chip:nth-child(2) {
	animation-delay: 0.1s;
}

button.hr-ai-concierge-alt-chip:hover {
	background: linear-gradient(135deg, var(--hrc-bronze-light) 0%, var(--hrc-bronze) 100%);
	color: #fff;
	border-color: var(--hrc-bronze);
	transform: translateY(-1px);
}

button.hr-ai-concierge-alt-chip:active {
	transform: scale(0.97);
}

.hr-ai-concierge-alt-count {
	font-weight: 400;
	opacity: 0.65;
	font-size: 12px;
}

button.hr-ai-concierge-alt-chip:hover .hr-ai-concierge-alt-count {
	opacity: 0.85;
}

@keyframes hrcChipEntrance {
	0% {
		opacity: 0;
		transform: translateY(6px) scale(0.9);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* Mini loading dots — smaller version of the main dots */
.hr-ai-concierge-alts-loading {
	display: flex;
	align-items: center;
	gap: 6px;
}

.hr-ai-concierge-dots-mini {
	display: inline-flex;
	gap: 4px;
}

.hr-ai-concierge-dots-mini span {
	display: block;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: var(--hrc-bronze);
	opacity: 0.3;
	animation: hrcDotFlow 1.4s ease-in-out infinite;
}

.hr-ai-concierge-dots-mini span:nth-child(2) {
	animation-delay: 0.2s;
}

.hr-ai-concierge-dots-mini span:nth-child(3) {
	animation-delay: 0.4s;
}

.hr-ai-concierge-alts-loading-text {
	font-family: var(--hrc-serif);
	font-size: 12px;
	font-style: italic;
	color: var(--hrc-warm-gray);
}

/* Popover: tighter spacing */
.hr-ai-concierge-pill-content .hr-ai-concierge-alts {
	margin-top: 12px;
	padding-top: 10px;
}

.hr-ai-concierge-pill-content .hr-ai-concierge-alt-chip {
	padding: 5px 11px;
	font-size: 12px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
	.hr-ai-concierge-modal {
		padding: 28px 22px 24px;
		max-width: 92vw;
	}

	.hr-ai-concierge-message {
		font-size: 15px;
	}

	.hr-ai-concierge-pill {
		right: 6px;
	}

	.hr-ai-concierge-pill-toggle {
		width: 30px;
		height: 30px;
	}

	.hr-ai-concierge-pill-content {
		width: 260px;
		right: -6px;
		padding: 16px 18px 14px;
	}

	.hr-ai-concierge-pill-content::before {
		right: 12px;
	}

	.hr-ai-concierge-loading-text {
		font-size: 13px;
	}

	.hr-ai-concierge-alts-chips {
		gap: 6px;
	}

	.hr-ai-concierge-alt-chip {
		padding: 6px 10px;
		font-size: 12px;
	}
}
