/*
Theme Name: SOD
Template: dropp
Author: sod.red
Description: Дочерняя тема sod.red на основе Dropp: шрифты с кириллицей и шаблоны на русском.
Requires at least: 6.6
Requires PHP: 7.4
Version: 1.3.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sod
*/

/*
 * Header: keep logo, title and menu in one row on phones.
 */
@media (max-width: 781px) {
	.sod-header .wp-block-site-tagline {
		display: none;
	}

	.sod-header .wp-block-site-title {
		font-size: 1.25rem;
	}
}

/*
 * Front page hero: four covers as a 2×2 grid on phones.
 * Core forces one column below 600px with a high-specificity selector.
 */
@media (max-width: 600px) {
	.sod-hero-covers .wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

/*
 * "Read also" and the album carousel disappear when they have nothing to show.
 */
.sod-related:not(:has(.wp-block-post)),
.sod-carousel:not(:has(.wp-block-post)) {
	display: none;
}

/*
 * Post meta line: date · author · category.
 */
.sod-meta {
	column-gap: 0.6em;
	row-gap: 0;
}

.sod-meta > * + *::before {
	content: "·";
	margin-right: 0.6em;
}

/*
 * Tags as small outlined pills: #тег.
 */
.sod-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	font-size: var(--wp--preset--font-size--small);
}

.sod-tags a {
	border: 1px solid currentColor;
	border-radius: 999px;
	padding: 0.1em 0.7em;
	text-decoration: none;
}

.sod-tags a::before {
	content: "#";
}

.sod-tags .wp-block-post-terms__separator {
	display: none;
}

/*
 * Album carousel: a horizontal strip with scroll snapping; carousel.js adds the arrows.
 */
.sod-carousel .wp-block-post-template {
	display: flex;
	gap: var(--wp--preset--spacing--30);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	margin: 0;
	padding: 0;
}

.sod-carousel .wp-block-post-template::-webkit-scrollbar {
	display: none;
}

.sod-carousel .wp-block-post-template > li {
	flex: 0 0 clamp(13rem, 24vw, 20rem);
	margin: 0;
	scroll-snap-align: start;
}

.sod-carousel__nav {
	display: flex;
	gap: 0.5rem;
}

.sod-carousel__nav button {
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid currentColor;
	border-radius: 50%;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.sod-carousel__nav button:disabled {
	opacity: 0.3;
	cursor: default;
}

/*
 * Album page: two pictures per row on phones instead of one.
 */
@media (max-width: 600px) {
	.sod-album-grid.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}
