/*
Theme Name: BSP Base
Theme URI: https://web.vk.al
Author: BSP Platform
Description: BSP base block theme — a curated child of Twenty Twenty-Five. Platform-managed; users choose BSP appearance styles, never raw WordPress themes.
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
Version: 0.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: twentytwentyfive
Text Domain: bsp
Tags: block-patterns, full-site-editing, blog
*/

/*
 * Structure (templates, parts, patterns) is inherited from the parent theme.
 * All visual identity comes from the six BSP style variations in styles/,
 * applied per site as user global-styles by bsp-core. Only truly global
 * tweaks belong here.
 */

/* Keep long inline code and URLs from overflowing narrow content columns. */
.wp-block-code { overflow-x: auto; }
.wp-block-code code { font-family: var(--wp--preset--font-family--fira-code, monospace); }

/* Featured images should never escape their container. */
.wp-post-image { max-width: 100%; height: auto; }

/* Page-list menus render as plain lists — no bullets, no indent. */
.wp-block-page-list { list-style: none; margin: 0; padding: 0; }
.wp-block-page-list li { margin: 0; }
.wp-block-navigation ul.wp-block-page-list { padding-left: 0; }

/* -----------------------------------------------------------------------
 * BSP skins (v0.1.6): layout utilities for the portal-family styles.
 * These classes are referenced from block templates; the palette comes
 * from each style variation, so every skin stays palette-driven.
 * -------------------------------------------------------------------- */

/* Two-column feed + sidebar layout */
.bsp-cols {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 2.2rem;
	align-items: start;
}
.bsp-cols-home { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 960px) {
	.bsp-cols,
	.bsp-cols-home { grid-template-columns: 1fr; }
}

/* Section titles with an accent tick, portal style */
.bsp-section-title {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}
.bsp-section-title::before {
	content: "";
	flex: none;
	width: 5px;
	height: 1.05em;
	background: var(--wp--preset--color--accent-3, currentColor);
	border-radius: 1px;
}

/* Weekly Top 10 ranking with numbered badges */
.bsp-rank ul.wp-block-post-template {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: bsprank;
}
.bsp-rank ul.wp-block-post-template > li {
	counter-increment: bsprank;
	display: flex;
	gap: 0.65rem;
	align-items: flex-start;
	padding: 0.45rem 0;
	border-bottom: 1px dashed color-mix(in srgb, currentColor 14%, transparent);
}
.bsp-rank ul.wp-block-post-template > li:last-child { border-bottom: none; }
.bsp-rank ul.wp-block-post-template > li::before {
	content: counter(bsprank);
	flex: none;
	min-width: 1.55em;
	height: 1.55em;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--wp--preset--color--accent-5, #eee);
	color: var(--wp--preset--color--contrast, inherit);
	font-weight: 800;
	font-size: 0.72em;
	border-radius: 2px;
	margin-top: 0.15em;
}
.bsp-rank ul.wp-block-post-template > li:nth-child(-n+3)::before {
	background: var(--wp--preset--color--accent-3, currentColor);
	color: #fff;
}

/* Sidebar widgets */
.bsp-side > .wp-block-group + .wp-block-group { margin-top: 1.3rem; }
.bsp-widget ul,
.bsp-widget ol { list-style: none; margin: 0; padding: 0; }

/* Categories list, dashed rows */
.bsp-cat-list ul { margin: 0; padding: 0; list-style: none; }
.bsp-cat-list li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding: 0.35rem 0;
	border-bottom: 1px dashed color-mix(in srgb, currentColor 14%, transparent);
	font-size: 0.9rem;
}
.bsp-cat-list li:last-child { border-bottom: none; }

/* Tag cloud chips */
.bsp-tags .wp-block-tag-cloud a,
.bsp-tags a.wp-block-tag-cloud__tag {
	display: inline-block;
	margin: 0 4px 8px 0;
	padding: 2px 11px;
	border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
	border-radius: 999px;
	text-decoration: none;
	white-space: nowrap;
}
.bsp-tags .wp-block-tag-cloud a:hover,
.bsp-tags a.wp-block-tag-cloud__tag:hover {
	background: var(--wp--preset--color--accent-1, #eee);
	text-decoration: none;
}

/* Feed rows lift on hover */
.bsp-feed-item { transition: background 0.15s ease; }
.bsp-feed-item:hover { background: color-mix(in srgb, var(--wp--preset--color--accent-3, currentColor) 5%, transparent); }

/* Lead story: keep the featured image tight */
.bsp-lead-story .wp-post-image { border-radius: 4px; }

/* WP block-support quirk: a group with only a bottom border still gets
 * has-border-color (solid style + medium width on every side). Zero the
 * non-bottom sides for bottom-rule layouts. */
.bsp-feed-item,
.bsp-diary-entry {
	border-top-width: 0;
	border-left-width: 0;
	border-right-width: 0;
	border-top-style: none;
	border-left-style: none;
	border-right-style: none;
}
