/**
 * Inoforest Post Meta
 *
 * Contents
 * 1. Variables and colour schemes
 * 2. List and items
 * 3. Icons, avatar, links
 * 4. Dividers between items
 * 5. Line above / below
 * 6. Pill badges
 * 7. Editor hint and note
 *
 * 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 colour wins over the scheme and keeps its hover.
 */

/* 1. Variables and colour schemes ------------------------------------------- */
.inoforest-post-meta {
	--ino-pm-primary: var(--inoforest-color-primary, #0b7a75);
	--ino-pm-accent: var(--inoforest-color-accent, #ff6a3d);
	--ino-pm-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

:where(.inoforest-post-meta) {
	--ino-pm-text: var(--inoforest-color-text, #5a6a79);
	--ino-pm-link: var(--inoforest-color-heading, #0d1b2a);
	--ino-pm-link-hover: var(--ino-pm-primary);
	--ino-pm-icon: var(--ino-pm-primary);
	--ino-pm-divider: var(--inoforest-color-border, #e5ebef);
	--ino-pm-line: var(--inoforest-color-border, #e5ebef);
}

:where(.inoforest-post-meta[data-scheme="light"]) {
	--ino-pm-text: rgba(255, 255, 255, 0.85);
	--ino-pm-link: #fff;
	--ino-pm-link-hover: var(--ino-pm-accent);
	--ino-pm-icon: var(--ino-pm-accent);
	--ino-pm-divider: rgba(255, 255, 255, 0.35);
	--ino-pm-line: rgba(255, 255, 255, 0.2);
}

/* 2. List and items ------------------------------------------------------------ */
.inoforest-post-meta .inoforest-post-meta__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: var(--ino-pm-align, flex-start);
	gap: var(--ino-pm-row-gap, 10px) var(--ino-pm-gap, 26px);
	margin: 0;
	padding: 0;
	font-size: 0.925rem;
	font-weight: 600;
	color: var(--ino-pm-text);
	list-style: none;
}

.inoforest-post-meta .inoforest-post-meta__item {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: var(--ino-pm-inner-gap, 8px);
	min-width: 0;
	margin: 0;
	padding: 0;
}

.inoforest-post-meta__text {
	min-width: 0;
}

.inoforest-post-meta__prefix {
	color: var(--ino-pm-prefix, inherit);
}

/* 3. Icons, avatar, links -------------------------------------------------------- */
.inoforest-post-meta__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	font-size: var(--ino-pm-icon-size, 1.05rem);
	line-height: 1;
	color: var(--ino-pm-icon);
}

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

.inoforest-post-meta .inoforest-post-meta__item .inoforest-post-meta__avatar {
	flex: none;
	width: var(--ino-pm-avatar, 36px);
	height: var(--ino-pm-avatar, 36px);
	max-width: none;
	object-fit: cover;
	border-radius: 50%;
}

.inoforest-post-meta .inoforest-post-meta__link {
	color: var(--ino-pm-link);
	text-decoration: none;
	transition: color 0.35s var(--ino-pm-ease);
}

.inoforest-post-meta .inoforest-post-meta__link:hover,
.inoforest-post-meta .inoforest-post-meta__link:focus-visible {
	color: var(--ino-pm-link-hover);
}

/* 4. Dividers between items: centred in the space between items ------------------ */
.inoforest-post-meta:not([data-divider="none"]) .inoforest-post-meta__item + .inoforest-post-meta__item::before {
	position: absolute;
	top: 50%;
	left: calc(var(--ino-pm-gap, 26px) / -2);
	transform: translate(-50%, -50%);
	content: "";
}

.inoforest-post-meta[data-divider="line"] .inoforest-post-meta__item + .inoforest-post-meta__item::before {
	width: 1px;
	height: 1.1em;
	background: var(--ino-pm-divider);
}

.inoforest-post-meta[data-divider="dot"] .inoforest-post-meta__item + .inoforest-post-meta__item::before {
	width: 4px;
	height: 4px;
	background: var(--ino-pm-divider);
	border-radius: 50%;
}

.inoforest-post-meta[data-divider="slash"] .inoforest-post-meta__item + .inoforest-post-meta__item::before {
	color: var(--ino-pm-divider);
	content: "/";
}

/* 5. Line above / below ----------------------------------------------------------- */
.inoforest-post-meta[data-line="bottom"],
.inoforest-post-meta[data-line="both"] {
	padding-bottom: var(--ino-pm-line-space, 24px);
	border-bottom: var(--ino-pm-line-width, 1px) solid var(--ino-pm-line);
}

.inoforest-post-meta[data-line="top"],
.inoforest-post-meta[data-line="both"] {
	padding-top: var(--ino-pm-line-space, 24px);
	border-top: var(--ino-pm-line-width, 1px) solid var(--ino-pm-line);
}

/* 6. Pill badges ----------------------------------------------------------------------- */
.inoforest-post-meta[data-display="badges"] .inoforest-post-meta__item {
	flex-wrap: wrap;
	gap: var(--ino-pm-badge-gap, 8px);
}

.inoforest-post-meta .inoforest-post-meta__pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--ino-pm-badge-color, #fff);
	text-decoration: none;
	background-color: var(--ino-pm-badge-bg, var(--ino-pm-accent));
	border: 0 solid var(--ino-pm-badge-border, transparent);
	border-radius: 999px;
	transition: color 0.35s var(--ino-pm-ease), background-color 0.35s var(--ino-pm-ease), border-color 0.35s var(--ino-pm-ease);
}

.inoforest-post-meta .inoforest-post-meta__pill .inoforest-post-meta__icon {
	font-size: var(--ino-pm-icon-size, 1em);
	color: inherit;
}

.inoforest-post-meta .inoforest-post-meta__pill .inoforest-post-meta__avatar {
	width: var(--ino-pm-avatar, 22px);
	height: var(--ino-pm-avatar, 22px);
	margin-left: -8px;
}

.inoforest-post-meta a.inoforest-post-meta__pill:hover,
.inoforest-post-meta a.inoforest-post-meta__pill:focus-visible {
	color: var(--ino-pm-badge-hover-color, #fff);
	background-color: var(--ino-pm-badge-hover-bg, var(--ino-pm-primary));
	border-color: var(--ino-pm-badge-hover-border, var(--ino-pm-badge-border, transparent));
}

/* 7. Editor hint and note ------------------------------------------------------------- */
.inoforest-post-meta__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-meta__note {
	margin: 8px 0 0;
	color: var(--ino-pm-text);
	font-size: 0.75rem;
	font-weight: 500;
	opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
	.inoforest-post-meta .inoforest-post-meta__link,
	.inoforest-post-meta .inoforest-post-meta__pill {
		transition: none;
	}
}
