/**
 * RSM Buttons — front-end styles
 */

.rsmspark-btn {
	--rsmspark-btn-padding-x: 1.25em;
	--rsmspark-btn-padding-y: 0.75em;
	--rsmspark-btn-font-size: 1rem;
	--rsmspark-btn-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	box-sizing: border-box;
	max-width: 100%;
	width: max-content;
	padding: var(--rsmspark-btn-padding-y) var(--rsmspark-btn-padding-x);
	border: var(--rsmspark-btn-border-width, 0) var(--rsmspark-btn-border-style, solid) var(--rsmspark-btn-border, transparent);
	border-radius: var(--rsmspark-btn-radius, 8px);
	background: var(--rsmspark-btn-bg, #2563eb);
	color: var(--rsmspark-btn-text, #fff);
	font-size: var(--rsmspark-btn-font-size, 1rem);
	font-weight: var(--rsmspark-btn-font-weight, 600);
	line-height: 1.2;
	text-decoration: none;
	text-transform: var(--rsmspark-btn-text-transform, none);
	cursor: pointer;
	user-select: none;
	box-shadow: var(--rsmspark-btn-shadow, none);
	transition: transform var(--rsmspark-btn-transition, 0.2s) ease, box-shadow var(--rsmspark-btn-transition, 0.2s) ease, background var(--rsmspark-btn-transition, 0.2s) ease, color var(--rsmspark-btn-transition, 0.2s) ease, border-color var(--rsmspark-btn-transition, 0.2s) ease;
}

.rsmspark-btn--full {
	display: flex;
	width: 100%;
}

.rsmspark-btn--custom-width {
	width: var(--rsmspark-btn-width);
	max-width: 100%;
}

.rsmspark-btn__inner {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	width: auto;
}

.rsmspark-btn--full .rsmspark-btn__inner {
	width: 100%;
}

/* Classic widgets and SiteOrigin cells often stretch links to the container width. */
.textwidget > .rsmspark-btn:not(.rsmspark-btn--full),
.widget_text .rsmspark-btn:not(.rsmspark-btn--full),
.so-widget-buttons .rsmspark-btn:not(.rsmspark-btn--full),
.panel-grid-cell .rsmspark-btn:not(.rsmspark-btn--full) {
	width: max-content;
	max-width: 100%;
}

.rsmspark-btn__text {
	display: flex;
	flex-direction: column;
	align-items: inherit;
	justify-content: center;
	line-height: 1.15;
	text-align: inherit;
}

.rsmspark-btn__line2 {
	font-size: 0.78em;
	font-weight: 500;
	opacity: 0.92;
	margin-top: 0.15em;
}

.rsmspark-btn__icon {
	font-size: 1.15em;
	width: 1.15em;
	height: 1.15em;
	color: var(--rsmspark-btn-icon-color, currentColor);
}

.rsmspark-btn__icon--svg {
	display: inline-block;
	flex-shrink: 0;
	fill: currentColor;
	vertical-align: middle;
}

.rsmspark-btn--small {
	--rsmspark-btn-padding-x: 0.9em;
	--rsmspark-btn-padding-y: 0.45em;
	--rsmspark-btn-font-size: 0.875rem;
}

.rsmspark-btn--large {
	--rsmspark-btn-padding-x: 1.6em;
	--rsmspark-btn-padding-y: 0.95em;
	--rsmspark-btn-font-size: 1.125rem;
}

.rsmspark-btn--shadow-none { --rsmspark-btn-shadow: none; }
.rsmspark-btn--shadow-soft { --rsmspark-btn-shadow: 0 4px 14px rgba(15, 23, 42, 0.12); }
.rsmspark-btn--shadow-medium { --rsmspark-btn-shadow: 0 10px 24px rgba(15, 23, 42, 0.16); }
.rsmspark-btn--shadow-strong { --rsmspark-btn-shadow: 0 16px 40px rgba(15, 23, 42, 0.22); }

.rsmspark-btn:hover,
.rsmspark-btn:focus-visible {
	background: var(--rsmspark-btn-bg-hover, var(--rsmspark-btn-bg, #1d4ed8));
	color: var(--rsmspark-btn-text-hover, var(--rsmspark-btn-text, #fff));
	border-color: var(--rsmspark-btn-border-hover, var(--rsmspark-btn-border, transparent));
	text-decoration: none;
}

.rsmspark-btn--hover-lift:hover,
.rsmspark-btn--hover-lift-glow:hover { transform: translateY(-2px); }
.rsmspark-btn--hover-scale:hover { transform: scale(1.03); }
.rsmspark-btn--hover-glow:hover,
.rsmspark-btn--hover-lift-glow:hover { box-shadow: 0 0 0 4px color-mix(in srgb, var(--rsmspark-btn-bg-hover, #2563eb) 25%, transparent), var(--rsmspark-btn-shadow, none); }

.rsmspark-btn--hover-pulse:hover { animation: rsmspark-btn-pulse 0.85s ease-in-out infinite; }
.rsmspark-btn--hover-shine { position: relative; overflow: hidden; }
.rsmspark-btn--hover-shine::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
	transform: translateX(-120%);
	transition: transform 0.55s ease;
	pointer-events: none;
}
.rsmspark-btn--hover-shine:hover::after { transform: translateX(120%); }

.rsmspark-btn__icon--img {
	width: 1.15em;
	height: 1.15em;
	object-fit: contain;
}

.rsmspark-btn-group {
	display: flex;
	flex-wrap: wrap;
	gap: var(--rsmspark-btn-group-gap, 12px);
}
.rsmspark-btn-group--horizontal { flex-direction: row; }
.rsmspark-btn-group--vertical { flex-direction: column; align-items: stretch; }
.rsmspark-btn-group--align-left { justify-content: flex-start; }
.rsmspark-btn-group--align-center { justify-content: center; }
.rsmspark-btn-group--align-right { justify-content: flex-end; }

@keyframes rsmspark-btn-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.04); }
}

.rsmspark-btn:focus-visible {
	outline: 2px solid color-mix(in srgb, var(--rsmspark-btn-bg, #2563eb) 60%, #fff);
	outline-offset: 3px;
}

.rsmspark-btn:active {
	transform: translateY(0) scale(0.98);
}

@media print {
	.rsmspark-btn { box-shadow: none !important; }
}
