/* ==========================================================================
   ASTRO WHATSAPP CHATBOT & ENQUIRY WIDGET STYLES
   ========================================================================== */
.astro-wa-widget-root {
    position: relative;
    z-index: 99990;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Semi-transparent Backdrop with smooth blur */
.astro-wa-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 99995;
    opacity: 0;
    transition: opacity 0.25s ease;
    cursor: pointer;
}

.astro-wa-backdrop.active {
    opacity: 1;
}

/* Chatbot Card Container */
.astro-wa-card {
    position: fixed;
    right: 24px;
    bottom: 92px;
    width: 380px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999;
    opacity: 0;
    transform: translateY(20px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.astro-wa-card.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Header */
.astro-wa-header {
    background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
    color: #ffffff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.astro-wa-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.astro-wa-avatar-wrap {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #ffffff;
    padding: 2px;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.7);
    flex-shrink: 0;
}

.astro-wa-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: #f1f5f9;
}

.astro-wa-avatar-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #22c55e;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 50%;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.astro-wa-title-area {
    line-height: 1.25;
}

.astro-wa-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 3px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.astro-wa-verified-icon {
    color: #38bdf8;
    font-size: 13px;
}

.astro-wa-status {
    color: #d1fae5;
    font-size: 12px;
    margin: 0;
    font-weight: 500;
}

.astro-wa-online-indicator {
    color: #4ade80;
    font-size: 14px;
    margin-right: 2px;
}

.astro-wa-timing {
    color: #a7f3d0;
}

/* Close button */
.astro-wa-close-btn {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s ease, transform 0.2s ease;
    outline: none;
}

.astro-wa-close-btn:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: rotate(90deg);
}

/* Body */
.astro-wa-body {
    padding: 16px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Scrollbar */
.astro-wa-body::-webkit-scrollbar {
    width: 5px;
}
.astro-wa-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

/* Chat bubble */
.astro-wa-msg-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.astro-wa-msg-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #128C7E;
}

.astro-wa-bubble {
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 14px 14px 14px 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    max-width: 88%;
}

.astro-wa-bubble-sender {
    font-size: 11px;
    font-weight: 700;
    color: #075E54;
    margin-bottom: 3px;
}

.astro-wa-bubble-text {
    font-size: 12.5px;
    color: #1e293b;
    margin: 0;
    line-height: 1.45;
}

.astro-wa-bubble-time {
    display: block;
    text-align: right;
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Chips Section */
.astro-wa-chips-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.astro-wa-chips-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
}

.astro-wa-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.astro-wa-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    outline: none;
}

.astro-wa-chip:hover {
    border-color: #128C7E;
    color: #075E54;
    background: #f0fdf4;
}

.astro-wa-chip.active {
    background: #128C7E;
    color: #ffffff;
    border-color: #128C7E;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(18, 140, 126, 0.35);
}

/* Form */
.astro-wa-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #ffffff;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.astro-wa-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.astro-wa-form-group label {
    font-size: 11.5px;
    font-weight: 600;
    color: #334155;
    margin: 0;
}

.astro-wa-optional {
    font-weight: normal;
    color: #94a3b8;
    font-size: 10.5px;
}

.astro-wa-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.astro-wa-input-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 13px;
}

.astro-wa-input,
.astro-wa-textarea {
    width: 100%;
    padding: 8px 12px;
    font-size: 12.5px;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.astro-wa-textarea {
    resize: none;
}

.astro-wa-input-wrap .astro-wa-input {
    padding-left: 32px;
}

.astro-wa-input:focus,
.astro-wa-textarea:focus {
    background: #ffffff;
    border-color: #128C7E;
    box-shadow: 0 0 0 3px rgba(18, 140, 126, 0.15);
}

.astro-wa-phone-group {
    display: flex;
    align-items: stretch;
}

.astro-wa-country-badge {
    background: #e2e8f0;
    color: #1e293b;
    font-size: 12px;
    font-weight: 600;
    padding: 0 10px;
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-right: none;
    border-radius: 8px 0 0 8px;
    white-space: nowrap;
}

.astro-wa-phone-group .astro-wa-input {
    border-radius: 0 8px 8px 0;
    letter-spacing: 0.5px;
}

.astro-wa-error-msg {
    font-size: 11px;
    color: #ef4444;
    display: none;
    margin-top: 2px;
}

/* Status Alert */
.astro-wa-status-alert {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
    font-weight: 500;
}

.astro-wa-status-alert.error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.astro-wa-status-alert.success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

/* Submit Button */
.astro-wa-submit-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 13.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    outline: none;
    margin-top: 2px;
}

