/**
 * Inoforest Post Tags & Share
 *
 * Contents
 * 1. Variables
 * 2. Layout and lines
 * 3. Labels
 * 4. Tag pills
 * 5. Share buttons
 * 6. Copied message
 * 7. Editor hint and note, reduced motion
 *
 * Colours read the Design System (--inoforest-color-*) with the Travel26 design as fallback. The Style tab's colour
 * controls set the same variables on the widget root, so a picked normal colour keeps the default hover colours.
 */

/* 1. Variables ------------------------------------------------------------------ */
.inoforest-post-share {
	--ino-ps-primary: var(--inoforest-color-primary, #0b7a75);
	--ino-ps-accent: var(--inoforest-color-accent, #ff6a3d);
	--ino-ps-heading: var(--inoforest-color-heading, #0d1b2a);
	--ino-ps-text: var(--inoforest-color-text, #5a6a79);
	--ino-ps-soft: var(--inoforest-color-surface, #f4f8f8);
	--ino-ps-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* 2. Layout and lines ---------------------------------------------------------------- */
.inoforest-post-share {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--ino-ps-gap, 20px);
	color: var(--ino-ps-text);
}

.inoforest-post-share[data-line="top"],
.inoforest-post-share[data-line="both"] {
	padding-top: var(--ino-ps-line-space, 26px);
	border-top: var(--ino-ps-line-width, 1px) solid var(--ino-ps-line, var(--inoforest-color-border, #e5ebef));
}

.inoforest-post-share[data-line="bottom"],
.inoforest-post-share[data-line="both"] {
	padding-bottom: var(--ino-ps-line-space, 26px);
	border-bottom: var(--ino-ps-line-width, 1px) solid var(--ino-ps-line, var(--inoforest-color-border, #e5ebef));
}

.inoforest-post-share__group {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ino-ps-item-gap, 8px);
	min-width: 0;
}

/* Share buttons alone stay on the right in the side-by-side layout. */
.inoforest-post-share__group--share:first-child {
	margin-left: auto;
}

.inoforest-post-share .inoforest-post-share__list {
	display: contents;
	margin: 0;
	padding: 0;
	list-style: none;
}

.inoforest-post-share .inoforest-post-share__list > li {
	display: flex;
	margin: 0;
	padding: 0;
}

/* 3. Labels --------------------------------------------------------------------------- */
.inoforest-post-share__label {
	margin-right: var(--ino-ps-label-space, 6px);
	font-weight: 800;
	color: var(--ino-ps-heading);
}

/* 4. Tag pills ------------------------------------------------------------------------- */
.inoforest-post-share .inoforest-post-share__tag {
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1.75;
	color: var(--ino-ps-tag-color, var(--ino-ps-text));
	text-decoration: none;
	background-color: var(--ino-ps-tag-bg, var(--ino-ps-soft));
	border: 0 solid var(--ino-ps-tag-border, transparent);
	border-radius: 999px;
	transition: color 0.35s var(--ino-ps-ease), background-color 0.35s var(--ino-ps-ease), border-color 0.35s var(--ino-ps-ease);
}

.inoforest-post-share a.inoforest-post-share__tag:hover,
.inoforest-post-share a.inoforest-post-share__tag:focus-visible {
	color: var(--ino-ps-tag-hover-color, #fff);
	background-color: var(--ino-ps-tag-hover-bg, var(--ino-ps-primary));
	border-color: var(--ino-ps-tag-hover-border, var(--ino-ps-tag-border, transparent));
}

/* 5. Share buttons ------------------------------------------------------------------------ */
.inoforest-post-share .inoforest-post-share__button {
	display: grid;
	place-items: center;
	width: var(--ino-ps-button, 40px);
	height: var(--ino-ps-button, 40px);
	margin: 0;
	padding: 0;
	font: inherit;
	font-size: var(--ino-ps-icon, 17px);
	line-height: 1;
	color: var(--ino-ps-button-color, var(--ino-ps-heading));
	text-decoration: none;
	cursor: pointer;
	background-color: var(--ino-ps-button-bg, var(--ino-ps-soft));
	border: 0 solid var(--ino-ps-button-border, transparent);
	border-radius: 50%;
	box-shadow: none;
	transition: color 0.35s var(--ino-ps-ease), background-color 0.35s var(--ino-ps-ease), border-color 0.35s var(--ino-ps-ease), transform 0.35s var(--ino-ps-ease);
}

.inoforest-post-share .inoforest-post-share__button svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.inoforest-post-share .inoforest-post-share__button:hover,
.inoforest-post-share .inoforest-post-share__button:focus-visible {
	color: var(--ino-ps-button-hover-color, #fff);
	background-color: var(--ino-ps-button-hover-bg, var(--ino-ps-accent));
	border-color: var(--ino-ps-button-hover-border, var(--ino-ps-button-border, transparent));
	transform: translateY(var(--ino-ps-lift, -3px));
}

.inoforest-post-share .inoforest-post-share__button:focus-visible {
	outline: 2px solid var(--ino-ps-button-hover-bg, var(--ino-ps-accent));
	outline-offset: 2px;
}

/* 6. Copied message: a small bubble above the buttons, shown while it holds text ------------- */
.inoforest-post-share__status {
	position: absolute;
	right: 0;
	bottom: calc(100% + 10px);
	z-index: 2;
	padding: 6px 12px;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
	white-space: nowrap;
	pointer-events: none;
	background-color: var(--ino-ps-heading);
	border-radius: 8px;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.25s var(--ino-ps-ease), transform 0.25s var(--ino-ps-ease);
}

.inoforest-post-share__status:empty {
	padding: 0;
}

.inoforest-post-share__status.is-visible {
	opacity: 1;
	transform: none;
}

/* 7. Editor hint and note, reduced motion ----------------------------------------------- */
.inoforest-post-share__hint {
	margin: 0;
	padding: 14px 18px;
	font-size: 0.875rem;
	text-align: center;
	border: 1px dashed var(--inoforest-color-border, #e5ebef);
	border-radius: 12px;
}

.inoforest-post-share__note {
	flex-basis: 100%;
	margin: 0;
	font-size: 0.75rem;
	opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
	.inoforest-post-share .inoforest-post-share__tag,
	.inoforest-post-share .inoforest-post-share__button,
	.inoforest-post-share__status {
		transition: none;
	}

	.inoforest-post-share .inoforest-post-share__button:hover,
	.inoforest-post-share .inoforest-post-share__button:focus-visible {
		transform: none;
	}
}

@media (max-width: 767px) {
	.inoforest-post-share__status {
		right: auto;
		left: 0;
	}
}
