/**
 * WP Tea — core block tweaks (lists, latest posts/comments, categories, images)
 * Match live wptea.com Additional CSS (Powder + tea chrome). Do not redesign.
 */

.wptea-content.wp-block-post-content li {
	margin-left: 0;
	line-height: 2em;
	padding: 15px 10px 15px 12px;
	border-bottom: 1px dotted #e9e9e9;
}

.has-global-padding :where(.has-global-padding:not(.wp-block-block)) .entry-content.wp-block-post-content li {
	margin-left: 0;
}

.entry-content .wp-block-group.is-vertical.is-layout-flex li {
	margin-left: 2em;
	line-height: 2em;
	padding: 15px 10px 15px 12px;
	border-bottom: 1px dotted #e9e9e9;
}

/*
 * Latest Posts list (首页「新品发布」等): dotted rules must sit mid-gap.
 * 1) is-layout-flow adds margin-block-start on each li → kill it.
 * 2) core float:left thumb + block title/date stacks the date below the
 *    thumb, so the rule hugs the date while the next thumb starts after
 *    a fat pad — use a 2-col grid so thumb | title/date stay one row.
 */
.wp-block-latest-posts.wp-block-latest-posts__list {
	line-height: 1.45 !important;
}

.wp-block-latest-posts.wp-block-latest-posts__list li {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: auto auto;
	column-gap: 12px;
	row-gap: 2px;
	align-items: center;
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
	padding: 14px 0;
	border-bottom: 1px dotted rgb(223 223 223 / 40%);
}

.wp-block-latest-posts.wp-block-latest-posts__list li:first-child {
	padding-top: 4px;
}

.wp-block-latest-posts.wp-block-latest-posts__list li:last-child {
	padding-bottom: 4px;
	border-bottom: 0;
}

.wp-block-latest-posts__list .wp-block-latest-posts__featured-image.alignleft,
.wp-block-latest-posts__list .wp-block-latest-posts__featured-image {
	grid-column: 1;
	grid-row: 1 / span 2;
	float: none !important;
	margin: 0 !important;
	align-self: center;
}

.wp-block-latest-posts__featured-image img {
	border-radius: 8px;
	display: block;
}

.wp-block-latest-posts__list a.wp-block-latest-posts__post-title {
	grid-column: 2;
	grid-row: 1;
	align-self: end;
	margin: 0;
	min-width: 0;
}

.wp-block-latest-posts__list .wp-block-latest-posts__post-date {
	grid-column: 2;
	grid-row: 2;
	align-self: start;
	float: none !important;
	margin: 0;
	line-height: 1.3;
}

