/* Tomjesch Simple Affiliate – front/editor shared block styles.
 * Colors come from --tjsa-bg (set via settings CSS or block CSS custom properties).
 * Override any .tjsa-* class from your theme stylesheet.
 */

.tjsa-block {
	box-sizing: border-box;
	margin: 1.25rem 0;
	padding: 1rem 1.25rem;
}

.tjsa-block .dashicons,
.tjsa-block .tjsa-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 1.125em;
	height: 1.125em;
	margin: 0;
	padding: 0;
	font-size: 1.125em;
	line-height: 1;
	vertical-align: middle;
	speak: never;
	color: var(--tjsa-icon, var(--tjsa-title, inherit));
}

/* Dashicons render via ::before; keep the glyph centered in the icon box. */
.tjsa-block .dashicons::before,
.tjsa-block .tjsa-icon::before {
	display: block;
	width: 1em;
	height: 1em;
	font-size: inherit;
	line-height: 1;
	text-align: center;
}

.tjsa-authorbox {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	background-color: var(--tjsa-bg, #f5f5f5);
}

.tjsa-authorbox__image {
	border-radius: 999px;
	display: block;
}

.tjsa-authorbox p.tjsa-authorbox__name,
.tjsa-authorbox__name {
	margin: 0 0 0.75rem;
	font-weight: 700;
}

.tjsa-authorbox__bio {
	margin: 0;
}

.tjsa-authorbox__bio p:last-child {
	margin-bottom: 0;
}

.tjsa-last-edited__label {
	margin: 0;
}

.tjsa-block.tjsa-last-edited {
	padding-left: 0;
	padding-right: 0;
}

.tjsa-tldr,
.tjsa-expert-quote,
.tjsa-affiliate-disclaimer,
.tjsa-experience,
.tjsa-looked-out-for,
.tjsa-less-useful-for,
.tjsa-featured-offer,
.tjsa-discount-code {
	background-color: var(--tjsa-bg, #f5f5f5);
	color: var(--tjsa-text, inherit);
}

.tjsa-tldr__header,
.tjsa-experience__header,
.tjsa-looked-out-for__header,
.tjsa-less-useful-for__header,
.tjsa-featured-offer__header,
.tjsa-discount-code__header,
.tjsa-expert-quote__header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}

.tjsa-tldr__header .tjsa-icon,
.tjsa-experience__header .tjsa-icon,
.tjsa-looked-out-for__header .tjsa-icon,
.tjsa-less-useful-for__header .tjsa-icon,
.tjsa-featured-offer__header .tjsa-icon,
.tjsa-discount-code__header .tjsa-icon,
.tjsa-expert-quote__header .tjsa-icon {
	/* Optical correction: Dashicon glyphs often sit slightly high in the em box. */
	transform: translateY(0.06em);
}

.tjsa-block h3.tjsa-tldr__title,
.tjsa-block h3.tjsa-experience__title,
.tjsa-block h3.tjsa-looked-out-for__title,
.tjsa-block h3.tjsa-less-useful-for__title,
.tjsa-block h3.tjsa-featured-offer__title,
.tjsa-block h3.tjsa-discount-code__title {
	margin: 0;
	padding: 0;
	font-size: 1.125rem;
	line-height: 1.25;
	color: var(--tjsa-title, inherit);
}

.tjsa-tldr__summary p:last-child,
.tjsa-experience__summary p:last-child,
.tjsa-featured-offer__message p:last-child {
	margin-bottom: 0;
}

.tjsa-expert-quote__quote {
	margin: 0.5rem 0;
	padding: 0;
	border: 0;
	font-size: 1.05rem;
}

.tjsa-expert-quote__name {
	margin: 0;
	font-weight: 600;
}

.tjsa-google-follow {
	padding: 0;
	background: transparent;
}

.tjsa-google-follow__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	box-sizing: border-box;
	padding: 0.7rem 1.25rem;
	border: 1px solid #dadce0;
	border-radius: 0.5rem;
	background: #f1f3f4;
	color: #202124;
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none;
	cursor: pointer;
}

