.fcb-wrap {
	position: relative;
	margin: 1.5em 0;
}

.fcb-wrap.fcb-align-left {
	text-align: left;
}

.fcb-wrap.fcb-align-center {
	text-align: center;
}

.fcb-wrap.fcb-align-right {
	text-align: right;
}

.fcb-ui {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	max-width: 100%;
}

.fcb-wrap.fcb-align-left .fcb-ui {
	align-items: flex-start;
}

.fcb-wrap.fcb-align-right .fcb-ui {
	align-items: flex-end;
}

.fcb-clap-button {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.42em;
	margin: 0;
	padding: 4px 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: #222222;
	font: inherit;
	font-size: 14.5px;
	font-weight: 400;
	line-height: 1.2;
	cursor: pointer;
	transition: opacity 0.15s ease, color 0.15s ease;
}

.fcb-clap-button:hover {
	color: #111111;
}

.fcb-clap-button:focus-visible,
.fcb-message-toggle:focus-visible,
.fcb-message-close:focus-visible,
.fcb-message-submit:focus-visible {
	outline: 2px solid #1d4ed8;
	outline-offset: 2px;
}

.fcb-message-form input[type="text"]:focus,
.fcb-message-form textarea:focus {
	border-color: #4aa3df;
	outline: 0;
	box-shadow:
		0 0 4px rgba( 45, 150, 220, 0.42 ),
		inset 0 1px 2px rgba( 0, 0, 0, 0.04 );
}

