/**
 * Bolt CTA Button - Frontend Styles
 *
 * @package BoltCTAButton
 */

/* ──────────────────────────────────────────────
 * Theme isolation reset
 * Forces our styles to win regardless of theme.
 * Themes (Astra, OceanWP, Divi, etc.) often style
 * generic buttons/links — we override defensively.
 * ────────────────────────────────────────────── */
#cncb-bar,
#cncb-bar * {
	box-sizing: border-box;
}

#cncb-bar a,
#cncb-bar button {
	margin: 0 !important;
	border: 0 !important;
	background-image: none !important;
	font: inherit;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: none !important;
	text-shadow: none !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: none !important;
	max-height: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
	-webkit-tap-highlight-color: transparent;
	box-shadow: none;
	outline: none;
}

#cncb-bar a:hover,
#cncb-bar a:focus,
#cncb-bar button:hover,
#cncb-bar button:focus {
	background-image: none !important;
	text-decoration: none !important;
	text-shadow: none !important;
}

#cncb-bar svg {
	display: block;
	flex-shrink: 0;
	pointer-events: none;
}

/* Base Bar */
.cncb-bar {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 999999;
	display: flex;
	gap: 6px;
	transition: transform 0.35s ease, opacity 0.35s ease;
	box-sizing: border-box;
}

.cncb-position-bottom {
	bottom: 0;
}

.cncb-position-top {
	top: 0;
}

/* Hidden state for scroll behavior */
.cncb-bar.cncb-hidden.cncb-position-bottom {
	transform: translateY(100%);
	opacity: 0;
	pointer-events: none;
}

.cncb-bar.cncb-hidden.cncb-position-top {
	transform: translateY(-100%);
	opacity: 0;
	pointer-events: none;
}

/* Button Base */
#cncb-bar .cncb-btn {
	flex: 1 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	text-decoration: none !important;
	font-weight: 600 !important;
	font-size: 14px !important;
	line-height: 1.3 !important;
	padding: 12px 8px !important;
	box-sizing: border-box !important;
	transition: filter 0.2s ease, transform 0.2s ease;
	cursor: pointer;
	text-align: center !important;
}

#cncb-bar .cncb-btn:hover {
	filter: brightness(1.1);
	text-decoration: none !important;
	transform: none;
}

#cncb-bar .cncb-btn:active {
	transform: scale(0.97);
}

#cncb-bar .cncb-btn:focus-visible {
	outline: 2px solid #fff !important;
	outline-offset: -2px;
}

/* Horizontal layout: 1-2 buttons - icon left, text right */
.cncb-layout-horizontal .cncb-btn {
	flex-direction: row;
	gap: 8px;
}

.cncb-layout-horizontal .cncb-btn-icon {
	flex-shrink: 0;
}

.cncb-layout-horizontal .cncb-btn-icon svg,
.cncb-layout-horizontal .cncb-btn-icon i {
	width: 22px;
	height: 22px;
	font-size: 22px;
	display: block;
}

.cncb-layout-horizontal .cncb-btn-label {
	font-size: 15px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Vertical layout: 3+ buttons - icon top, text bottom */
.cncb-layout-vertical .cncb-btn {
	flex-direction: column;
	gap: 4px;
	padding: 10px 4px;
}

.cncb-layout-vertical .cncb-btn-icon svg,
.cncb-layout-vertical .cncb-btn-icon i {
	width: 20px;
	height: 20px;
	font-size: 20px;
	display: block;
}

.cncb-layout-vertical .cncb-btn-label {
	font-size: 11px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

/* Icon styling */
.cncb-btn-icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.cncb-btn-icon svg {
	fill: currentColor;
}

/* ========== ANIMATIONS ========== */

/* Pulse */
.cncb-anim-pulse .cncb-btn {
	animation: cncb-pulse 2.5s ease-in-out infinite;
}

@keyframes cncb-pulse {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.03);
	}
}

/* Glow */
.cncb-anim-glow .cncb-btn {
	animation: cncb-glow 2.5s ease-in-out infinite;
}

@keyframes cncb-glow {
	0%, 100% {
		box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
	}
	50% {
		box-shadow: 0 0 20px rgba(255, 255, 255, 0.4), 0 0 40px rgba(255, 255, 255, 0.1);
	}
}

