/*
 * Tejash Shah — site-wide beige & pastel styles.
 * Loaded on every page after the Once theme styles (see header.php).
 * Palette matches the homepage (template-parts/homepage.php).
 */
:root {
	--tsh-beige: #F6F0E6;
	--tsh-beige2: #EFE6D8;
	--tsh-paper: #FFFDF9;
	--tsh-ink: #1F2A26;
	--tsh-soft: #5B6660;
	--tsh-sage: #CFE0CC;
	--tsh-sage-l: #EEF4EC;
	--tsh-sage-d: #4E7A5A;
	--tsh-blue: #D6E3EF;
	--tsh-blue-l: #EEF3F8;
	--tsh-peach: #F6DCC8;
	--tsh-peach-d: #B9714A;
	--tsh-lav: #E3DDEF;
}

/* Page */
body { background-color: var(--tsh-paper); color: var(--tsh-ink); }
a:hover, a:focus { color: var(--tsh-sage-d); }
::selection { background: var(--tsh-sage); color: var(--tsh-ink); }

/* Header */
.navbar-topbar { background-color: var(--tsh-beige) !important; }
.navbar-primary { background-color: var(--tsh-paper) !important; border-bottom: 1px solid var(--tsh-beige2); }
.navbar-primary .navbar-nav > li > a:hover,
.navbar-primary .navbar-nav > .current-menu-item > a,
.navbar-primary .navbar-nav > .current-menu-parent > a { color: var(--tsh-sage-d); }
.navbar-primary .sub-menu { background: var(--tsh-paper); border: 1px solid var(--tsh-beige2); border-radius: 12px; box-shadow: 0 12px 28px rgba(31, 42, 38, .08); }

/* Theme homepage sections */
.section-featured-post,
.cs-section-white { background-color: var(--tsh-paper) !important; }
.section-post-tiles { background-color: var(--tsh-sage-l) !important; }
.section-post-carousel { background-color: var(--tsh-blue-l) !important; }

/* Post titles & cards */
.entry-title, .entry-title a, h2.entry-title { color: var(--tsh-ink); }
.entry-title a:hover { color: var(--tsh-sage-d); }
article .post-media img,
article .entry-thumbnail img,
.cs-overlay img { border-radius: 10px; }

/* Single posts & pages */
.entry-content a { color: var(--tsh-sage-d); text-decoration: underline; text-decoration-color: rgba(78, 122, 90, .35); text-underline-offset: 2px; }
.entry-content a:hover { text-decoration-color: var(--tsh-sage-d); }
.entry-content blockquote,
.entry-content .wp-block-quote {
	background: var(--tsh-beige);
	border-left: 4px solid var(--tsh-peach-d);
	border-radius: 0 12px 12px 0;
	padding: 18px 22px;
}
/* Headings: replace the bright theme green with the soft palette */
.entry-title, .page-title, h1.entry-title { color: var(--tsh-ink) !important; }
.entry-content h2, .entry-content h3,
.entry-content .wp-block-heading { color: var(--tsh-ink) !important; }
.entry-content h4, .entry-content h5, .entry-content h6 { color: var(--tsh-sage-d) !important; }
.entry-content table { border-color: var(--tsh-beige2); }
.entry-content th { background: var(--tsh-beige); }

/* Buttons (only text buttons; icon and search buttons keep the theme shape) */
.wp-block-button__link, .pk-subscribe-submit, .pk-button {
	border-radius: 999px !important;
	border-color: var(--tsh-ink);
}
.wp-block-button__link:hover, .pk-subscribe-submit:hover {
	background-color: var(--tsh-ink);
	color: var(--tsh-beige);
}

/* Pagination */
.navigation .nav-links a, .pagination .page-numbers { color: var(--tsh-ink); }
.pagination .page-numbers.current, .navigation .page-numbers.current {
	background: var(--tsh-sage);
	border-radius: 999px;
	padding: 2px 12px;
}

/* Hide "0 Shares" counters (fix list #16) — keep the share buttons */
.pk-share-buttons-count,
.pk-share-buttons-total { display: none !important; }

