/**
 * Maya AI Chatbot Styling - Clean, Elegant & Modern.
 * All funky styling removed. Standard system typography applied.
 */

:root {
	--maya-primary: #9b1b30;
	--maya-accent: #9b1b30;
	--maya-gold: #b8860b;
	--maya-bg: #ffffff;
	--maya-surface: #ffffff;
	--maya-border: #e2e8f0;
	--maya-text: #1e293b;
	--maya-muted: #64748b;
	--maya-bot-bg: #f8fafc;
	--maya-user-bg: #9b1b30;
	--maya-user-text: #ffffff;
	--maya-radius: 12px;
	--maya-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.06);
	--maya-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Floating Launcher Button */
.gs-maya {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 99990;
	font-family: var(--maya-font);
}

.gs-maya-launcher {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: #9b1b30;
	color: #ffffff;
	border: 1.5px solid #ffffff;
	border-radius: 9999px;
	padding: 8px 16px 8px 10px;
	box-shadow: 0 8px 20px rgba(155, 27, 48, 0.35);
	cursor: pointer;
	transition: all 0.2s ease-in-out;
	position: relative;
	font-family: var(--maya-font);
}

.gs-maya-launcher:hover {
	transform: translateY(-2px);
	background: #801426;
	box-shadow: 0 10px 24px rgba(155, 27, 48, 0.45);
}

.gs-maya-launcher__avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	position: relative;
}

.gs-maya-avatar-sparkle {
	position: absolute;
	top: -4px;
	right: -4px;
	font-size: 11px;
}

.gs-maya-launcher__label {
	display: flex;
	flex-direction: column;
	text-align: left;
	line-height: 1.25;
}

.gs-maya-launcher__label strong {
	font-size: 13.5px;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #ffffff;
}

.gs-maya-launcher__label small {
	font-size: 10.5px;
	color: #ffd8df;
	font-weight: 400;
}

.gs-maya-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	background: #ef4444;
	color: #ffffff;
	font-size: 10px;
	font-weight: 700;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #ffffff;
}

/* Chatbot Window Drawer */
.gs-maya-window {
	position: fixed;
	bottom: 84px;
	right: 24px;
	width: 400px;
	max-width: calc(100vw - 32px);
	height: 580px;
	max-height: calc(100vh - 110px);
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: var(--maya-radius);
	box-shadow: var(--maya-shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 99995;
	font-family: var(--maya-font);
	animation: mayaFadeIn 0.2s ease-out forwards;
}

.gs-maya-window[hidden] {
	display: none !important;
}

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

/* Chat Header */
.gs-maya-header {
	background: #9b1b30;
	color: #ffffff;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.gs-maya-header__brand {
	display: flex;
	align-items: center;
	gap: 10px;
}

.gs-maya-header__avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	color: #ffffff;
	font-weight: 700;
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.gs-maya-online-dot {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 9px;
	height: 9px;
	background: #22c55e;
	border: 2px solid #9b1b30;
	border-radius: 50%;
}

.gs-maya-title {
	margin: 0;
	font-size: 14.5px;
	font-weight: 600;
	color: #ffffff;
	line-height: 1.2;
}

.gs-maya-status {
	margin: 2px 0 0;
	font-size: 11px;
	color: #ffd8df;
}

.gs-maya-close-btn {
	background: transparent;
	border: none;
	color: #ffd8df;
	padding: 6px;
	border-radius: 6px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s, color 0.15s;
}

.gs-maya-close-btn:hover {
	background: rgba(255, 255, 255, 0.2);
	color: #ffffff;
}

/* Quick Discovery Chips */
.gs-maya-chips {
	display: flex;
	gap: 6px;
	padding: 8px 12px;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
	overflow-x: auto;
	white-space: nowrap;
	scrollbar-width: thin;
}

.gs-maya-chips::-webkit-scrollbar {
	height: 3px;
}
.gs-maya-chips::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 3px;
}

.gs-maya-chip {
	font-size: 11.5px;
	background: #ffffff;
	color: #334155;
	border: 1px solid #cbd5e1;
	border-radius: 9999px;
	padding: 5px 10px;
	cursor: pointer;
	font-weight: 500;
	transition: all 0.15s ease;
	flex-shrink: 0;
	font-family: var(--maya-font);
}

.gs-maya-chip:hover {
	background: #9b1b30;
	color: #ffffff;
	border-color: #9b1b30;
}

/* Conversation Body */
.gs-maya-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #ffffff;
}

.gs-maya-msg {
	display: flex;
	flex-direction: column;
	max-width: 88%;
}

.gs-maya-msg--user {
	align-self: flex-end;
}

.gs-maya-msg--user .gs-maya-msg__bubble {
	background: #9b1b30;
	color: #ffffff;
	border-radius: 12px 12px 2px 12px;
}

