/**
 * Tubydlo — Seznam Diskuze: styly pro prvky, které si plugin sám vkládá
 * do stránky (odkaz vedle "Líbí se", zpětný odkaz na diskuzní stránce).
 * Vlastní enqueued stylesheet pluginu, ne úprava child theme — funkce má
 * zůstat samostatná a přenositelná, ať se dá kdykoliv jednoduše celá
 * odebrat/aktualizovat bez zásahu do souborů šablony.
 *
 * Vzhled samotné diskuzní stránky (rozvržení, reklamy, mobil/desktop)
 * se řeší přímo v Elementoru na šablonové stránce — tenhle soubor záměrně
 * neobsahuje nic layoutového, aby nekolidoval s tím, co si tam navrhnete.
 */

/**
 * .seznam-libise-wrap má z houzez-child/style.css pevný margin-top: -48px
 * vyladěný na jediné dítě (seznam-pocitadlolibise, výška 20px, zarovnané
 * přes výchozí "baseline"). S naším odkazem coby druhým dítětem by se obě
 * pod-položky zarovnávaly podle textové základní linie nepředvídatelně —
 * proto z wrapu uděláme flex řádek se svislým centrováním (align-items:
 * center), a odkaz (níže) zafixujeme na stejnou výšku 20px jako "Líbí se".
 *
 * Přeměřeno přímo na živé stránce (getBoundingClientRect): střed "Líbí se"
 * i "Sdílejte" byl i BEZ našeho odkazu posunutý o ~2.5 px (2657.57 vs.
 * 2660.07), tedy jde o drobnou nepřesnost původního -48px pravidla, ne o nic,
 * co způsobil tento plugin. Protože se tento stylesheet enqueuje po
 * houzez-child/style.css, se stejnou specificitou ho i s "!important"
 * přebíjí (vyhrává pozdější zdroj) — beze změny souboru šablony.
 * Přepočteno: -48px + 2.5px = -45.5px srovná všechny tři prvky na stejný střed.
 */
.seznam-libise-wrap {
	display: flex !important;
	align-items: center !important;
	margin-top: -45.5px !important;
}

/**
 * Odkaz "Diskuze" vedle "Líbí se". Barva #e20772 a font Inter 15px/400
 * odpovídají pravidlu ".seznam-libise-wrap seznam-pocitadlolibise
 * { --primary-color: ... }" v houzez-child/style.css, kterým je widget
 * Počítadlo Líbí se na webu obarvený.
 */
.tubydlo-diskuze-link {
	display: inline-flex;
	align-items: center;
	height: 20px;
	line-height: 20px;
	gap: 4px;
	font-family: Inter, inherit;
	font-size: 15px;
	font-weight: 400;
	color: #e20772;
	text-decoration: none;
	margin-left: 14px;
}

.tubydlo-diskuze-link svg {
	flex-shrink: 0;
}

/**
 * Zpětný odkaz "← Zpět na článek" na diskuzní stránce (viz shortcode
 * [tubydlo_diskuze_embed]) — jednoduchý styl podle značkové barvy webu.
 */
.tubydlo-diskuze-back {
	color: #e20772;
	font-weight: 500;
	text-decoration: none;
}

.tubydlo-diskuze-back:hover {
	text-decoration: underline;
}

/**
 * Nadpis "Diskuze: {titulek}". !important je tu záměrně — bez něj by ho
 * mohly přebít obecné Elementor třídy ".elementor-heading-title.elementor-size-default"
 * na stejném elementu (mají vyšší specificitu, protože jde o dvě třídy).
 */
.tubydlo-diskuze-heading-prefix {
	color: #344054 !important;
	font-weight: 500 !important;
}

.tubydlo-diskuze-heading {
	color: #102A43 !important;
	font-family: Inter, sans-serif !important;
	font-size: 2.5rem !important;
	line-height: 3rem !important;
	font-weight: 700 !important;
	margin-bottom: 24px !important;
}

@media (max-width: 768px) {
	.tubydlo-diskuze-heading {
		font-size: 24px !important;
		line-height: 30px !important;
	}
}

/* =====================================================
   Výpis "Co byste neměli přehlédnout" pod diskuzí —
   1:1 podle stejného vzhledu, jaký má výpis "Bydlení"
   na /magazin/ (viz tubydlo-magazin.css, widget 110ebd1).
   Ten soubor cílí na jiné ID stránky/widgetu, proto se
   sem musela stejná pravidla zkopírovat se správnými ID:

     stránka   = body.page-id-22969 (šablonová stránka diskuze)
     widget    = .elementor-element-7ff9893 (Posts widget
                 "Co byste neměli přehlédnout")

   Pokud v Elementoru widget smažete a vytvoříte znovu,
   dostane nové náhodné ID a tahle pravidla přestanou sedět —
   stačí mi pak nahlásit nové ID z data-id atributu widgetu.
   Breakpointy stejné jako v tubydlo-magazin.css: mobil <640px,
   tablet 640–1023px, desktop >=1024px.
   ===================================================== */