/* Bounce */
.cncb-anim-bounce .cncb-btn {
	animation: cncb-bounce 2s ease-in-out infinite;
}

@keyframes cncb-bounce {
	0%, 100% {
		transform: translateY(0);
	}
	30% {
		transform: translateY(-4px);
	}
	50% {
		transform: translateY(0);
	}
	70% {
		transform: translateY(-2px);
	}
}

/* Shake */
.cncb-anim-shake .cncb-btn {
	animation: cncb-shake 4s ease-in-out infinite;
}

@keyframes cncb-shake {
	0%, 88%, 100% {
		transform: translateX(0);
	}
	90% {
		transform: translateX(-3px);
	}
	92% {
		transform: translateX(3px);
	}
	94% {
		transform: translateX(-3px);
	}
	96% {
		transform: translateX(3px);
	}
	98% {
		transform: translateX(-1px);
	}
}

/* Slide Up */
.cncb-anim-slide_up {
	animation: cncb-slide-up 0.6s ease-out;
}

@keyframes cncb-slide-up {
	0% {
		transform: translateY(100%);
		opacity: 0;
	}
	100% {
		transform: translateY(0);
		opacity: 1;
	}
}

.cncb-position-top.cncb-anim-slide_up {
	animation: cncb-slide-down 0.6s ease-out;
}

@keyframes cncb-slide-down {
	0% {
		transform: translateY(-100%);
		opacity: 0;
	}
	100% {
		transform: translateY(0);
		opacity: 1;
	}
}

/* ========== TRIGGER HIDDEN STATE ========== */
.cncb-bar.cncb-trigger-hidden {
	opacity: 0;
	pointer-events: none;
}

.cncb-position-bottom.cncb-trigger-hidden {
	transform: translateY(100%);
}

.cncb-position-top.cncb-trigger-hidden {
	transform: translateY(-100%);
}

/* ========== DEVICE-SPECIFIC CLASSES ========== */
.cncb-bar.cncb-mobile-only {
	display: none;
}

.cncb-bar.cncb-desktop-only {
	display: flex;
}

@media (max-width: 768px) {
	.cncb-bar.cncb-mobile-only {
		display: flex;
	}
	.cncb-bar.cncb-desktop-only {
		display: none !important;
	}
}

/* ========== SAFE AREA for notched devices ========== */
.cncb-position-bottom {
	padding-bottom: env(safe-area-inset-bottom, 0px);
}

.cncb-position-top {
	padding-top: env(safe-area-inset-top, 0px);
}

/* ========== PRINT ========== */
@media print {
	.cncb-bar {
		display: none !important;
	}
}

/* ── Bar Background Shadow (applies to bar element) ── */
#cncb-bar.cncb-shadow-none { box-shadow: none !important; }
#cncb-bar.cncb-shadow-sm   { box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.10) !important; }
#cncb-bar.cncb-shadow-md   { box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.16) !important; }
#cncb-bar.cncb-shadow-lg   { box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.24) !important; }
#cncb-bar.cncb-position-top.cncb-shadow-sm { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10) !important; }
#cncb-bar.cncb-position-top.cncb-shadow-md { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.16) !important; }
#cncb-bar.cncb-position-top.cncb-shadow-lg { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.24) !important; }

/* ── Bar Button Shadow (applies to each button independently) ── */
#cncb-bar.cncb-btn-shadow-none .cncb-btn { box-shadow: none !important; }
#cncb-bar.cncb-btn-shadow-sm   .cncb-btn { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.10), 0 1px 2px rgba(0, 0, 0, 0.08) !important; }
#cncb-bar.cncb-btn-shadow-md   .cncb-btn { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important; }
#cncb-bar.cncb-btn-shadow-lg   .cncb-btn { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important; }
#cncb-bar.cncb-btn-shadow-sm .cncb-btn:hover { box-shadow: 0 2px 5px rgba(0, 0, 0, 0.14), 0 1px 3px rgba(0, 0, 0, 0.10) !important; }
#cncb-bar.cncb-btn-shadow-md .cncb-btn:hover { box-shadow: 0 3px 12px rgba(0, 0, 0, 0.20) !important; }
#cncb-bar.cncb-btn-shadow-lg .cncb-btn:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.30) !important; }
