/**
 * Sample Docs for Gravity Forms
 *
 * Plain CSS on purpose — this ships as-is with no build step.
 *
 * Accent colour is overridable per site without touching this file:
 *   :root { --sdgf-accent: #0d6efd; }
 */

.sdgf-field {
	position: relative;
}

/* Beat .gform_wrapper.gravity-theme .gfield_label{padding:0} on specificity. */
.gform_wrapper.gravity-theme .sdgf-field .gfield_label {
	padding-left: 24px;
}

.sdgf-info {
	position: absolute;
	top: 7px;
	left: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--sdgf-accent, #8cb959);
	color: #fff;
	font: 700 12px/1 Georgia, serif;
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.2s ease;
}

.sdgf-info:hover,
.sdgf-info:focus-visible {
	filter: brightness(0.85);
	transform: scale(1.1);
}

.sdgf-info:focus-visible {
	outline: 2px solid #333;
	outline-offset: 2px;
}

/*
 * The popover is printed at body level (see render_popovers() in PHP) and positioned
 * with fixed coordinates written by JS from the trigger's getBoundingClientRect().
 * That combination is what keeps it clear of page-builder ancestors: a transformed
 * ancestor would otherwise become the containing block for position:fixed and trap it
 * behind the site header, unreachable by any z-index. Divi's fixed header sits at
 * 99999.
 */
.sdgf-pop {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 999999;
	width: 340px;
	max-width: calc(100vw - 24px);
	background: #fff;
	border: 1px solid #d8d8d8;
	border-radius: 6px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.sdgf-pop.is-open {
	opacity: 1;
	transform: none;
}

.sdgf-pop[hidden] {
	display: none;
}

.sdgf-pop__arrow {
	position: absolute;
	width: 10px;
	height: 10px;
	background: #fff;
	border-left: 1px solid #d8d8d8;
	border-top: 1px solid #d8d8d8;
	transform: rotate(45deg);
}

.sdgf-pop--below .sdgf-pop__arrow {
	top: -6px;
}

.sdgf-pop--above .sdgf-pop__arrow {
	bottom: -6px;
	transform: rotate(225deg);
}

.sdgf-pop__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 9px 10px 9px 13px;
	border-bottom: 1px solid #ededed;
}

.sdgf-pop__title {
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	color: #333;
}

.sdgf-pop__close {
	flex: none;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	background: none;
	font-size: 20px;
	line-height: 1;
	color: #999;
	cursor: pointer;
}

.sdgf-pop__close:hover {
	color: #333;
}

.sdgf-pop__body {
	padding: 10px;
	background: #f4f4f2;
}

.sdgf-pop__body img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	max-height: 340px;
	object-fit: contain;
	object-position: top center;
	border: 1px solid #ddd;
	background: #fff;
}

.sdgf-pop__full {
	display: block;
	padding: 9px 13px;
	border-top: 1px solid #ededed;
	font-size: 12px;
	line-height: 1.3;
	text-decoration: underline;
	color: #444;
}

.sdgf-pop__full:hover,
.sdgf-pop__full:focus-visible {
	color: #000;
}

@media (prefers-reduced-motion: reduce) {
	.sdgf-pop,
	.sdgf-info {
		transition: none;
	}
}