.astro-wa-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.45);
}

.astro-wa-submit-btn:active {
    transform: translateY(1px);
}

.astro-wa-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.astro-wa-submit-btn .fa-whatsapp {
    font-size: 18px;
}

.astro-wa-send-icon {
    font-size: 12px;
    opacity: 0.9;
}

.astro-wa-trust-footer {
    text-align: center;
    font-size: 10.5px;
    color: #64748b;
    margin-top: 4px;
}

.astro-wa-trust-footer i {
    color: #10b981;
}

/* Responsiveness for Mobile Devices */
@media (max-width: 480px) {
    .astro-wa-card {
        right: 12px;
        left: 12px;
        bottom: 80px;
        width: auto;
        max-width: none;
        border-radius: 16px;
    }
}

/* ============================================================================
 * MODERN FLOATING QUICK ACTIONS (Right Docked: Call & WhatsApp with Smooth Hover Expansion)
 * ============================================================================ */
.astro-floating-actions {
	position: fixed;
	right: 24px;
	bottom: 25px;
	z-index: 9990;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	pointer-events: none;
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

body.astro-cart-open .astro-floating-actions {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateX(40px);
}

.astro-float-btn {
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	height: 54px;
	width: 54px;
	border-radius: 50px;
	text-decoration: none;
	position: relative;
	overflow: hidden;
	white-space: nowrap;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.12);
	transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s ease, box-shadow 0.25s ease;
	cursor: pointer;
	border: 2px solid rgba(255, 255, 255, 0.45);
	outline: none;
}

@media (hover: hover) and (pointer: fine) {
	.astro-float-btn:hover {
		width: 215px;
		transform: translateY(-2px);
		box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
		text-decoration: none;
	}
}

.astro-float-btn:focus {
	outline: none;
	text-decoration: none;
}

.astro-float-btn:active {
	transform: scale(0.96);
}

.astro-float-btn .astro-float-icon-wrap {
	width: 50px;
	height: 50px;
	min-width: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	flex-shrink: 0;
}

.astro-float-btn .astro-float-icon {
	color: #ffffff;
	font-size: 24px;
	line-height: 1;
	transition: transform 0.3s ease;
}

/* WhatsApp Floating Button with Attention-Grabbing Blink Animation */
.astro-float-wa {
	background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
	animation: waBlinkPulse 2.2s infinite ease-in-out;
}

.astro-float-wa .astro-float-icon {
	font-size: 27px;
	animation: waIconHeartbeat 3.2s infinite ease-in-out;
}

.astro-float-wa .astro-float-online-dot {
	display: none !important;
}

@keyframes waDotBlink {
	0%,
	100% {
		opacity: 1;
		transform: scale(1);
		box-shadow: 0 0 10px #10b981;
	}

	50% {
		opacity: 0.35;
		transform: scale(0.8);
		box-shadow: 0 0 2px #10b981;
	}
}

@keyframes waBlinkPulse {
	0%,
	100% {
		box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.65);
		transform: scale(1);
	}

	50% {
		box-shadow: 0 8px 24px rgba(37, 211, 102, 0.7), 0 0 0 13px rgba(37, 211, 102, 0);
		transform: scale(1.06);
	}
}

@keyframes waIconHeartbeat {
	0%,
	100% {
		transform: scale(1);
	}

	12%,
	28% {
		transform: scale(1.15);
	}

	20% {
		transform: scale(1.05);
	}

	40% {
		transform: scale(1);
	}
}

/* Call Floating Button with Alternating Blink Animation */
.astro-float-call {
	background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
	animation: callBlinkPulse 2.2s infinite ease-in-out 1.1s;
}

