/* OCT Global Fields — frontend button styling */

.octgf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-decoration: none;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}
.octgf-btn:hover {
	opacity: 0.95;
}
.octgf-btn .octgf-btn-icon {
	display: inline-flex;
	align-items: center;
}
.octgf-btn .octgf-btn-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* Sensible defaults if the widget is used without style tweaks */
.octgf-call-btn {
	background: #2563eb;
	color: #fff;
	padding: 12px 24px;
	border-radius: 6px;
}
.octgf-whatsapp-btn {
	background: #25d366;
	color: #062e17;
	padding: 12px 24px;
	border-radius: 6px;
}

/* Inline text links from shortcodes */
.octgf-phone-link,
.octgf-whatsapp-link {
	text-decoration: none;
}

/* Widget looping animations (opt-in per device via the widget's Animation control).
   animation-name/duration/iteration are applied by Elementor; these define the frames. */
@keyframes octgf-pulse {
	0%, 100% { transform: scale( 1 ); }
	50%      { transform: scale( 1.06 ); }
}
@keyframes octgf-bounce {
	0%, 100%   { transform: translateY( 0 ); }
	50%        { transform: translateY( -6px ); }
}
@keyframes octgf-float {
	0%, 100% { transform: translateY( 0 ); }
	50%      { transform: translateY( -4px ); }
}
@keyframes octgf-grow {
	0%   { transform: scale( 1 ); }
	50%  { transform: scale( 1.04 ); }
	100% { transform: scale( 1 ); }
}
@media ( prefers-reduced-motion: reduce ) {
	.octgf-btn { animation: none !important; }
}

/* Safety net: never leave our contact buttons stuck hidden. Elementor adds
   `elementor-invisible` (visibility:hidden; opacity:0) whenever a setting named
   `animation` is present and waits for its own entrance-animation JS to reveal
   the element. Our looping/hover animation controls are now `octgf_`-prefixed to
   avoid that collision, but this guarantees any legacy `animation` value lingering
   in saved element data can never hide the button on the front end. */
.elementor-widget-octgf-call-button.elementor-invisible,
.elementor-widget-octgf-whatsapp-button.elementor-invisible {
	visibility: visible !important;
	opacity: 1 !important;
	animation: none !important;
}

/* Floating contact buttons */
.octgf-fab {
	position: fixed;
	z-index: 99990;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.octgf-fab-left {
	align-items: flex-start;
}
.octgf-fab-right {
	align-items: flex-end;
}

/* The button is a fixed-size circle; it never changes size on hover, so
   hovering one button can never shift the others. */
.octgf-fab-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var( --octgf-fab-size, 56px );
	height: var( --octgf-fab-size, 56px );
	padding: 0;
	background: var( --octgf-fab-color, #25d366 );
	color: #fff;
	border-radius: var( --octgf-fab-radius, 50% );
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.25 );
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.octgf-fab-btn:hover {
	transform: scale( 1.06 );
	color: #fff;
	box-shadow: 0 10px 24px rgba( 0, 0, 0, 0.3 );
}
.octgf-fab-icon {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}
.octgf-fab-icon svg {
	display: block;
	width: 52%;
	height: 52%;
	fill: currentColor;
}

/* Label is absolutely positioned → it floats out on hover without affecting
   layout, so sibling buttons stay put. */
.octgf-fab-label {
	position: absolute;
	top: 50%;
	transform: translateY( -50% ) translateX( 8px );
	background: var( --octgf-fab-color, #25d366 );
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	padding: 10px 16px;
	border-radius: 30px;
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.2 );
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
/* Right side: label appears to the LEFT of the icon. */
.octgf-fab-right .octgf-fab-label {
	right: calc( 100% + 12px );
}
.octgf-fab-right .octgf-fab-btn:hover .octgf-fab-label {
	opacity: 1;
	transform: translateY( -50% ) translateX( 0 );
}
/* Left side: label appears to the RIGHT of the icon. */
.octgf-fab-left .octgf-fab-label {
	left: calc( 100% + 12px );
	transform: translateY( -50% ) translateX( -8px );
}
.octgf-fab-left .octgf-fab-btn:hover .octgf-fab-label {
	opacity: 1;
	transform: translateY( -50% ) translateX( 0 );
}

/* RTL sites: keep the label text direction correct. */
.rtl .octgf-fab-label,
[dir="rtl"] .octgf-fab-label {
	direction: rtl;
	text-align: center;
}