/* Category / archive header */
.page-header { background: var(--tsh-beige); border-radius: 0 0 16px 16px; }
.page-header .page-subtitle, .page-header .title-block { color: var(--tsh-sage-d) !important; letter-spacing: .12em; text-transform: uppercase; }
.page-header .archive-count { color: var(--tsh-soft); }

/* Sidebar & widgets */
.widget { border-radius: 12px; }
.widget-title, .title-block { color: var(--tsh-ink); }
.sidebar .wp-block-heading, .sidebar-area .wp-block-heading { color: var(--tsh-ink) !important; }

/* Footer */
.footer-instagram { background-color: var(--tsh-beige); }
.site-footer { background-color: var(--tsh-beige) !important; border-top: 1px solid var(--tsh-beige2); }
.site-footer a:hover { color: var(--tsh-sage-d); }

/* Form fields (colour only; shapes stay as the theme draws them) */
input[type="text"], input[type="email"], input[type="search"], textarea, select { border-color: var(--tsh-beige2); }
input:focus, textarea:focus, select:focus { border-color: var(--tsh-sage-d); }

/* ==========================================================
   Sidebar boxes — pastel cards like the homepage
   (heading widget + list widget are joined into one card)
   ========================================================== */
.sidebar-area .widget { margin-bottom: 22px; }
.sidebar-area .widget.block-31:empty,
.sidebar-area .widget:empty { display: none; }

/* "My Books" heading + its list = one sage card */
.sidebar-area .widget.block-33 { background: var(--tsh-sage); border-radius: 16px 16px 0 0; padding: 20px 20px 4px; margin-bottom: 0; }
.sidebar-area .widget.block-32 { background: var(--tsh-sage); border-radius: 0 0 16px 16px; padding: 6px 20px 20px; }
/* "Technical" heading + its list = one blue card */
.sidebar-area .widget.block-7 { background: var(--tsh-blue); border-radius: 16px 16px 0 0; padding: 20px 20px 4px; margin-bottom: 0; }
.sidebar-area .widget.block-5 { background: var(--tsh-blue); border-radius: 0 0 16px 16px; padding: 6px 20px 20px; }
/* Recent Blog = peach card, Search = lavender card */
.sidebar-area .widget.recent-posts-3 { background: var(--tsh-peach); border-radius: 16px; padding: 20px; }
.sidebar-area .widget.search-2 { background: var(--tsh-lav); border-radius: 16px; padding: 20px; }
/* Any other widget added later gets a soft beige card */
.sidebar-area .widget:not(.block-33):not(.block-32):not(.block-7):not(.block-5):not(.recent-posts-3):not(.search-2):not(.block-31) { background: var(--tsh-beige); border-radius: 16px; padding: 20px; }

.sidebar-area .wp-block-heading, .sidebar-area .title-block { font-size: 20px; margin: 0 0 10px; }
.sidebar-area .widget ul { margin: 0; padding: 0; list-style: none; }

