/* AAW Scroll Popup Bar
 * A floating bar that reveals on scroll-down and hides on scroll-up.
 */

.aaw-scroll-popup-wrap {
	position: fixed;
	left: 20px;
	right: 20px;
	bottom: 20px;
	z-index: 999;
	display: flex;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(24px);
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}

.aaw-scroll-popup-wrap.aaw-position-top {
	bottom: auto;
	top: 20px;
	transform: translateY(-24px);
}

.aaw-scroll-popup-wrap.aaw-scroll-popup-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s;
}

.aaw-scroll-popup-inner {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	background-color: #FFFFFF;
	border-radius: 20px;
	padding: 16px 24px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
	box-sizing: border-box;
}

.aaw-scroll-popup-left {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.aaw-scroll-popup-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	display: block;
}

.aaw-scroll-popup-message {
	font-size: 16px;
	font-weight: 700;
	color: #1A1A1A;
	line-height: 1.3;
	white-space: normal;
}

.aaw-scroll-popup-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
	margin-left: auto;
}

.aaw-scroll-popup-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	text-decoration: none;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	padding: 14px 24px;
	border-radius: 30px;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
	cursor: pointer;
}

.aaw-scroll-popup-btn:hover {
	transform: translateY(-1px);
}

.aaw-scroll-popup-button_1 {
	background-color: #111111;
	color: #FFFFFF;
}

.aaw-scroll-popup-button_1:hover {
	background-color: #000000;
	color: #FFFFFF;
}

.aaw-scroll-popup-button_2 {
	background-color: #D4FF3D;
	color: #111111;
}

.aaw-scroll-popup-button_2:hover {
	background-color: #c2ec24;
	color: #111111;
}

.aaw-scroll-popup-close {
	appearance: none;
	background: transparent;
	border: 0;
	cursor: pointer;
	color: #8A8A8A;
	font-size: 18px;
	line-height: 1;
	padding: 4px 6px;
	margin-left: 8px;
	flex-shrink: 0;
	transition: color 0.2s ease;
}

.aaw-scroll-popup-close:hover {
	color: #1A1A1A;
}

/* -------------------------------------------------------------------------
   Responsive layout
   All structural breakpoint rules below are scoped with the
   :not(.aaw-scroll-popup-no-responsive) guard so the "Responsive Layout"
   widget control (Content > Scroll Behavior) can fully disable them and
   force the desktop layout on every screen size when turned off.
   ------------------------------------------------------------------------- */

/* Tablet: keep everything on one row, but tighten spacing/type so the
   message and both buttons comfortably fit before the widget stacks fully
   on phones. */
@media (max-width: 1024px) {
	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive) {
		left: 16px;
		right: 16px;
		bottom: 16px;
	}

	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive).aaw-position-top {
		top: 16px;
	}

	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive) .aaw-scroll-popup-inner {
		gap: 14px;
		padding: 14px 18px;
	}

	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive) .aaw-scroll-popup-message {
		font-size: 15px;
	}

	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive) .aaw-scroll-popup-avatar {
		width: 38px;
		height: 38px;
	}

	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive) .aaw-scroll-popup-actions {
		gap: 8px;
	}

	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive) .aaw-scroll-popup-btn {
		padding: 12px 18px;
		font-size: 14px;
	}
}

/* Mobile: stack the message and the action buttons into their own rows. */
@media (max-width: 767px) {
	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive) {
		left: 12px;
		right: 12px;
		bottom: 12px;
	}

	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive).aaw-position-top {
		top: 12px;
	}

	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive) .aaw-scroll-popup-inner {
		flex-wrap: wrap;
		padding: 16px;
		gap: 12px;
		position: relative;
	}

	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive) .aaw-scroll-popup-left {
		width: 100%;
	}

	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive) .aaw-scroll-popup-message {
		font-size: 15px;
		white-space: normal;
	}

	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive) .aaw-scroll-popup-actions {
		width: 100%;
		margin-left: 0;
	}

	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive) .aaw-scroll-popup-btn {
		flex: 1;
		padding: 12px 16px;
	}

	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive) .aaw-scroll-popup-close {
		position: absolute;
		top: 8px;
		right: 8px;
	}
}

/* Very small phones: avoid two buttons feeling cramped side-by-side. */
@media (max-width: 400px) {
	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive) .aaw-scroll-popup-actions {
		flex-wrap: wrap;
	}

	.aaw-scroll-popup-wrap:not(.aaw-scroll-popup-no-responsive) .aaw-scroll-popup-btn {
		flex: 1 1 100%;
	}
}

/* Elementor editor: always show the bar in-place so it can be edited */
.elementor-editor-active .aaw-scroll-popup-wrap {
	position: relative;
	left: auto;
	right: auto;
	top: auto;
	bottom: auto;
	opacity: 1;
	visibility: visible;
	transform: none;
	pointer-events: auto;
	margin: 10px 0;
}