.gs-maya-msg--bot {
	align-self: flex-start;
}

.gs-maya-msg--bot .gs-maya-msg__bubble {
	background: #f8fafc;
	color: #1e293b;
	border-radius: 12px 12px 12px 2px;
	border: 1px solid #e2e8f0;
}

.gs-maya-msg__bubble {
	padding: 10px 13px;
	font-size: 13px;
	line-height: 1.5;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	word-break: break-word;
	font-family: var(--maya-font);
}

.gs-maya-msg__bubble p {
	margin: 0 0 6px;
}

.gs-maya-msg__bubble p:last-child {
	margin-bottom: 0;
}

/* Product Cards Carousel / Grid in Chat */
.gs-maya-products {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 8px;
	width: 100%;
}

.gs-maya-card {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 8px 10px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
	transition: border-color 0.15s;
}

.gs-maya-card:hover {
	border-color: #cbd5e1;
}

.gs-maya-card__img {
	width: 54px;
	height: 54px;
	border-radius: 6px;
	object-fit: cover;
	background: #f1f5f9;
	flex-shrink: 0;
}

.gs-maya-card__info {
	flex: 1;
	min-width: 0;
}

.gs-maya-card__title {
	font-size: 12.5px;
	font-weight: 600;
	color: #0f172a;
	margin: 0 0 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-decoration: none;
	display: block;
	font-family: var(--maya-font);
}

.gs-maya-card__title:hover {
	color: #9b1b30;
}

.gs-maya-card__price {
	font-size: 12px;
	font-weight: 700;
	color: #9b1b30;
	display: flex;
	align-items: center;
	gap: 6px;
}

.gs-maya-card__badge {
	font-size: 9.5px;
	background: #ecfdf5;
	color: #047857;
	border: 1px solid #a7f3d0;
	padding: 1px 4px;
	border-radius: 4px;
	font-weight: 600;
}

.gs-maya-card__btn {
	background: #9b1b30;
	color: #ffffff;
	border: none;
	padding: 6px 11px;
	border-radius: 6px;
	font-size: 11.5px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s;
	flex-shrink: 0;
	font-family: var(--maya-font);
}

.gs-maya-card__btn:hover {
	background: #801426;
}

.gs-maya-card__btn:disabled,
.gs-maya-card__btn.is-added {
	background: #10b981;
	cursor: default;
}

/* Action Routing Buttons (Checkout / Bag) */
.gs-maya-actions {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 8px;
}

.gs-maya-btn-checkout {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: #16a34a;
	color: #ffffff !important;
	text-decoration: none;
	font-size: 12.5px;
	font-weight: 600;
	padding: 9px 14px;
	border-radius: 6px;
	text-align: center;
	transition: background 0.15s;
	font-family: var(--maya-font);
}

.gs-maya-btn-checkout:hover {
	background: #15803d;
}

/* Inline Gift Wrap Upsell Card */
.gs-maya-gift-box {
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 8px;
	padding: 10px;
	margin-top: 8px;
}

.gs-maya-gift-box__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 600;
	font-size: 12px;
	color: #92400e;
	margin-bottom: 4px;
}

.gs-maya-gift-box__sub {
	font-size: 11px;
	color: #78350f;
	margin-bottom: 8px;
	line-height: 1.35;
}

.gs-maya-gift-inputs {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.gs-maya-gift-inputs input,
.gs-maya-gift-inputs textarea {
	font-family: var(--maya-font);
	font-size: 11.5px;
	border: 1px solid #fcd34d;
	border-radius: 5px;
	padding: 6px 9px;
	background: #ffffff;
	color: #1e293b;
	outline: none;
	width: 100%;
	box-sizing: border-box;
}

.gs-maya-gift-inputs textarea {
	resize: none;
	height: 48px;
}

.gs-maya-gift-inputs input:focus,
.gs-maya-gift-inputs textarea:focus {
	border-color: #d97706;
}

.gs-maya-gift-submit {
	background: #d97706;
	color: #ffffff;
	border: none;
	padding: 7px 11px;
	border-radius: 5px;
	font-size: 11.5px;
	font-weight: 600;
	cursor: pointer;
	align-self: flex-end;
	transition: background 0.15s;
	font-family: var(--maya-font);
}

.gs-maya-gift-submit:hover {
	background: #b45309;
}

.gs-maya-gift-submit.is-saved {
	background: #059669;
}

/* Typing Animation */
.gs-maya-typing {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 8px 14px;
	background: #f1f5f9;
	border-radius: 8px;
	width: fit-content;
	margin: 0 14px 10px;
}

.gs-maya-typing span {
	width: 6px;
	height: 6px;
	background: #94a3b8;
	border-radius: 50%;
	animation: mayaBounce 1.2s infinite ease-in-out both;
}

.gs-maya-typing span:nth-child(1) { animation-delay: -0.32s; }
.gs-maya-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes mayaBounce {
	0%, 80%, 100% { transform: scale(0); }
	40% { transform: scale(1); }
}

/* Form & Input Area */
.gs-maya-form {
	padding: 10px 12px;
	background: #ffffff;
	border-top: 1px solid #e2e8f0;
}

.gs-maya-input-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 9999px;
	padding: 3px 5px 3px 12px;
	transition: border-color 0.15s;
}

