/*
Theme Name: Guip Notes
Theme URI: https://guis.blog
Author: Guilherme Peternelli
Description: Fixed-width notes blog. Sidebar on the left, full posts on the home page, Myriad Pro via Adobe Fonts (Source Sans 3 fallback). Based on Gui's "Notes" site.
Version: 1.1.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: guip-notes
*/

/* ---------- Fixed-width frame ---------- */
.guip-frame {
	width: 880px;
	max-width: 100%;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Two columns: main + sidebar. Sidebar sits on the left on desktop,
   but comes after the posts on phones. */
.guip-layout {
	gap: 56px !important;
	align-items: flex-start;
}
.guip-layout > .guip-main { flex: 1 1 0 !important; min-width: 0; }
.guip-layout > .guip-sidebar { flex: 0 0 200px !important; }

@media (min-width: 782px) {
	.guip-layout > .guip-sidebar { order: -1; }
}
@media (max-width: 781px) {
	.guip-layout > .guip-sidebar {
		flex-basis: 100% !important;
		border-top: 1px solid var(--wp--preset--color--line);
		padding-top: 2rem;
	}
}

/* ---------- Header ---------- */
.guip-header { padding-top: 56px; }
.guip-header .wp-block-site-title { margin: 0; }
.guip-header .wp-block-site-tagline { margin: 2px 0 0; }
.guip-header .guip-email { margin: 0; font-size: var(--wp--preset--font-size--small); }
.guip-header .wp-block-separator,
.guip-footer .wp-block-separator { margin: 22px 0 40px; border-top-width: 1px; }

/* ---------- Sidebar ---------- */
.guip-sidebar {
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.6;
}
.guip-side-section {
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding-bottom: 1.25rem;
	margin-bottom: 1.25rem;
}
.guip-side-section:last-child { border-bottom: 0; }
.guip-side-title {
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: 0.08em !important;
	text-transform: uppercase;
	color: var(--wp--preset--color--contrast);
	margin: 0 0 0.6rem !important;
}
.guip-sidebar p { margin: 0 0 0.5rem; }
.guip-sidebar ul { list-style: none; padding: 0; margin: 0; }
.guip-sidebar li { margin: 0 0 0.3rem; }

/* Search */
.wp-block-search__inside-wrapper { gap: 6px; }
.wp-block-search__input {
	border: 1px solid #d4d4d4;
	border-radius: 6px;
	padding: 6px 10px;
	font: inherit;
	font-size: var(--wp--preset--font-size--x-small);
	min-width: 0;
}
.wp-block-search__input:focus {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 1px;
}
.wp-block-search__button {
	margin-left: 0 !important;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border: 1px solid #d4d4d4;
	border-radius: 6px;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	padding: 6px 12px;
	cursor: pointer;
}
.wp-block-search__button:hover { background: var(--wp--preset--color--subtle); }

/* ---------- Posts ---------- */
.guip-main .wp-block-post-title { margin-bottom: 0.9rem; }
.guip-main .wp-block-post-content > * + * { margin-top: 1.1rem; }
.guip-main .wp-block-post-content img { border-radius: 4px; }
.guip-meta {
	gap: 14px !important;
	margin-top: 1.4rem !important;
	font-size: var(--wp--preset--font-size--x-small);
}
.guip-meta .wp-block-post-date a,
.guip-meta .wp-block-read-more { color: var(--wp--preset--color--muted); }
.guip-meta .wp-block-post-date a:hover,
.guip-meta .wp-block-read-more:hover { color: var(--wp--preset--color--accent); }
.guip-post-sep { margin: 2.6rem 0 2.8rem !important; }

.wp-block-query-pagination { font-size: var(--wp--preset--font-size--small); margin-top: 1rem; }
.wp-block-post-navigation-link { font-size: var(--wp--preset--font-size--small); }

/* Compact lists (archive, search) */
.guip-list .wp-block-post-title { font-size: 20px; margin-bottom: 0.2rem; }
.guip-list .wp-block-post-template > li { margin-bottom: 1.4rem; }

/* Footer */
.guip-footer {
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--muted);
	padding-bottom: 48px;
}
.guip-footer .wp-block-separator { margin: 56px 0 18px; }

/* Selection */
::selection { background: #dbe8f8; }

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; }
}