.tjsa-google-follow__button:hover,
.tjsa-google-follow__button:focus {
	background: #e8eaed;
	border-color: #c6c9ce;
	color: #202124;
	opacity: 1;
	text-decoration: none;
}

.tjsa-google-follow__icon,
.tjsa-google-follow .google-favorite-cta__icon {
	display: block;
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	margin: 0;
	padding: 0;
	transform: none;
}

.tjsa-google-follow__label {
	display: inline-block;
	margin: 0;
	padding: 0;
	line-height: 1.25;
	vertical-align: middle;
	color: #000000;
}

.tjsa-featured-offer__actions {
	margin: 1rem 0 0;
}

.tjsa-featured-offer__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	box-sizing: border-box;
	padding: 0.65rem 1.15rem;
	border: 1px solid var(--tjsa-text, currentColor);
	border-radius: 0.5rem;
	background: transparent;
	color: var(--tjsa-text, inherit);
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none;
	cursor: pointer;
}

.tjsa-featured-offer__button:hover,
.tjsa-featured-offer__button:focus {
	opacity: 0.85;
	color: var(--tjsa-text, inherit);
	text-decoration: none;
}

.tjsa-featured-offer__button-label {
	display: inline-block;
	margin: 0;
	padding: 0;
	line-height: 1.25;
	color: var(--tjsa-text, inherit);
}

.tjsa-discount-code__copy {
	display: inline-block;
	padding: 0.55rem 1rem;
	border: 1px solid currentColor;
	border-radius: 0.5rem;
	background: transparent;
	color: var(--tjsa-text, inherit);
	text-decoration: none;
	cursor: pointer;
	line-height: 1.3;
}

.tjsa-discount-code__copy:hover {
	opacity: 0.85;
}

.tjsa-looked-out-for__list,
.tjsa-less-useful-for__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.5rem 1.25rem;
}

.tjsa-looked-out-for__list:has(> .tjsa-looked-out-for__item:nth-child(4)),
.tjsa-less-useful-for__list:has(> .tjsa-less-useful-for__item:nth-child(4)) {
	grid-template-columns: 1fr 1fr;
}

.tjsa-looked-out-for__item,
.tjsa-less-useful-for__item {
	position: relative;
	margin: 0;
	padding-left: 1.5rem;
}

.tjsa-looked-out-for__item::before,
.tjsa-less-useful-for__item::before {
	position: absolute;
	left: 0;
	top: 0;
	font-weight: 700;
	line-height: 1.4;
}

.tjsa-looked-out-for__item::before {
	content: "✓";
	color: var(--tjsa-icon, #1a7f37);
}

.tjsa-less-useful-for__item::before {
	content: "✕";
	color: var(--tjsa-icon, #b32d2e);
}

@media (max-width: 600px) {
	.tjsa-looked-out-for__list:has(> .tjsa-looked-out-for__item:nth-child(4)),
	.tjsa-less-useful-for__list:has(> .tjsa-less-useful-for__item:nth-child(4)) {
		grid-template-columns: 1fr;
	}
}

.tjsa-affiliate-disclaimer__message {
	margin: 0;
}

.tjsa-featured-offer__countdown {
	margin: 0.75rem 0;
	font-size: 18px;
	font-variant-numeric: tabular-nums;
}

.tjsa-featured-offer__countdown--ended {
	opacity: 0.65;
}

.tjsa-discount-code__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: stretch;
}

.tjsa-discount-code__input {
	flex: 1 1 12rem;
	min-width: 0;
	padding: 0.5rem 0.75rem;
	border: 1px solid #c3c4c7;
	background: #fff;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.tjsa-discount-code__copy.is-copied {
	opacity: 0.7;
}
