/* ==========================================================================
   AI Share Buttons for WordPress — Frontend Styles
   ========================================================================== */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */

.aisbfw-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 28px 0;
	align-items: center;
	justify-content: center;
}

/* ── Base Button ─────────────────────────────────────────────────────────── */

.aisbfw-btn {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none !important;
	color: #fff !important;
	background-color: var(--aisbfw-color, #333);
	border: 2px solid transparent;
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	white-space: nowrap;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
}

.aisbfw-btn:hover,
.aisbfw-btn:focus-visible {
	filter: brightness(1.12);
	transform: translateY(-2px);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	color: #fff !important;
	text-decoration: none !important;
	outline: none;
}

.aisbfw-btn:active {
	transform: translateY(0);
	filter: brightness(0.95);
}

.aisbfw-btn svg {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	fill: currentColor;
}

/* ── Styles ──────────────────────────────────────────────────────────────── */

.aisbfw--style-rounded .aisbfw-btn { border-radius: 8px; }
.aisbfw--style-square  .aisbfw-btn { border-radius: 0; }
.aisbfw--style-pill    .aisbfw-btn { border-radius: 999px; }

/* ── Sizes ───────────────────────────────────────────────────────────────── */

.aisbfw--size-small .aisbfw-btn {
	padding: 7px 14px;
	font-size: 12px;
}
.aisbfw--size-small .aisbfw-btn svg {
	width: 14px;
	height: 14px;
}

.aisbfw--size-large .aisbfw-btn {
	padding: 14px 24px;
	font-size: 16px;
}
.aisbfw--size-large .aisbfw-btn svg {
	width: 22px;
	height: 22px;
}

/* ── Dark Mode ───────────────────────────────────────────────────────────── */

/* Always-dark */
.aisbfw--dark-dark .aisbfw-btn {
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Auto — respects system preference */
@media (prefers-color-scheme: dark) {
	.aisbfw--dark-auto .aisbfw-btn {
		box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
	}
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
	.aisbfw-wrap {
		flex-direction: column;
		align-items: stretch;
	}

	.aisbfw-btn {
		justify-content: center;
	}
}

/* ==========================================================================
   Floating Share Bar
   ========================================================================== */

.aisbfw-floating {
	position: fixed;
	bottom: 28px;
	right: 22px;
	z-index: 9990;
	display: flex;
	flex-direction: column-reverse;
	align-items: flex-end;
	gap: 8px;
}

/* Toggle button */
.aisbfw-floating__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 11px 20px;
	background: #1d2327;
	color: #fff;
	border: none;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
	transition: background 0.2s, transform 0.2s;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.aisbfw-floating__toggle:hover {
	background: #2c3338;
	transform: scale(1.04);
}

.aisbfw-floating__toggle svg {
	fill: currentColor;
}

/* Panel */
.aisbfw-floating__panel {
	display: none;
	flex-direction: column;
	gap: 6px;
	align-items: flex-end;
	animation: aisbfw-panel-in 0.2s ease;
}

.aisbfw-floating__panel.is-open {
	display: flex;
}

@keyframes aisbfw-panel-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.aisbfw-floating__label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #646970;
	margin: 0 4px 2px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Floating buttons */
.aisbfw-floating__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	color: #fff !important;
	text-decoration: none !important;
	background-color: var(--aisbfw-color, #333);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	transition: filter 0.2s, transform 0.2s;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.aisbfw-floating__btn:hover {
	filter: brightness(1.1);
	transform: translateX(-3px);
	color: #fff !important;
	text-decoration: none !important;
}

.aisbfw-floating__btn svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	flex-shrink: 0;
}

/* Dark mode for floating bar */
@media (prefers-color-scheme: dark) {
	.aisbfw--dark-auto .aisbfw-floating__toggle {
		background: #f6f7f7;
		color: #1d2327;
	}
	.aisbfw--dark-auto .aisbfw-floating__toggle:hover {
		background: #dcdcde;
	}
}

.aisbfw--dark-dark .aisbfw-floating__toggle {
	background: #f6f7f7;
	color: #1d2327;
}

/* Mobile: move to bottom-center, horizontal scroll panel */
@media (max-width: 480px) {
	.aisbfw-floating {
		right: 0;
		left: 0;
		bottom: 0;
		flex-direction: column;
		align-items: center;
	}

	.aisbfw-floating__toggle {
		border-radius: 0;
		width: 100%;
		justify-content: center;
		box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
	}

	.aisbfw-floating__panel {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
		background: rgba(0, 0, 0, 0.88);
		padding: 10px;
		width: 100%;
	}

	.aisbfw-floating__label {
		display: none;
	}
}
