/* 
 * Floating Modal Styles for iToll Osta
 */

/* Floating Mascot Widget Container (Fixed Bottom-Left) */
.itoll-osta-float-widget {
	position: fixed !important;
	bottom: 24px !important;
	left: 24px !important;
	right: auto !important;
	top: auto !important;
	z-index: 99980 !important;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	font-family: inherit;
	direction: rtl;
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

/* Hide float button when modal is open */
.itoll-osta-float-widget.is-hidden-modal {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	transform: scale(0.8) translateY(20px) !important;
}

.itoll-osta-float-button-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

/* Floating Trigger Button */
.itoll-osta-float-button {
	display: flex;
	align-items: center;
	gap: 12px;
	background: linear-gradient(135deg, #0f172a, #1e293b);
	border: 1px solid rgba(255, 255, 255, 0.15);
	padding: 6px 18px 6px 6px;
	border-radius: 999px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25), 0 0 15px rgba(37, 99, 235, 0.25);
	cursor: pointer;
	transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
	outline: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}
.itoll-osta-float-button:hover {
	transform: translateY(-3px) scale(1.02);
	box-shadow: 0 16px 35px rgba(15, 23, 42, 0.35), 0 0 25px rgba(37, 99, 235, 0.45);
	background: linear-gradient(135deg, #1e293b, #0f172a);
}

/* Float Dismiss Button (×) */
.itoll-osta-float-dismiss {
	position: absolute;
	top: -6px;
	left: -6px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #334155;
	color: #f8fafc;
	border: 2px solid #0f172a;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.85;
	transition: all 0.2s ease;
	z-index: 10;
	padding: 0;
}
.itoll-osta-float-button-wrap:hover .itoll-osta-float-dismiss {
	opacity: 1;
}
.itoll-osta-float-dismiss:hover {
	background: #ef4444;
	color: #ffffff;
	transform: scale(1.15);
}

.itoll-osta-float-avatar-wrap {
	position: relative;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	flex-shrink: 0;
}
.itoll-osta-avatar-crop {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid #2563eb;
	background: #f8fafc;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.itoll-osta-avatar-crop img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 12%;
	transform: scale(1.7);
	transform-origin: 50% 18%;
}

/* Pulse Ping dot */
.itoll-osta-float-online-ping {
	position: absolute;
	bottom: 1px;
	right: 1px;
	width: 12px;
	height: 12px;
	background-color: #22c55e;
	border: 2px solid #0f172a;
	border-radius: 50%;
}
.itoll-osta-float-online-ping::after {
	content: '';
	position: absolute;
	inset: -2px;
	border-radius: 50%;
	background-color: #22c55e;
	opacity: 0.75;
	animation: itoll-osta-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes itoll-osta-ping {
	75%, 100% {
		transform: scale(2);
		opacity: 0;
	}
}

.itoll-osta-float-label {
	color: #ffffff;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: -0.2px;
	white-space: nowrap;
}

/* Intro Popover Speech Box */
.itoll-osta-popover {
	position: absolute;
	bottom: calc(100% + 14px);
	left: 0;
	width: 320px;
	max-width: calc(100vw - 32px);
	background: #ffffff;
	border-radius: 20px;
	box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.06);
	padding: 18px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(12px) scale(0.95);
	transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	z-index: 99990;
}
.itoll-osta-popover.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

/* Speech Arrow Pointer */
.itoll-osta-popover::after {
	content: '';
	position: absolute;
	bottom: -7px;
	left: 24px;
	width: 14px;
	height: 14px;
	background: #ffffff;
	transform: rotate(45deg);
	border-right: 1px solid rgba(15, 23, 42, 0.06);
	border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.itoll-osta-popover-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}
.itoll-osta-popover-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	overflow: hidden;
	background: #f1f5f9;
	border: 2px solid #e2e8f0;
	flex-shrink: 0;
}
.itoll-osta-popover-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 12%;
	transform: scale(1.7);
	transform-origin: 50% 18%;
}

