/* ==========================================================================
   Amplifire Resource Block — Sidebar + Gated Content
   Standalone CSS, intentionally decoupled from Elementor's stylesheet.
   ========================================================================== */

.amp-resource-wrapper {
	position: relative;
}

/* ---------- Sidebar ---------- */

.amp-sidebar {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	background: linear-gradient(180deg, #b53030 0%, #7a1f1f 100%);
	border-radius: 0 32px 32px 0;
	padding: 22px 10px;
	width: 56px;
}

.amp-sidebar-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #ffffff;
	color: #b53030;
	flex-shrink: 0;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	cursor: pointer;
}

.amp-sidebar-icon:hover {
	transform: scale(1.08);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.amp-sidebar-icon.amp-download-locked {
	cursor: default;
	color: #b53030;
	opacity: 0.85;
}

.amp-sidebar-icon.amp-download-locked:hover {
	transform: none;
	box-shadow: none;
}

/* Tooltip for the locked state only — disappears automatically once the
   icon is swapped out by JS on unlock, since this element gets replaced. */
.amp-sidebar-icon.amp-download-locked {
	position: relative;
}

.amp-sidebar-icon.amp-download-locked::after {
	content: attr(data-tooltip);
	position: absolute;
	left: calc(100% + 12px);
	top: 50%;
	transform: translateY(-50%);
	background: #1a1a1a;
	color: #ffffff;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	padding: 6px 12px;
	border-radius: 4px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease;
	pointer-events: none;
	z-index: 600;
}

.amp-sidebar-icon.amp-download-locked:hover::after {
	opacity: 1;
	visibility: visible;
}

/* On small screens the sidebar is horizontal, so the tooltip should drop
   below the icon instead of trying to extend off-screen to the right. */
@media (max-width: 1024px) {
	.amp-sidebar-icon.amp-download-locked::after {
		left: 50%;
		top: calc(100% + 10px);
		transform: translateX(-50%);
		white-space: normal;
		max-width: 180px;
		text-align: center;
	}
}

/* Fixed vertical sidebar — large screens only */
@media (min-width: 1025px) {
	.amp-sidebar {
		position: fixed;
		left: 0;
		top: 40%;
		z-index: 500;
	}
}

/* Inline horizontal row — small screens */
@media (max-width: 1024px) {
	.amp-sidebar {
		position: relative;
		flex-direction: row;
		justify-content: center;
		width: auto;
		max-width: 220px;
		margin: 0 auto 24px auto;
		border-radius: 50px;
	}
}

/* ---------- Resource content ---------- */

.amp-resource-content {
	margin: 16px 0;
}

.amp-download-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #b53030 0%, #8a2424 100%);
	color: #ffffff;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 16px 36px;
	border-radius: 0 50px 0 50px;
	transition: opacity 0.15s ease;
}

.amp-download-button:hover {
	opacity: 0.9;
	color: #ffffff;
}

/* ---------- Gated form / media ---------- */


.amp-gated-media-wrapper {
	text-align: center;
}

#gform_wrapper_3 {
	max-width: 720px;
	margin: 0 auto;
}

.amp-gated-form-wrapper {
	margin-bottom: 16px;
}

.amp-gated-video-embed {
	position: relative;
	width: 100%;
	margin-bottom: 16px;
}

.amp-gated-video-embed iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	border: none;
}

.amp-gated-media-wrapper > a:not(.amp-download-button) {
	display: block;
	margin-bottom: 16px;
}

/* Download Now button when it appears inside the gated media wrapper
   (alongside a video or link), so it doesn't sit flush against it. */
.amp-gated-media-wrapper .amp-download-button {
	margin-top: 8px;
}