.astro-float-call .astro-float-icon {
	font-size: 21px;
	animation: phoneRingingIdle 3.2s infinite ease-in-out 1.1s;
}

@keyframes callBlinkPulse {
	0%,
	100% {
		box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4), 0 0 0 0 rgba(2, 132, 199, 0.65);
		transform: scale(1);
	}

	50% {
		box-shadow: 0 8px 24px rgba(2, 132, 199, 0.7), 0 0 0 13px rgba(2, 132, 199, 0);
		transform: scale(1.06);
	}
}

@keyframes phoneRingingIdle {
	0%,
	72%,
	100% {
		transform: rotate(0deg) scale(1);
	}

	76% {
		transform: rotate(-16deg) scale(1.18);
	}

	82% {
		transform: rotate(16deg) scale(1.18);
	}

	88% {
		transform: rotate(-12deg) scale(1.15);
	}

	94% {
		transform: rotate(12deg) scale(1.15);
	}
}

/* Smooth expansion pause on hover */
.astro-float-btn:hover,
.astro-float-btn:focus {
	animation: none;
	width: 215px;
	transform: translateY(-2px) scale(1.02);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
	text-decoration: none;
}

.astro-float-btn:hover .astro-float-icon {
	animation: none;
	transform: scale(1.1);
}

.astro-float-call:hover .astro-float-icon {
	animation: phoneRingingHover 0.4s ease infinite alternate;
}

@keyframes phoneRingingHover {
	0% {
		transform: rotate(-12deg) scale(1.12);
	}

	100% {
		transform: rotate(12deg) scale(1.12);
	}
}

/* Expanded Text Content on Hover */
.astro-float-content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-left: 4px;
	padding-right: 18px;
	opacity: 0;
	transform: translateX(12px);
	transition: opacity 0.25s ease 0.06s, transform 0.25s ease 0.06s;
	pointer-events: none;
}

.astro-float-btn:hover .astro-float-content,
.astro-float-btn:focus .astro-float-content {
	opacity: 1;
	transform: translateX(0);
}

.astro-float-title {
	font-size: 13.5px;
	font-weight: 700;
	color: #ffffff;
	line-height: 1.2;
	letter-spacing: 0.2px;
	white-space: nowrap;
}

.astro-float-sub {
	font-size: 11px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.92);
	line-height: 1.2;
	margin-top: 2px;
	white-space: nowrap;
}

/* ==========================================================================
   Rotating WhatsApp Question / Quote Speech Bubble (Modern & Interactive)
   ========================================================================== */
.astro-float-wa-container {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	position: relative;
	pointer-events: none;
}

.astro-float-wa-container .astro-float-btn {
	pointer-events: auto;
}

.astro-wa-quote-bubble {
	pointer-events: auto;
	position: relative;
	background: #ffffff;
	border: 1.5px solid #25D366;
	border-radius: 50px;
	padding: 6px 10px 6px 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(37, 211, 102, 0.25);
	cursor: pointer;
	white-space: nowrap;
	user-select: none;
	transition: width 0.35s cubic-bezier(0.2, 0.9, 0.3, 1), transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1.25;
	overflow: hidden;
	animation: waQuotePulse 3s ease-in-out infinite;
}

@keyframes waQuotePulse {
	0%, 100% {
		box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14), 0 0 0 0 rgba(37, 211, 102, 0.45);
	}
	50% {
		box-shadow: 0 8px 26px rgba(0, 0, 0, 0.18), 0 0 0 6px rgba(37, 211, 102, 0);
	}
}

.astro-wa-quote-bubble:hover {
	transform: translateY(-2px) scale(1.02);
	border-color: #128C7E;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2), 0 4px 14px rgba(37, 211, 102, 0.4);
	animation: none;
}

/* Live green pulsating dot */
.astro-wa-quote-dot {
	width: 8px;
	height: 8px;
	min-width: 8px;
	border-radius: 50%;
	background: #25D366;
	box-shadow: 0 0 7px rgba(37, 211, 102, 0.9);
	margin-right: 8px;
	display: inline-block;
	animation: waDotPulse 1.8s infinite;
	flex-shrink: 0;
}