a.wp-block-latest-posts__post-title,
a.wp-block-latest-comments__comment-link {
	margin: 0;
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wp-block-categories li {
	line-height: 2em;
	padding: 15px 0;
	border-bottom: 1px dotted #e9e9e9;
}

.wp-block-group.one-news li {
	line-height: 2em;
	padding: 10px 0;
	border-bottom: 1px dotted #e9e9e9;
}

.wptea-content .entry-content .wp-block-image img,
.wp-block-post-content.wptea-content .wp-block-image img {
	border-radius: 10px;
	border: 1px solid #eeeeee;
}

.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt,
.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta {
	margin-left: 3.25em;
	line-height: 2em;
	border-bottom: 1px dotted #e9e9e9;
}

/* Live Powder quote (Suede parent left gray fill / weight — kill to match wptea.com) */
:root :where(.wp-block-quote),
.wp-block-quote:not(.is-style-plain) {
	background-color: transparent !important;
	font-weight: inherit;
	font-size: inherit;
	line-height: inherit;
}

:root :where(.wp-block-quote cite),
.wp-block-quote cite {
	letter-spacing: normal !important;
	text-transform: none !important;
	font-weight: inherit;
}

/*
 * Article heading ladder (CJK news, body ≈16px / lh 2).
 * Scope: post content only — leave .wp-block-post-title alone.
 * Powder GS used large/medium (24/20) which jumps too hard for Chinese;
 * keep weight 400, small steps, px not rem.
 */
.wp-block-post-content.wptea-content :is(h1, h2, h3, h4, h5, h6),
.wp-block-post-content.wptea-content :is(h1, h2, h3, h4, h5, h6).wp-block-heading,
.wptea-content.wp-block-post-content :is(h1, h2, h3, h4, h5, h6),
.wptea-content.wp-block-post-content :is(h1, h2, h3, h4, h5, h6).wp-block-heading {
	font-weight: 400 !important;
	font-style: normal;
	letter-spacing: 0;
	line-height: 1.45 !important;
	color: #1a1a1a;
	margin-top: 1.65em !important;
	margin-bottom: 0.55em !important;
}

.wp-block-post-content.wptea-content > :is(h1, h2, h3, h4, h5, h6):first-child,
.wptea-content.wp-block-post-content > :is(h1, h2, h3, h4, h5, h6):first-child {
	margin-top: 0.35em !important;
}

/* Mid-article h1 (authors misuse) capped near h2 — not page-title scale */
.wp-block-post-content.wptea-content h1,
.wp-block-post-content.wptea-content h1.wp-block-heading,
.wptea-content.wp-block-post-content h1,
.wptea-content.wp-block-post-content h1.wp-block-heading {
	font-size: 22px !important;
}

.wp-block-post-content.wptea-content h2,
.wp-block-post-content.wptea-content h2.wp-block-heading,
.wptea-content.wp-block-post-content h2,
.wptea-content.wp-block-post-content h2.wp-block-heading {
	font-size: 20px !important;
}

.wp-block-post-content.wptea-content h3,
.wp-block-post-content.wptea-content h3.wp-block-heading,
.wptea-content.wp-block-post-content h3,
.wptea-content.wp-block-post-content h3.wp-block-heading {
	font-size: 18px !important;
}

.wp-block-post-content.wptea-content h4,
.wp-block-post-content.wptea-content h4.wp-block-heading,
.wptea-content.wp-block-post-content h4,
.wptea-content.wp-block-post-content h4.wp-block-heading {
	font-size: 17px !important;
}

.wp-block-post-content.wptea-content :is(h5, h6),
.wp-block-post-content.wptea-content :is(h5, h6).wp-block-heading,
.wptea-content.wp-block-post-content :is(h5, h6),
.wptea-content.wp-block-post-content :is(h5, h6).wp-block-heading {
	font-size: 16px !important;
}

/* WP Tea — navigation / Ollie mobile panel
 * Live Powder nav = x-small (16px) / 400. Prior mobile TP used 1.125rem (18px).
 */
.wp-block-navigation,
.wp-block-navigation .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 400;
}

.wp-block-navigation .wp-block-navigation__responsive-container-open,
.wp-block-navigation .wp-block-navigation__responsive-container-close {
	color: inherit;
}

/* Ollie mobile overlay content — match desktop nav */
.wp-block-navigation__responsive-container.is-menu-open .wptea-mobile-menu,
.wp-block-navigation__responsive-dialog .wptea-mobile-menu,
.wptea-mobile-menu {
	font-size: 16px;
	font-weight: 400;
	line-height: 1.7;
}

.wptea-mobile-menu .wptea-mobile-menu__link,
.wptea-mobile-menu .wptea-mobile-menu__link a,
.wptea-mobile-menu p,
.wptea-mobile-menu p a {
	font-size: 16px !important;
	font-weight: 400 !important;
	line-height: 1.7 !important;
	text-decoration: none;
}

.wptea-mobile-menu .wptea-mobile-menu__link a:hover,
.wptea-mobile-menu p a:hover {
	color: var(--wp--preset--color--custom-blue, #2563eb);
}

.wptea-mobile-menu .wptea-mobile-menu__rule {
	opacity: 0.25;
	border-bottom-width: 1px;
}

.wptea-mobile-menu .wptea-mobile-menu__loginout,
.wptea-mobile-menu .wptea-mobile-menu__loginout a {
	font-size: 15px !important;
	font-weight: 400 !important;
	line-height: 1.7 !important;
}

.wptea-mobile-menu .wp-block-site-logo img {
	height: auto;
	max-width: 120px;
}

/* After Block Visibility removal — hide on small screens. */
@media (max-width: 767.98px) {
	.wpcy-hide-on-small,
	.wptea-hide-on-small {
		display: none !important;
	}
}

