/* LYNO Tools: contact form and like button. Colors follow the theme presets when they exist. */
.lyno-form { display: grid; gap: 1.25rem; max-width: 40rem; }
.lyno-form p { margin: 0; }
.lyno-form label { display: grid; gap: 0.4rem; font-size: 0.9375rem; font-weight: 600; }
.lyno-form input[type="text"],
.lyno-form input[type="email"],
.lyno-form textarea {
	box-sizing: border-box; width: 100%; min-width: 0; padding: 0.75rem 0.9rem; font: inherit; font-weight: 400; color: inherit;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid color-mix(in srgb, currentColor 30%, transparent); border-radius: 8px;
}
.lyno-form :is(input, textarea):focus-visible { outline: 2px solid var(--wp--preset--color--accent-3, #2271b1); outline-offset: 1px; }
.lyno-form__trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lyno-form__note { padding: 0.75rem 1rem; border-radius: 8px; font-size: 0.9375rem; }
.lyno-form__note.is-success { background: color-mix(in srgb, var(--wp--preset--color--accent-3, #2271b1) 12%, transparent); }
.lyno-form__note.is-error { background: color-mix(in srgb, #d63638 12%, transparent); }
.lyno-form button[disabled] { opacity: 0.6; cursor: progress; }

.lyno-like { margin-block: 2rem; }
.lyno-like.aligncenter { text-align: center; }
.lyno-like.alignright { text-align: right; }
.lyno-like__button {
	display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1.1rem; font: inherit; font-size: 0.9375rem; font-weight: 600;
	color: inherit; background: transparent; cursor: pointer;
	border: 1px solid color-mix(in srgb, currentColor 30%, transparent); border-radius: 999px;
	transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.lyno-like__button:hover { transform: translateY(-1px); }
.lyno-like__icon { color: color-mix(in srgb, currentColor 45%, transparent); transition: color 0.2s, transform 0.2s; }
.lyno-like__button[aria-pressed="true"] { cursor: default; border-color: #e0245e; background: color-mix(in srgb, #e0245e 8%, transparent); }
.lyno-like__button[aria-pressed="true"] .lyno-like__icon { color: #e0245e; transform: scale(1.2); }
.lyno-like__count { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .lyno-like__button, .lyno-like__icon { transition: none; } }

/* Table of contents */
.lyno-toc { margin-block: 2.5rem; padding: 1.25rem 1.5rem; border: 1px solid color-mix(in srgb, currentColor 16%, transparent); border-radius: 12px; background: var(--wp--preset--color--accent-5, #f6f7f7); font-size: 0.9375rem; }
.lyno-toc summary { font-weight: 700; cursor: pointer; }
.lyno-toc ol { margin: 0.75rem 0 0; padding-left: 1.4em; }
.lyno-toc ol ol { margin-top: 0.25rem; font-size: 0.9333em; }
.lyno-toc li { margin-block: 0.3rem; line-height: 1.6; }
.lyno-toc a { text-decoration: none; }
.lyno-toc a:hover { text-decoration: underline; }
:is(h2, h3)[id] { scroll-margin-top: 5rem; }

/* Share links */
.lyno-share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-block: 2.5rem; }
.lyno-share__label { font-size: 0.8125rem; font-weight: 700; margin-right: 0.25rem; }
.lyno-share__link { padding: 0.4rem 1rem; font: inherit; font-size: 0.8125rem; font-weight: 600; line-height: 1.6; color: inherit; text-decoration: none; background: transparent; cursor: pointer; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); border-radius: 999px; }
.lyno-share__link:hover { background: color-mix(in srgb, currentColor 8%, transparent); }

/* Related and popular posts */
.lyno-posts { margin-block: 3rem; }
.lyno-posts__title { font-size: 1.25rem; margin: 0 0 1.25rem; }
.lyno-posts ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.lyno-posts a { display: grid; gap: 0.6rem; color: inherit; text-decoration: none; }
.lyno-posts img, .lyno-posts__blank { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 10px; background: color-mix(in srgb, currentColor 8%, transparent); }
.lyno-posts__name { font-size: 0.9375rem; font-weight: 600; line-height: 1.6; }
.lyno-posts a:hover .lyno-posts__name { text-decoration: underline; }
.lyno-posts.is-popular ul { counter-reset: lyno-rank; }
.lyno-posts.is-popular li { counter-increment: lyno-rank; position: relative; }
.lyno-posts.is-popular li::before { content: counter(lyno-rank); position: absolute; left: 8px; top: 8px; z-index: 1; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; font-size: 0.8125rem; font-weight: 700; color: #fff; background: var(--wp--preset--color--accent-3, #1d2327); }

/* Card for a link to another post */
.lyno-card { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; align-items: center; padding: 0.75rem; color: inherit; text-decoration: none; border: 1px solid color-mix(in srgb, currentColor 16%, transparent); border-radius: 12px; }
.lyno-card:hover { background: color-mix(in srgb, currentColor 4%, transparent); }
.lyno-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; }
.lyno-card:not(:has(img)) { grid-template-columns: 1fr; }
.lyno-card__body { display: grid; gap: 0.3rem; }
.lyno-card__title { font-weight: 700; line-height: 1.5; }
.lyno-card__text { font-size: 0.8125rem; line-height: 1.6; opacity: 0.75; }
@media (max-width: 480px) { .lyno-card { grid-template-columns: 6rem 1fr; } .lyno-card__text { display: none; } }

/* Link card with a caption on the frame (pages of other sites, cards carried over from another theme) */
.lyno-card.has-label { position: relative; margin-block: 2.5em 2em; padding: 1.25rem 1.25rem 1rem; }
.lyno-card__label { position: absolute; top: -0.9em; left: 1rem; max-width: calc(100% - 2rem); padding: 0 0.6em; overflow: hidden; font-size: 0.75rem; line-height: 1.8; white-space: nowrap; text-overflow: ellipsis; background: var(--wp--preset--color--base, #fff); border-radius: 4px; }
.lyno-card.is-external .lyno-card__label::before { content: "\2197\00a0"; }
.lyno-card.has-label .lyno-card__title { font-weight: 600; }
.lyno-card-text a { font-weight: 600; }

/* Balloon. The tail is a turned square that takes the colour and the line of the bubble. */
.lyno-balloon { display: flex; align-items: flex-start; gap: 1rem; margin-block: 1.5rem; }
.lyno-balloon.is-right { flex-direction: row-reverse; }
.lyno-balloon__who { flex: none; display: grid; justify-items: center; gap: 0.3rem; width: 4rem; margin: 0; }
.lyno-balloon__who img, .lyno-balloon__blank { display: block; width: 4rem; height: 4rem; border-radius: 50%; object-fit: cover; background: color-mix(in srgb, currentColor 10%, transparent); }
.lyno-balloon.is-square .lyno-balloon__who img { border-radius: 6px; }
.lyno-balloon__name { font-size: 0.6875rem; line-height: 1.3; text-align: center; opacity: 0.75; }
.lyno-balloon__text { position: relative; max-width: 34rem; margin-top: 0.4rem; padding: 0.9rem 1.2rem; border: 1px solid transparent; border-radius: 14px; background: var(--lyno-bln-bg, var(--wp--preset--color--accent-5, #f0f0f1)); background-clip: padding-box; line-height: 1.8; }
.lyno-balloon__text > p { margin: 0; }
.lyno-balloon__text::before { content: ""; position: absolute; top: 1.15rem; left: -6px; width: 11px; height: 11px; background: inherit; background-clip: border-box; border: inherit; border-top-width: 0; border-right-width: 0; border-radius: 0; transform: translateX(-1px) rotate(45deg); }
.lyno-balloon.is-right .lyno-balloon__text::before { left: auto; right: -6px; transform: translateX(1px) rotate(225deg); }
.lyno-balloon__text > * { margin-block: 0; }
.lyno-balloon__text > * + * { margin-block-start: 0.5em; }
.lyno-balloon:is(.is-think, .is-thinking) .lyno-balloon__text { border-radius: 2rem; }
.lyno-balloon:is(.is-think, .is-thinking) .lyno-balloon__text::before { top: 1.4rem; left: -14px; width: 10px; height: 10px; border-width: 1px; border-radius: 50%; transform: none; }
.lyno-balloon:is(.is-think, .is-thinking).is-right .lyno-balloon__text::before { left: auto; right: -14px; transform: none; }
.lyno-balloon.has-no-who { padding-left: 1.5rem; }
.lyno-balloon.has-no-who.is-right { padding-left: 0; padding-right: 1.5rem; }
.lyno-balloon.has-no-who .lyno-balloon__text { margin-top: 0; }
.lyno-balloon[class*="has-color-"] .lyno-balloon__text { color: #333; }
.lyno-balloon.has-color-gray { --lyno-bln-bg: #f7f7f7; --lyno-bln-line: #ccc; }
.lyno-balloon.has-color-green { --lyno-bln-bg: #d1f8c2; --lyno-bln-line: #9ddd93; }
.lyno-balloon.has-color-blue { --lyno-bln-bg: #e2f6ff; --lyno-bln-line: #93d2f0; }
.lyno-balloon.has-color-red { --lyno-bln-bg: #ffebeb; --lyno-bln-line: #f48789; }
.lyno-balloon.has-color-yellow { --lyno-bln-bg: #f9f7d2; --lyno-bln-line: #fbe593; }
.lyno-balloon.has-color-white { --lyno-bln-bg: #fff; --lyno-bln-line: #ccc; }
.lyno-balloon.has-line .lyno-balloon__text { border-color: var(--lyno-bln-line, color-mix(in srgb, currentColor 25%, transparent)); }

/* Notice bar and back-to-top */
.lyno-notice { padding: 0.55rem 1rem; text-align: center; font-size: 0.875rem; font-weight: 600; line-height: 1.5; color: #fff; background: var(--wp--preset--color--accent-3, #1d2327); }
.lyno-notice a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.lyno-totop { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 50; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; font-size: 1.125rem; color: #fff; text-decoration: none; background: var(--wp--preset--color--contrast, #1d2327); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s; }
.lyno-totop.is-shown { opacity: 0.9; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .lyno-totop { transition: none; } }

/* Menu fixed to the bottom on phones */
.lyno-dock { display: none; }
@media (max-width: 781px) {
	.lyno-dock { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; padding-bottom: env(safe-area-inset-bottom); background: var(--wp--preset--color--base, #fff); box-shadow: 0 -1px 0 color-mix(in srgb, currentColor 12%, transparent), 0 -6px 20px rgba(0, 0, 0, 0.06); }
	.lyno-dock ul { display: flex; margin: 0; padding: 0; list-style: none; }
	.lyno-dock li { flex: 1 1 0; min-width: 0; }
	.lyno-dock a { display: grid; justify-items: center; gap: 2px; padding: 0.5rem 0.25rem; font-size: 0.6875rem; font-weight: 600; line-height: 1.3; color: inherit; text-decoration: none; }
	.lyno-dock i { font-style: normal; font-size: 1.125rem; line-height: 1; }
	.lyno-dock span { overflow: hidden; max-width: 100%; white-space: nowrap; text-overflow: ellipsis; }
	body.lyno-has-dock { padding-bottom: calc(3.6rem + env(safe-area-inset-bottom)); }
	body.lyno-has-dock .lyno-totop { bottom: calc(4.6rem + env(safe-area-inset-bottom)); }
}

/* Ad slots */
.lyno-ad { margin-block: 2rem; text-align: center; overflow: hidden; }
.lyno-ad img { max-width: 100%; height: auto; }
li.lyno-ad.is-infeed { display: grid; place-items: center; margin: 0; list-style: none; }

/* Post slider: scroll-snap row */
.lyno-slider { margin-block: 1.5rem 2.5rem; }
.lyno-slider__track { display: flex; gap: 1rem; margin: 0; padding: 0 0 0.25rem; overflow-x: auto; list-style: none; scroll-snap-type: x mandatory; scrollbar-width: none; }
.lyno-slider__track::-webkit-scrollbar { display: none; }
.lyno-slider__track > li { flex: 0 0 calc((100% - 4rem) / 5); min-width: 0; scroll-snap-align: start; }
.lyno-slider a { display: grid; gap: 0.7rem; color: inherit; text-decoration: none; }
.lyno-slider__image { position: relative; display: block; overflow: hidden; border-radius: 10px; box-shadow: 0 2px 8px rgb(0 0 0 / 8%); }
.lyno-slider__image img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.4s; }
.lyno-slider a:hover img { transform: scale(1.04); }
.lyno-slider__label { position: absolute; top: 0.4rem; right: 0.4rem; padding: 0.05em 0.8em; border-radius: 99px; font-size: 0.75rem; line-height: 1.7; color: var(--wp--preset--color--base, #fff); background: var(--wp--preset--color--accent-3, #1d2327); }
.lyno-slider__name { display: -webkit-box; overflow: hidden; font-size: 0.9375rem; font-weight: 700; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.lyno-slider__dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1rem; }
.lyno-slider__dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, currentColor 22%, transparent); cursor: pointer; }
.lyno-slider__dots button[aria-current="true"] { background: currentColor; }
@media (max-width: 959px) { .lyno-slider__track > li { flex-basis: calc((100% - 2rem) / 3); } }
@media (max-width: 599px) { .lyno-slider__track { gap: 0.75rem; } .lyno-slider__track > li { flex-basis: 52%; } .lyno-slider__name { font-size: 0.8125rem; } }