.gs-maya-input-wrap:focus-within {
	border-color: #9b1b30;
	background: #ffffff;
}

.gs-maya-input {
	flex: 1;
	background: transparent;
	border: none;
	outline: none;
	font-size: 13px;
	color: #0f172a;
	font-family: var(--maya-font);
	padding: 5px 0;
}

.gs-maya-input::placeholder {
	color: #94a3b8;
	font-size: 12px;
}

.gs-maya-send-btn {
	background: #9b1b30;
	color: #ffffff;
	border: none;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.15s;
}

.gs-maya-send-btn:hover {
	background: #801426;
}

.gs-maya-footer-note {
	background: #f8fafc;
	border-top: 1px solid #f1f5f9;
	padding: 5px 12px;
	text-align: center;
	font-size: 10px;
	color: #64748b;
	font-family: var(--maya-font);
}

/* Clear History Button in Header */
.gs-maya-action-icon {
	background: transparent;
	border: none;
	color: #ffffff;
	opacity: 0.85;
	cursor: pointer;
	padding: 6px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	outline: none;
	-webkit-tap-highlight-color: transparent;
}
.gs-maya-action-icon:hover {
	opacity: 1;
	background: rgba(255, 255, 255, 0.15);
	transform: rotate(-30deg);
}

/* Order Tracking Card Component Inside Chat */
.gs-maya-track-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 12px 14px;
	margin-top: 8px;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
	font-family: var(--maya-font);
}
.gs-maya-track-card__head {
	font-weight: 700;
	font-size: 13px;
	color: #1e293b;
	margin-bottom: 4px;
}
.gs-maya-track-card__desc {
	font-size: 11px;
	color: #64748b;
	margin: 0 0 10px;
	line-height: 1.4;
}
.gs-maya-track-inputs {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.gs-maya-track-inputs input {
	width: 100%;
	padding: 7px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 12px;
	color: #0f172a;
	background: #f8fafc;
	outline: none;
	box-sizing: border-box;
}
.gs-maya-track-inputs input:focus {
	border-color: #9B1B30;
	background: #ffffff;
}
.gs-maya-track-submit {
	background: #9B1B30;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
	margin-top: 4px;
}
.gs-maya-track-submit:hover {
	background: #801426;
}
.gs-maya-track-result {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed #e2e8f0;
	font-size: 11px;
}
.gs-maya-track-success {
	color: #0f172a;
	line-height: 1.4;
}
.gs-maya-track-success strong {
	display: block;
	font-size: 12px;
	margin-bottom: 4px;
}
.gs-maya-track-status {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 10px;
	text-transform: uppercase;
	margin-bottom: 6px;
	background: #e0f2fe;
	color: #0369a1;
}
.gs-maya-track-status--completed {
	background: #dcfce7;
	color: #15803d;
}
.gs-maya-track-status--processing {
	background: #fef9c3;
	color: #854d0e;
}
.gs-maya-track-status--on-hold,
.gs-maya-track-status--pending {
	background: #ffedd5;
	color: #c2410c;
}
.gs-maya-track-error {
	color: #dc2626;
	background: #fef2f2;
	padding: 6px 10px;
	border-radius: 6px;
}

/* Mobile & Handheld Responsiveness */
@media (max-width: 767px) {
	.gs-maya {
		bottom: 74px; /* Position above bottom dock */
		right: 14px;
	}

	.single-product .gs-maya {
		bottom: 76px !important;
		right: 12px !important;
	}

	/* Compact luxury circular floating action button on mobile */
	.gs-maya-launcher {
		width: 44px;
		height: 44px;
		padding: 0;
		border-radius: 50%;
		justify-content: center;
		box-shadow: 0 4px 14px rgba(155, 27, 48, 0.38);
	}

	.gs-maya-launcher__label {
		display: none !important;
	}

	.gs-maya-launcher__avatar {
		width: 100%;
		height: 100%;
		background: transparent;
	}

	.gs-maya-avatar-sparkle {
		top: -2px;
		right: -2px;
		font-size: 10px;
	}

	.gs-maya-window {
		bottom: 0;
		right: 0;
		width: 100vw;
		max-width: 100vw;
		height: 100vh;
		max-height: 100vh;
		border-radius: 0;
		border: none;
	}
}