.itoll-osta-popover-title-wrap {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.itoll-osta-popover-badge {
	font-size: 11px;
	font-weight: 700;
	color: #2563eb;
	background: #eff6ff;
	padding: 2px 8px;
	border-radius: 6px;
	width: fit-content;
}
.itoll-osta-popover-name {
	font-size: 15px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 !important;
	line-height: 1.2;
}

.itoll-osta-popover-body p {
	font-size: 13px;
	color: #475569;
	line-height: 1.6;
	margin: 0 0 14px 0 !important;
}

.itoll-osta-popover-footer {
	display: flex;
}
.itoll-osta-popover-start-btn {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
	color: #ffffff !important;
	font-weight: 700;
	font-size: 14px;
	padding: 10px 18px;
	border-radius: 12px;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}
.itoll-osta-popover-start-btn:hover {
	background: linear-gradient(135deg, #1d4ed8, #1e40af);
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}
.itoll-osta-popover-start-btn svg {
	transition: transform 0.2s;
}
.itoll-osta-popover-start-btn:hover svg {
	transform: translateX(-3px);
}

/* Mobile responsive tweak for float widget */
@media (max-width: 480px) {
	.itoll-osta-float-widget {
		bottom: 16px !important;
		left: 16px !important;
	}
	.itoll-osta-popover {
		width: 290px;
	}
}

/* Modal Wrapper */
.itoll-osta-floating-wrapper {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
	padding: 20px;
}
.itoll-osta-floating-wrapper[hidden] {
	display: none !important;
}
.itoll-osta-floating-wrapper.is-open {
	opacity: 1;
	pointer-events: auto;
}

/* Backdrop */
.itoll-osta-floating-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.5);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

/* Modal Container */
.itoll-osta-floating-container {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: 85vh;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border-radius: 28px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255,255,255,0.5) inset;
	transform: scale(0.95) translateY(30px);
	transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(255, 255, 255, 0.8);
	margin-top: 60px; /* Space for the floating mascot */
}
.itoll-osta-floating-wrapper.is-open .itoll-osta-floating-container {
	transform: scale(1) translateY(0);
}

/* Close Button */
.itoll-osta-floating-close {
	position: absolute;
	top: 20px;
	left: 20px; /* RTL layout */
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #f1f5f9;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	line-height: 1;
	color: #64748b;
	cursor: pointer;
	z-index: 50;
	transition: all 0.2s;
}
.itoll-osta-floating-close:hover {
	background: #e2e8f0;
	color: #0f172a;
	transform: rotate(90deg);
}

/* Context Override */
.itoll-osta-floating-context {
	height: 100%;
	overflow-y: auto;
	scrollbar-width: none;
	position: relative;
	/* Add top padding to clear the avatar, and bottom padding */
	padding-top: 85px;
	padding-bottom: 24px;
	padding-left: 20px;
	padding-right: 20px;
}
.itoll-osta-floating-context::-webkit-scrollbar {
	display: none;
}
.itoll-osta-floating-context .itoll-osta {
	border: none !important;
	box-shadow: none !important;
	background: transparent !important;
	padding: 0 !important;
	margin: 0 !important;
}
.itoll-osta-floating-context .itoll-osta__head {
	display: none !important; /* Hide default head, we have a cleaner modal */
}

/* Persistent Floating Mascot */
.itoll-osta-persistent-avatar {
	position: absolute;
	top: -70px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 60;
}
.itoll-osta-persistent-avatar-stage {
	width: 140px;
	height: 140px;
	border-radius: 50%;
	background: #f8fafc;
	box-shadow: 0 15px 35px rgba(0,0,0,0.1), 0 0 0 6px #ffffff;
	overflow: hidden;
}
.itoll-osta-persistent-avatar-stage img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 12%;
	transform: scale(1.7);
	transform-origin: 50% 18%;
	transition: transform 0.3s;
}
.itoll-osta-persistent-avatar-stage:hover img {
	transform: scale(1.8);
}

/* Hide internal widget avatars so they don't duplicate */
.itoll-osta-floating-context .itoll-osta__intro-visual,
.itoll-osta-floating-context .itoll-osta__mascot-stage {
	display: none !important;
}