/* Latest-post lists: compact rows (thumbnail + title) instead of huge images */
.sidebar-area .wp-block-latest-posts__list li {
	display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center;
	padding: 10px 0; margin: 0; border-bottom: 1px solid rgba(31, 42, 38, .08);
}
.sidebar-area .wp-block-latest-posts__list li:last-child { border-bottom: 0; }
.sidebar-area .wp-block-latest-posts__list li:before { display: none !important; }
.sidebar-area .wp-block-latest-posts__featured-image { float: none !important; margin: 0 !important; width: 84px; }
.sidebar-area .wp-block-latest-posts__featured-image img {
	width: 84px !important; height: 64px !important; max-width: none !important;
	object-fit: cover; border-radius: 10px; display: block;
}
.sidebar-area .wp-block-latest-posts__post-title,
.sidebar-area .widget_recent_entries li a { font-size: 15px; line-height: 1.35; color: var(--tsh-ink); font-weight: 700; text-decoration: none; }
.sidebar-area .widget_recent_entries:not(.widget_block) li { padding: 9px 0; border-bottom: 1px solid rgba(31, 42, 38, .08); }
.sidebar-area .widget_recent_entries:not(.widget_block) li:last-child { border-bottom: 0; }
.sidebar-area .search-field { background: #fff; border-radius: 999px 0 0 999px; }
.sidebar-area .search-submit { border-radius: 0 999px 999px 0; }

/* Table of contents & related posts as soft boxes */
.pk-toc { background: var(--tsh-beige); border-radius: 16px; padding: 18px 20px; }
.jp-relatedposts { background: var(--tsh-blue-l); border-radius: 16px; padding: 18px 20px !important; }
.jp-relatedposts-post-img { border-radius: 10px; }
.post-prev-next .link-content,
.post-prev-next .prev-link,
.post-prev-next .next-link { background: var(--tsh-beige); border-radius: 14px; }

/* Cookie notice: solid, compact, rounded */
#eu-cookie-law {
	background: var(--tsh-paper) !important; color: var(--tsh-ink) !important;
	border: 1px solid var(--tsh-beige2) !important; border-radius: 14px;
	box-shadow: 0 10px 30px rgba(31, 42, 38, .15); font-size: 13px; line-height: 1.45;
}
#eu-cookie-law .accept { background: var(--tsh-ink) !important; color: var(--tsh-beige) !important; border-radius: 999px !important; border: 0 !important; }

/* ==========================================================
   Mobile (phones)
   ========================================================== */
@media (max-width: 767px) {
	html { -webkit-text-size-adjust: 100%; }
	.cs-container { padding-left: 18px; padding-right: 18px; }

	/* Header: clean bar */
	.navbar-primary { box-shadow: 0 4px 14px rgba(31, 42, 38, .06); }

	/* Slide-out menu: roomy, easy to tap */
	.offcanvas, .offcanvas-inner { background: var(--tsh-paper); }
	.offcanvas .menu-item > a, .offcanvas-inner .menu-item > a { display: block; padding: 10px 0; font-size: 17px; }

	/* Reading comfort */
	.entry-content p, .entry-content li { font-size: 17px; line-height: 1.75; }
	.entry-content h2 { font-size: 24px; line-height: 1.3; margin-top: 1.6em; }
	.entry-content h3 { font-size: 21px; line-height: 1.35; }
	.entry-header .entry-title, .single .entry-title, .page .entry-title { font-size: 28px; line-height: 1.2; }
	.page-header .page-title { font-size: 32px; }
	.entry-content img, .post-media img { border-radius: 12px; }
	.entry-content blockquote { margin-left: 0; margin-right: 0; }
	.entry-content table { display: block; overflow-x: auto; }

	/* Bigger tap targets */
	.entry-content a { padding: 2px 0; }
	.pk-share-buttons-link { min-width: 40px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
	.footer-social-links a, .pk-social-links-link { min-width: 40px; min-height: 40px; }
	.pagination .page-numbers, .navigation .nav-links a { display: inline-block; min-width: 40px; min-height: 40px; line-height: 40px; text-align: center; }

	/* Post lists on archive / category pages: card look */
	.post-archive article .post-outer, .archive-wrap article .post-outer { background: #fff; border: 1px solid var(--tsh-beige2); border-radius: 16px; padding: 12px; }

	/* Sidebar cards stack nicely under the post */
	.sidebar-area { margin-top: 28px; }
	.sidebar-area .widget.block-33, .sidebar-area .widget.block-7 { padding: 18px 16px 2px; }
	.sidebar-area .widget.block-32, .sidebar-area .widget.block-5 { padding: 4px 16px 16px; }
	.sidebar-area .widget.recent-posts-3, .sidebar-area .widget.search-2 { padding: 18px 16px; }

	/* Cookie notice: small bar at the bottom */
	#eu-cookie-law { left: 10px !important; right: 10px !important; bottom: 10px !important; width: auto !important; padding: 12px 14px !important; }
	#eu-cookie-law .accept { padding: 8px 14px !important; font-size: 13px; }

	/* Footer */
	.site-footer { text-align: center; padding-bottom: 24px; }
}
