/*
Theme Name: Commit Log
Theme URI: https://github.com/yogeshbhutkar/commit-log
Author: Yogesh Bhutkar
Author URI: https://yogeshbhutkar.com
Description: Commit log is a minimal blog theme for developers.
Requires at least: 7.0
Tested up to: 7.0
Requires PHP: 8.2
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: commit-log
Tags: blog, minimal, developer, developer-theme
*/

html {
	/* Reserve the scrollbar gutter to prevent layout shifts between pages. */
	overflow-y: auto;
	scrollbar-gutter: stable;
}

body {
	/* Use antialiased fonts for better readability. */
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

a {
	/* Remove underline from links. */
	text-decoration: none;
}

a:hover {
	color: var(--wp--preset--color--accent);
}

.wp-element-button,
.wp-block-button__link {
	/* Add a subtle gradient to buttons. */
	background-image: linear-gradient(rgb(0 0 0 / 0%), rgb(0 0 0 / 12%));
}

.site-query-list .wp-block-post-date {
	/* Prevent the date from shrinking. */
	flex-shrink: 0;
	white-space: nowrap;
}

/* The Search block applies its border to an inner wrapper, not the block root. */
:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) {
	background-color: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--border);
	border-radius: var(--wp--preset--border-radius--medium);
	overflow: hidden;
	padding: 3px;
}

:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input {
	/* Make the input background transparent. */
	background-color: transparent;
}

/* Width and focus states are not available for theme.json textInput elements. */
.wp-block-post-comments-form input:not([type="submit"]):not([type="checkbox"]),
.wp-block-post-comments-form textarea {
	box-sizing: border-box;
	width: 100%;
}

:where(input, textarea, select):focus-visible {
	/* Add a subtle border and outline to focus states. */
	border-color: var(--wp--preset--color--accent);
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

::placeholder {
	/* Set the placeholder text color. */
	color: var(--wp--preset--color--muted-foreground);
	opacity: 1;
}

.wp-site-blocks {
	/* Make the site blocks full height. */
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
}

.wp-site-blocks > footer.wp-block-template-part:last-child {
	/* Push the footer to the bottom of the page. */
	margin-top: auto;
}

@media (prefers-reduced-motion: no-preference) {
	.wp-element-button,
	.wp-block-button__link {
		transition:
			background-color 120ms ease-out,
			border-color 120ms ease-out,
			box-shadow 120ms ease-out,
			transform 120ms ease-out;
	}

	.wp-element-button:active,
	.wp-block-button__link:active {
		transform: translateY(1px);
	}
}