/**
 * Maximos Live Chat + WhatsApp bar (ported from realestateallturkey.com).
 * Replaces the green floating WhatsApp icon and native Tawk bubble.
 */

html.rat-has-global-contact-bar .yu-whatsapp,
html.rat-tawk-suppress-bubble .yu-whatsapp,
body.rat-has-global-contact-bar .yu-whatsapp,
body.rat-global-tawk-hub .yu-whatsapp {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
	width: 0 !important;
	height: 0 !important;
}

#rat-global-contact-bar {
	position: fixed !important;
	right: 18px !important;
	left: auto !important;
	bottom: 18px !important;
	width: min(320px, calc(100vw - 36px)) !important;
	height: 42px !important;
	min-height: 42px !important;
	max-height: 42px !important;
	margin: 0 !important;
	padding: 0 !important;
	z-index: 2147483000 !important;
	box-sizing: border-box !important;
	overflow: hidden !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: none !important;
	animation: rat-contact-bar-reveal 0s 2.4s forwards;
}

body.home #rat-global-contact-bar {
	animation: none;
}

#rat-global-contact-bar.is-visible,
body.rat-maximos-bar-visible #rat-global-contact-bar {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	animation: none;
}

@keyframes rat-contact-bar-reveal {
	to {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}
}

.rat-global-contact-bar__actions {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 8px !important;
	height: 42px !important;
	min-height: 42px !important;
	max-height: 42px !important;
	box-sizing: border-box !important;
}

.rat-global-contact-bar__btn {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	height: 42px !important;
	min-height: 42px !important;
	max-height: 42px !important;
	padding: 0 12px !important;
	border-radius: 12px !important;
	font-size: 13px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	font-family: Verdana, Arial, sans-serif !important;
	text-decoration: none !important;
	box-sizing: border-box !important;
	width: 100% !important;
	cursor: pointer !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	margin: 0 !important;
}

.rat-global-contact-bar__btn--wa {
	color: #fff !important;
	background: #25d366 !important;
	border: 0 !important;
}

.rat-global-contact-bar__btn--wa:hover,
.rat-global-contact-bar__btn--wa:focus {
	color: #fff !important;
	background: #1ebe5d !important;
	text-decoration: none !important;
}

.rat-global-contact-bar__btn--chat {
	color: #fff !important;
	background: #2563eb !important;
	border: 1px solid #1d4ed8 !important;
	gap: 8px !important;
	padding: 0 10px !important;
}

.rat-global-contact-bar__btn--chat:hover,
.rat-global-contact-bar__btn--chat:focus {
	color: #fff !important;
	background: #1d4ed8 !important;
}

.rat-global-contact-bar__btn--chat.is-loading {
	opacity: 0.85;
}

.rat-global-contact-bar__chat-icon {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 34px !important;
	height: 34px !important;
	min-width: 34px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: rgba(255, 255, 255, 0.16) !important;
	color: #fff !important;
	pointer-events: none !important;
}

.rat-global-contact-bar__chat-icon svg {
	width: 18px !important;
	height: 18px !important;
	flex-shrink: 0 !important;
	display: block !important;
	pointer-events: none !important;
}

.rat-global-contact-bar__chat-label {
	pointer-events: none !important;
	user-select: none !important;
}

body.rat-tawk-chat-open #rat-global-contact-bar {
	z-index: 9990 !important;
}

.rat-global-chat-bubble,
.rat-global-chat-bubble[data-rat-bubble-hidden="1"] {
	position: fixed !important;
	z-index: 2147483002 !important;
	box-sizing: border-box !important;
	font-family: Verdana, Arial, sans-serif !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	height: 0 !important;
	width: 0 !important;
	overflow: hidden !important;
	background: transparent !important;
}

.rat-global-chat-bubble.is-visible {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	height: auto !important;
	width: min(300px, calc(100vw - 36px)) !important;
	overflow: visible !important;
	transform: none !important;
	right: 18px !important;
	left: auto !important;
	bottom: var(--rat-global-contact-bar-stack, 92px) !important;
}

.rat-global-chat-bubble__card {
	display: block !important;
	position: relative !important;
	background: #fff !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 12px 12px 12px 4px !important;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
	cursor: pointer !important;
	overflow: visible !important;
}

.rat-global-chat-bubble__head {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 8px !important;
	background: #03a84e !important;
	color: #fff !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1.25 !important;
	padding: 8px 10px 8px 12px !important;
}

.rat-global-chat-bubble__title {
	flex: 1 1 auto !important;
	min-width: 0 !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
}

.rat-global-chat-bubble__close {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex: 0 0 24px !important;
	width: 24px !important;
	height: 24px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: rgba(255, 255, 255, 0.2) !important;
	color: #fff !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	cursor: pointer !important;
}

.rat-global-chat-bubble__body {
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	background: #fff !important;
	text-align: left !important;
}

.rat-global-chat-bubble__text {
	display: block !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	line-height: 1.45 !important;
	color: #374151 !important;
	padding: 10px 12px 12px !important;
}

body.rat-tawk-chat-open .rat-global-chat-bubble,
body.rat-tawk-chat-open .rat-global-chat-bubble.is-visible {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	display: none !important;
}

@media (max-width: 992px) {
	.rat-global-chat-bubble.is-visible {
		left: 12px !important;
		right: 12px !important;
		margin-left: auto !important;
		margin-right: auto !important;
		width: min(300px, calc(100vw - 24px)) !important;
		bottom: var(--rat-global-contact-bar-stack, 92px) !important;
	}
}

@media (max-width: 991px) {
	body.home {
		padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
	}

	#rat-global-contact-bar {
		right: 12px !important;
		bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
		width: min(320px, calc(100vw - 24px)) !important;
	}
}