.fcb-icon {
	display: block;
	flex: 0 0 22px;
	width: 22px;
	height: 22px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.fcb-icon-clap .fcb-icon {
	background-image: url('../img/clap1.png');
}

.fcb-icon-clap .fcb-clap-button.fcb-active .fcb-icon,
.fcb-icon-clap .fcb-clap-button.fcb-limit-reached .fcb-icon {
	background-image: url('../img/clap2.png');
}

.fcb-icon-heart .fcb-icon {
	background-image: url('../img/clap11.png');
}

.fcb-icon-heart .fcb-clap-button.fcb-active .fcb-icon,
.fcb-icon-heart .fcb-clap-button.fcb-limit-reached .fcb-icon {
	background-image: url('../img/clap12.png');
}

.fcb-icon-like .fcb-icon {
	background-image: url('../img/clap21.png');
}

.fcb-icon-like .fcb-clap-button.fcb-active .fcb-icon,
.fcb-icon-like .fcb-clap-button.fcb-limit-reached .fcb-icon {
	background-image: url('../img/clap22.png');
}

.fcb-button-text {
	letter-spacing: 0;
}

.fcb-count {
	color: #333333;
	font-size: 0.98em;
}

.fcb-clap-button.fcb-limit-reached {
	opacity: 0.55;
	cursor: default;
}

.fcb-message-toggle {
	position: absolute;
	left: 50%;
	bottom: calc( 100% + 2px );
	z-index: 12;
	transform: translateX( -50% );
	margin: 0;
	padding: 4px 12px;
	border: 1px solid #222222;
	border-radius: 6px;
	background: #222222;
	box-shadow: 0 2px 6px rgba( 0, 0, 0, 0.16 );
	color: #ffffff;
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.fcb-message-toggle:hover {
	border-color: #555555;
	background: #555555;
}

.fcb-message-form {
	position: absolute;
	left: 50%;
	top: calc( 100% + 14px );
	z-index: 20;
	width: min( 280px, calc( 100vw - 24px ) );
	padding: 14px 13px 12px;
	border: 1px solid #d0d0d0;
	border-radius: 8px;
	background: #f5f5f5;
	box-shadow: 0 4px 12px rgba( 0, 0, 0, 0.18 );
	text-align: left;
	box-sizing: border-box;
	transform: translateX( -50% );
}

.fcb-wrap.fcb-align-left .fcb-message-form {
	left: 0;
	right: auto;
	transform: none;
}

.fcb-wrap.fcb-align-right .fcb-message-form {
	left: auto;
	right: 0;
	transform: none;
}

.fcb-message-form p {
	margin: 0 0 10px;
}

.fcb-message-form p:last-child {
	margin-bottom: 0;
}

.fcb-message-intro {
	padding-right: 24px;
	color: #111827;
	font-size: 15px;
	line-height: 1.65;
}

.fcb-message-form input[type="text"],
.fcb-message-form textarea {
	box-sizing: border-box;
	display: block;
	width: 100%;
	max-width: 100%;
	padding: 7px 10px;
	border: 1px solid #c9c9c9;
	border-radius: 5px;
	background: #ffffff;
	box-shadow: inset 0 1px 2px rgba( 0, 0, 0, 0.06 );
	color: #222222;
	font: inherit;
	font-size: 14px;
	line-height: 1.4;
}

.fcb-message-form input[type="text"]::placeholder,
.fcb-message-form textarea::placeholder {
	color: #8b8b8b;
}

.fcb-message-form textarea {
	min-height: 110px;
	resize: vertical;
}

.fcb-message-close {
	position: absolute;
	right: -10px;
	top: -10px;
	display: block;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent url('../img/close.png') center / 24px 24px no-repeat;
	box-shadow: none;
	cursor: pointer;
}

.fcb-message-close:hover {
	opacity: 0.82;
}

.fcb-message-submit {
	padding: 7px 15px;
	border: 1px solid #2d6ea3;
	border-radius: 4px;
	background: linear-gradient( to bottom, #4f96d2 0%, #2f76b4 100% );
	color: #ffffff;
	font: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.2;
	text-shadow: none;
	box-shadow: none;
	-webkit-font-smoothing: antialiased;
	cursor: pointer;
}

.fcb-message-submit:hover:not(:disabled) {
	background: linear-gradient( to bottom, #5aa1dc 0%, #2f76b4 100% );
}

.fcb-message-submit:disabled {
	opacity: 0.7;
	cursor: default;
}


/* =========================================================
   Clap limit celebration: instant firework
   ========================================================= */

.fcb-limit-celebration {
	position: absolute;
	left: 50%;
	top: 8px;
	z-index: 30;
	display: block;
	width: 1px;
	height: 1px;
	transform: translateX( -50% );
	pointer-events: none;
	overflow: visible;
}

.fcb-firework-launch {
	position: absolute;
	left: 0;
	top: 0;
	width: 4px;
	height: 4px;
	margin: -2px 0 0 -2px;
	border-radius: 50%;
	background: rgba( 239, 145, 176, 0.98 );
	box-shadow: 0 0 5px rgba( 239, 145, 176, 0.55 );
	animation: fcb-firework-launch 0.11s ease-out forwards;
}

.fcb-firework-particle {
	--fcb-firework-x: 0px;
	--fcb-firework-y: -42px;
	--fcb-firework-size: 4px;
	--fcb-firework-duration: 0.56s;

	position: absolute;
	left: 0;
	top: -20px;
	width: var(--fcb-firework-size);
	height: var(--fcb-firework-size);
	margin: calc( var(--fcb-firework-size) / -2 ) 0 0 calc( var(--fcb-firework-size) / -2 );
	border-radius: 50%;
	background: rgba( 239, 145, 176, 0.96 );
	box-shadow: 0 0 4px rgba( 239, 145, 176, 0.34 );
	opacity: 0;
	animation: fcb-firework-burst var(--fcb-firework-duration) cubic-bezier( 0.12, 0.72, 0.3, 1 ) 0.10s forwards;
}

.fcb-firework-particle:nth-child( 3n ) {
	background: rgba( 249, 190, 205, 0.98 );
}

.fcb-firework-particle:nth-child( 4n ) {
	background: rgba( 226, 118, 156, 0.92 );
}

.fcb-firework-particle:nth-child( 5n ) {
	background: rgba( 255, 218, 226, 1 );
}

@keyframes fcb-firework-launch {
	0% {
		opacity: 1;
		transform: translateY( 0 ) scale( 0.8 );
	}

	100% {
		opacity: 0.95;
		transform: translateY( -20px ) scale( 1 );
	}
}

@keyframes fcb-firework-burst {
	0% {
		opacity: 1;
		transform: translate( 0, 0 ) scale( 0.7 );
	}

	58% {
		opacity: 1;
		transform: translate( calc( var(--fcb-firework-x) * 0.76 ), calc( var(--fcb-firework-y) * 0.76 ) ) scale( 1 );
	}

	100% {
		opacity: 0;
		transform: translate( var(--fcb-firework-x), var(--fcb-firework-y) ) scale( 0.25 );
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.fcb-limit-celebration {
		display: none;
	}
}

.fcb-status {
	display: flex;
	align-items: center;
	gap: 8px;
	width: fit-content;
	max-width: min( 100%, 28rem );
	margin: 8px auto 0;
	font-size: 0.95rem;
	line-height: 1.6;
	text-align: left;
	word-break: break-word;
}

.fcb-wrap.fcb-align-left .fcb-status {
	margin-left: 0;
	margin-right: auto;
}

.fcb-wrap.fcb-align-right .fcb-status {
	margin-left: auto;
	margin-right: 0;
}

.fcb-status-success::after {
	content: "✓";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #2fb65e;
	color: #ffffff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	flex: 0 0 24px;
}

.fcb-status-error {
	color: #b42318;
}

.fcb-is-hidden {
	display: none;
}

.fcb-recent-claps {
	margin: 0;
	padding-left: 1.25em;
}

.fcb-recent-claps li + li {
	margin-top: 0.35em;
}

@media ( max-width: 480px ) {
	.fcb-clap-button {
		font-size: 13px;
	}

	.fcb-message-form {
		width: min( 280px, calc( 100vw - 18px ) );
		padding: 14px 11px 11px;
	}

	.fcb-status {
		max-width: min( 100%, 18rem );
		font-size: 0.9rem;
	}
}