/* Mascot Dialogue overrides */
.itoll-osta-floating-context .itoll-osta__mascot {
	display: block !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
.itoll-osta-floating-context .itoll-osta__mascot[hidden] {
	display: none !important;
}

.itoll-osta-floating-context .itoll-osta__mascot-copy {
	background: #fff !important;
	border: 1px solid #e2e8f0 !important;
	box-shadow: 0 10px 25px rgba(0,0,0,0.08) !important;
	border-radius: 16px !important;
	margin: 0 auto 24px auto !important;
	padding: 16px 24px !important;
	width: 100% !important;
	max-width: 100% !important;
	position: relative !important;
}
.itoll-osta-floating-context .itoll-osta__mascot-copy::before {
	content: '' !important;
	display: block !important;
	position: absolute !important;
	top: -8px !important;
	left: 50% !important;
	right: auto !important;
	transform: translateX(-50%) !important;
	border-left: 8px solid transparent !important;
	border-right: 8px solid transparent !important;
	border-bottom: 8px solid #fff !important;
	border-top: none !important;
}
.itoll-osta-floating-context .itoll-osta__mascot-name {
	display: none !important;
}
.itoll-osta-floating-context .itoll-osta__mascot-bubble {
	font-size: 16px;
	font-weight: 700;
	color: #1e293b;
	text-align: center;
	margin: 0 !important;
	line-height: 1.6;
}

/* Hide Dropdowns when results are shown */
.itoll-osta-floating-context .itoll-osta.has-results [data-role="vehicle-step"] .itoll-osta__field,
.itoll-osta-floating-context .itoll-osta.has-results .itoll-osta__submit {
	display: none !important;
}

/* Blocksy Theme Style for Shop Products */
.itoll-osta-floating-context .itoll-osta__shop {
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
	margin-top: 16px;
}
.itoll-osta-floating-context .itoll-osta__shop-head {
	justify-content: center;
	flex-direction: column;
	margin-bottom: 20px;
}
.itoll-osta-floating-context .itoll-osta__shop-badge {
	background: #2563eb !important;
	color: #fff !important;
	border-radius: 20px !important;
	padding: 6px 16px !important;
	font-weight: 700 !important;
	font-size: 14px !important;
}
.itoll-osta-floating-context .itoll-osta__shop-note {
	color: #64748b !important;
	font-size: 13px !important;
	margin-top: 8px;
}
.itoll-osta-floating-context .itoll-osta__shop-list {
	display: grid;
	gap: 12px;
}
.itoll-osta-floating-context .itoll-osta__shop-card {
	background: #fff !important;
	border: 1px solid #f1f5f9 !important;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
	border-radius: 14px !important;
	padding: 14px 16px !important;
	transition: transform 0.2s, box-shadow 0.2s;
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	text-align: right !important;
	gap: 14px !important;
}
.itoll-osta-floating-context .itoll-osta__shop-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
}
.itoll-osta-floating-context .itoll-osta__shop-img-wrap {
	width: 60px;
	height: 60px;
	flex-shrink: 0;
	border-radius: 10px;
	overflow: hidden;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.itoll-osta-floating-context .itoll-osta__shop-img-wrap img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 4px;
}
.itoll-osta-floating-context .itoll-osta__shop-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.itoll-osta-floating-context .itoll-osta__shop-title {
	font-size: 14px !important;
	font-weight: 700 !important;
	line-height: 1.4;
	color: #0f172a !important;
	margin: 0 !important;
}
.itoll-osta-floating-context .itoll-osta__shop-meta {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding-top: 8px;
	border-top: 1px dashed #e2e8f0;
}
.itoll-osta-floating-context .itoll-osta__price {
	font-size: 14px !important;
	font-weight: 800 !important;
	color: #2563eb !important;
}
.itoll-osta-floating-context .itoll-osta__shop-btn {
	background: #2563eb !important;
	color: #fff !important;
	border-radius: 8px !important;
	padding: 6px 14px !important;
	font-weight: 700 !important;
	text-decoration: none !important;
	font-size: 13px !important;
	transition: background 0.2s;
}
.itoll-osta-floating-context .itoll-osta__shop-btn:hover {
	background: #1d4ed8 !important;
}

/* Vehicle Summary Box Visibility */
.itoll-osta-floating-context .itoll-osta__vehicle-summary {
	display: none !important;
}
.itoll-osta-floating-context .itoll-osta.has-results .itoll-osta__vehicle-summary {
	display: flex !important;
}

/* Step Summary Boxes */
.itoll-osta-floating-context .itoll-osta__step-bar {
	display: flex;
	flex-direction: column;
	gap: 8px !important;
	background: transparent !important;
	padding: 0 !important;
	border: none !important;
	margin-bottom: 14px !important;
}
.itoll-osta-floating-context .itoll-osta__step-summary-box {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	padding: 8px 14px !important;
	border-radius: 10px !important;
}
.itoll-osta-floating-context .itoll-osta__step-summary-content {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.itoll-osta-floating-context .itoll-osta__step-summary-label {
	font-weight: 700;
	color: #475569;
	font-size: 13px;
}
.itoll-osta-floating-context .itoll-osta__step-summary-value {
	color: #0f172a;
	font-weight: 800;
	font-size: 13px;
}
.itoll-osta-floating-context .itoll-osta__step-change-btn {
	background: none;
	border: none;
	color: #2563eb;
	font-weight: 800;
	cursor: pointer;
	padding: 4px 10px !important;
	font-size: 12px !important;
	border-radius: 6px;
	background: #eff6ff;
	transition: all 0.2s;
}
.itoll-osta-floating-context .itoll-osta__step-change-btn:hover {
	background: #dbeafe;
	color: #1d4ed8;
}
.itoll-osta-floating-context .itoll-osta__step-change-btn:hover {
	background: #dbeafe;
	color: #1d4ed8;
}

/* Enhance Buttons */
.itoll-osta-floating-context .itoll-osta__intro-start,
.itoll-osta-floating-context .itoll-osta__cta {
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
	color: #fff;
	border-radius: 16px;
	box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
	font-weight: 700;
	padding: 14px 24px;
	transition: all 0.3s;
}
.itoll-osta-floating-context .itoll-osta__intro-start:hover,
.itoll-osta-floating-context .itoll-osta__cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 15px 25px rgba(37, 99, 235, 0.3);
}

.itoll-osta-floating-context .itoll-osta__intro-profile {
	background: #f1f5f9;
	color: #475569;
	border-radius: 16px;
	font-weight: 600;
}
.itoll-osta-floating-context .itoll-osta__intro-profile:hover {
	background: #e2e8f0;
}

/* General Layout Tweaks */
.itoll-osta-floating-context h4 {
	font-size: 22px;
	font-weight: 800;
	color: #0f172a;
}
.itoll-osta-floating-context p {
	color: #475569;
}