body.page-id-22969 .elementor-element-7ff9893 .elementor-posts-container,
body.page-id-22969 .elementor-element-7ff9893 .elementor-post,
body.page-id-22969 .elementor-element-7ff9893 .elementor-post__thumbnail__link,
body.page-id-22969 .elementor-element-7ff9893 .elementor-post__text {
	box-sizing: border-box !important;
	max-width: 100%;
}

body.page-id-22969 .elementor-element-7ff9893 {
	--grid-row-gap: 32px !important;
}
body.page-id-22969 .elementor-element-7ff9893 .elementor-posts-container > .elementor-post {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	gap: 16px !important;
	border-bottom: none !important;
	padding-bottom: 0 !important;
	margin: 0 !important;
}

body.page-id-22969 .elementor-element-7ff9893 .elementor-post__thumbnail__link {
	width: 262.7px !important;
	flex: 0 0 auto !important;
	margin-right: 0 !important;
}
body.page-id-22969 .elementor-element-7ff9893 .elementor-post__thumbnail {
	box-sizing: border-box !important;
	aspect-ratio: 262.7 / 147.76 !important;
	border-radius: 12px !important;
	background: #EDEBE8;
	overflow: hidden;
	padding-bottom: 0 !important;
	height: auto !important;
}
body.page-id-22969 .elementor-element-7ff9893 .elementor-post__thumbnail img {
	width: 100% !important;
	height: 100% !important;
	max-height: none !important;
	object-fit: cover !important;
	border-radius: 12px !important;
}

body.page-id-22969 .elementor-element-7ff9893 .elementor-post__text {
	flex: 1 1 auto !important;
	min-width: 0 !important;
	padding: 0 !important;
}

body.page-id-22969 .elementor-element-7ff9893 .elementor-post__title,
body.page-id-22969 .elementor-element-7ff9893 .elementor-post__title a {
	font-family: "Inter", sans-serif !important;
	font-weight: 700 !important;
	font-size: 20px !important;
	line-height: 1.2 !important;
	color: #102A43 !important;
	text-decoration: none !important;
	transition: color .15s ease;
}
body.page-id-22969 .elementor-element-7ff9893 .elementor-post__title {
	display: block !important;
	overflow: visible;
	margin: 0 0 8px !important;
}
body.page-id-22969 .elementor-element-7ff9893 .elementor-post:hover .elementor-post__title,
body.page-id-22969 .elementor-element-7ff9893 .elementor-post:hover .elementor-post__title a {
	color: #E20772 !important;
}

body.page-id-22969 .elementor-element-7ff9893 .elementor-post__meta-data {
	font-family: "Inter", sans-serif !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	color: #344054 !important;
	margin: 0 0 8px !important;
}

body.page-id-22969 .elementor-element-7ff9893 .elementor-post-author {
	color: #C1005F !important;
}

/* Popisek (excerpt) — jen na desktopu, se třemi tečkami na konci
   stejně jako v magazínu. Na tabletu/mobilu skrytý (jen titulek). */
body.page-id-22969 .elementor-element-7ff9893 .elementor-post__excerpt {
	display: none;
}
@media (min-width: 1024px) {
	body.page-id-22969 .elementor-element-7ff9893 .elementor-post__excerpt {
		display: block !important;
	}
	body.page-id-22969 .elementor-element-7ff9893 .elementor-post__excerpt p::after {
		content: "...";
	}
}

@media (max-width: 1023px) {
	body.page-id-22969 .elementor-element-7ff9893 .elementor-post__thumbnail__link {
		width: 300px !important;
	}
	body.page-id-22969 .elementor-element-7ff9893 .elementor-post__title,
	body.page-id-22969 .elementor-element-7ff9893 .elementor-post__title a {
		font-size: 19px !important;
	}
}

@media (max-width: 639px) {
	body.page-id-22969 .elementor-element-7ff9893 {
		--grid-row-gap: 32px !important;
	}
	body.page-id-22969 .elementor-element-7ff9893 .elementor-posts-container > .elementor-post {
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 0 !important;
	}
	/* Text (titulek, autor) "rozbalíme" pomocí display:contents, aby se
	   jeho děti staly přímými flex položkami .elementor-post vedle fotky —
	   jen tak je můžeme nezávisle přeřadit přes order a vložit fotku mezi ně. */
	body.page-id-22969 .elementor-element-7ff9893 .elementor-post__text {
		display: contents !important;
	}
	body.page-id-22969 .elementor-element-7ff9893 .elementor-post__title {
		order: 1 !important;
		margin-bottom: 8px !important;
	}
	body.page-id-22969 .elementor-element-7ff9893 .elementor-post__meta-data {
		order: 2 !important;
		margin-bottom: 12px !important;
	}
	body.page-id-22969 .elementor-element-7ff9893 .elementor-post__thumbnail__link {
		width: 100% !important;
		order: 3 !important;
		margin-bottom: 0 !important;
	}
	body.page-id-22969 .elementor-element-7ff9893 .elementor-post__excerpt {
		order: 4 !important;
	}
	body.page-id-22969 .elementor-element-7ff9893 .elementor-post__title,
	body.page-id-22969 .elementor-element-7ff9893 .elementor-post__title a {
		font-size: 19px !important;
	}
}