@keyframes waDotPulse {
	0%, 100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.35;
		transform: scale(0.85);
	}
}

/* Arrow action badge */
.astro-wa-quote-arrow-badge {
	width: 26px;
	height: 26px;
	min-width: 26px;
	border-radius: 50%;
	background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	font-size: 11px;
	margin-left: 10px;
	box-shadow: 0 2px 8px rgba(37, 211, 102, 0.45);
	flex-shrink: 0;
	transition: all 0.25s ease;
}

.astro-wa-quote-arrow-badge i {
	animation: arrowNudge 1.6s ease-in-out infinite;
}

@keyframes arrowNudge {
	0%, 100% {
		transform: translateX(0);
	}
	50% {
		transform: translateX(3px);
	}
}

.astro-wa-quote-bubble:hover .astro-wa-quote-arrow-badge {
	transform: scale(1.12);
	background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
	box-shadow: 0 4px 12px rgba(37, 211, 102, 0.6);
}

/* Speech Tail pointing directly right towards WhatsApp button */
.astro-wa-quote-bubble::before {
	content: '';
	position: absolute;
	right: -8px;
	top: 50%;
	transform: translateY(-50%);
	width: 0;
	height: 0;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	border-left: 8px solid #25D366;
	z-index: 1;
}

.astro-wa-quote-bubble::after {
	content: '';
	position: absolute;
	right: -6.5px;
	top: 50%;
	transform: translateY(-50%);
	width: 0;
	height: 0;
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
	border-left: 7px solid #ffffff;
	z-index: 2;
}

.astro-wa-quote-track {
	position: relative;
	display: inline-block;
	height: 22px;
	overflow: hidden;
	vertical-align: middle;
	transition: width 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.astro-wa-quote-text {
	position: relative;
	display: inline-block;
	font-size: 13.5px;
	font-weight: 600;
	color: #0f172a;
	letter-spacing: -0.2px;
	white-space: nowrap;
	line-height: 22px;
	transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
	will-change: transform, opacity;
}

.astro-wa-quote-text.is-active {
	position: relative;
	transform: translateY(0);
	opacity: 1;
}

.astro-wa-quote-text.is-incoming {
	position: absolute;
	left: 0;
	top: 0;
	transform: translateY(18px);
	opacity: 0;
}

.astro-wa-quote-text.is-outgoing {
	position: absolute;
	left: 0;
	top: 0;
	transform: translateY(-18px);
	opacity: 0;
}

/* Mobile Responsiveness for Floating Quick Actions */
@media (max-width: 767px) {
	.astro-floating-actions {
		right: 14px;
		bottom: 18px;
		gap: 10px;
	}

	.astro-float-wa-container {
		gap: 8px;
	}

	.astro-wa-quote-bubble {
		padding: 4px 7px 4px 9px;
		border-radius: 50px;
		max-width: 215px;
	}

	.astro-wa-quote-dot {
		width: 6px;
		height: 6px;
		min-width: 6px;
		margin-right: 6px;
	}

	.astro-wa-quote-arrow-badge {
		width: 22px;
		height: 22px;
		min-width: 22px;
		font-size: 9.5px;
		margin-left: 6px;
	}

	.astro-wa-quote-track {
		height: 18px;
		max-width: 140px;
	}

	.astro-wa-quote-text {
		font-size: 11.5px;
		line-height: 18px;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.astro-wa-quote-bubble::before {
		right: -7px;
		border-top: 5px solid transparent;
		border-bottom: 5px solid transparent;
		border-left: 7px solid #25D366;
	}

	.astro-wa-quote-bubble::after {
		right: -5.5px;
		border-top: 4px solid transparent;
		border-bottom: 4px solid transparent;
		border-left: 6px solid #ffffff;
	}

	.astro-float-btn {
		height: 48px;
		width: 48px;
	}

	.astro-float-btn .astro-float-icon-wrap {
		width: 44px;
		height: 44px;
		min-width: 44px;
	}

	.astro-float-wa .astro-float-icon {
		font-size: 24px;
	}

	.astro-float-call .astro-float-icon {
		font-size: 19px;
	}
}
