/*
Theme Name: Amazing List
Theme URI: https://amazinglist.plus/
Author: Amazing List
Description: Production theme for Amazing List Amazon product reviews, built from the Blogzine HTML template without rewriting its CSS or JS.
Version: 1.1.30
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: amazinglist
*/

/* Visual styles load from assets/css/style.css */

/* Brand: flat plus-in-circle (inline-flex only when visible — avoids dark-mode ghosting) */
.al-brand {
	gap: 0.45em;
	line-height: 1.15;
	vertical-align: middle;
}
.light-mode-item.al-brand {
	display: inline-flex !important;
	align-items: center;
}
.dark-mode-item.al-brand {
	display: none !important;
}
[data-bs-theme="dark"] .light-mode-item.al-brand {
	display: none !important;
}
[data-bs-theme="dark"] .dark-mode-item.al-brand {
	display: inline-flex !important;
	align-items: center;
}
/* Profile photos → crisp brand SVG (plus-in-circle) */
.avatar .avatar-img,
.avatar-img.rounded-circle,
img.avatar.avatar-md {
	object-fit: contain;
	background: #fff;
	padding: 0;
	box-sizing: border-box;
}
[data-bs-theme="dark"] .avatar .avatar-img,
[data-bs-theme="dark"] .avatar-img.rounded-circle,
[data-bs-theme="dark"] img.avatar.avatar-md {
	background: #fff;
}

.al-brand-icon {
	width: 1.15em;
	height: 1.15em;
	flex: 0 0 auto;
	display: block;
}
.al-brand-label {
	letter-spacing: -0.01em;
}
.navbar-brand.al-navbar-brand {
	display: inline-flex;
	align-items: center;
}
.navbar-brand .navbar-brand-item.al-brand {
	height: auto !important;
	max-height: none;
}

/* Sticky header: brand stays left, no overlap with nav */
.navbar-sticky-on .navbar-brand.al-navbar-brand {
	position: relative;
	left: auto;
	transform: none;
	z-index: 2;
	flex: 0 0 auto;
	margin-right: 0.75rem;
}
.navbar-sticky-on .navbar-brand .navbar-brand-item.al-brand {
	font-size: 1.15rem !important;
	height: auto !important;
}
.navbar-sticky-on .navbar-collapse {
	position: relative;
	z-index: 1;
}
@media (max-width: 991.98px) {
	.navbar-sticky-on .al-brand-label {
		font-size: 0.95rem;
	}
}

/* Sticky header sits below WP admin bar when logged in */
body.admin-bar .navbar-sticky.navbar-sticky-on {
	top: 32px;
}
@media screen and (max-width: 782px) {
	body.admin-bar .navbar-sticky.navbar-sticky-on {
		top: 46px;
	}
}

/* Compact overlay titles in dark highlights */
.al-card-title-clamp {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	font-size: 1.05rem;
	line-height: 1.35;
}

/* Product photos: fixed frame, contain, padding - no crop / no size jump */
.al-product-media {
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: 0.5rem;
	padding: 1rem;
	background: #fff;
	box-sizing: border-box;
}
[data-bs-theme="dark"] .al-product-media {
	background: #fff;
}
[data-bs-theme="dark"] .al-product-media--week {
	background: #0d0f12;
}
.al-product-media img,
.al-product-media .card-img {
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	object-position: center;
	display: block;
}
.al-product-media--feature {
	aspect-ratio: 4 / 3;
	padding: 1.25rem;
}
.al-product-media--thumb {
	aspect-ratio: 1 / 1;
	padding: 0.65rem;
	border-radius: 0.75rem;
}
.al-product-media--card,
.al-highlight-media {
	aspect-ratio: 1 / 1;
	padding: 1.1rem;
}
.al-product-media--list {
	aspect-ratio: 4 / 3;
	padding: 0.9rem;
}
.al-product-media--single {
	aspect-ratio: 4 / 3;
	padding: 1.35rem;
}
.al-product-media--week {
	aspect-ratio: 3 / 4;
	padding: 0;
	background: #0d0f12;
	border-radius: 0.5rem;
}
.al-product-media--week img,
.al-product-media--week .card-img {
	object-fit: cover;
	object-position: center;
	width: 100%;
	height: 100%;
	max-height: none;
}
.al-product-media--mega {
	aspect-ratio: 4 / 3;
	padding: 0.85rem;
}
/* Mid-article float from Blogzine post-single — keep Amazon cutouts tidy */
.al-float-thumb {
	width: 140px;
	height: 140px;
	object-fit: contain;
	background: #fff;
	padding: 0.35rem;
}
.al-mega-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	min-height: calc(1.35em * 3);
	line-height: 1.35;
}
/* Mega menu: match Blogzine donor — no avatar indent, left-aligned meta */
.dropdown-fullwidth .al-mega-title + .nav-divider {
	margin-left: 0;
	padding-left: 0;
}
.dropdown-fullwidth .nav-divider .nav-item:first-child {
	padding-left: 0;
}
.dropdown-fullwidth .nav-divider .nav-item:first-child::before {
	display: none;
}
.al-week-card {
	height: 100%;
	overflow: hidden;
	border: 0;
	background: #0d0f12;
}
.al-week-card .card-img-overlay {
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.88) 0%,
		rgba(0, 0, 0, 0.45) 42%,
		rgba(0, 0, 0, 0.12) 68%,
		transparent 100%
	);
}
.al-week-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	min-height: calc(1.3em * 3);
	line-height: 1.3;
	font-size: 1.05rem;
}
.al-ad-slot img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0.5rem;
}
[data-bs-theme="dark"] .al-ad-slot img {
	filter: brightness(0.92);
}

.al-highlights .al-highlight-card {
	background: transparent;
}
.al-highlight-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	min-height: calc(1.35em * 3);
	font-size: 1.15rem;
	line-height: 1.35;
}

/* Shell-2 overlay hero needs readable height on mobile */
.al-shell-2-hero {
	min-height: 280px;
}
@media (min-width: 768px) {
	.al-shell-2-hero {
		min-height: 360px;
	}
}
.al-shell-3 .al-single-main,
.al-shell-2 .al-single-main,
.al-shell-4 .al-single-main,
.al-shell-6 .al-single-main {
	min-width: 0;
}
.al-shell-3 .al-single-main img,
.al-shell-3 .al-single-main table,
.al-shell-2 .al-single-main img,
.al-shell-2 .al-single-main table,
.al-shell-4 .al-single-main img,
.al-shell-4 .al-single-main table,
.al-shell-6 .al-single-main img,
.al-shell-6 .al-single-main table {
	max-width: 100%;
}

/* Single review layout (Blogzine post-single-5):
   mobile = share stacked full-width (like col before md);
   md+ = 56px share rail beside body; lg+ = TOC column. */
.al-single-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem 1.25rem;
	align-items: stretch;
}
.al-single-share,
.al-single-main {
	grid-column: 1;
	min-width: 0;
}
.al-single-toc-col {
	display: none;
	grid-column: 1;
	min-width: 0;
	height: 100%;
}
@media (max-width: 767.98px) {
	.al-single-share .nav {
		flex-direction: row;
		flex-wrap: wrap;
	}
	.al-single-share .al-share-sticky {
		position: static;
		margin-bottom: 1rem !important;
	}
}
@media (min-width: 768px) {
	.al-single-layout {
		grid-template-columns: 56px minmax(0, 1fr);
	}
	.al-single-share {
		grid-column: 1;
	}
	.al-single-main {
		grid-column: 2;
	}
}
.al-single-main img,
.al-single-main table,
.al-single-main pre {
	max-width: 100%;
}
.al-single-main .table {
	display: block;
	width: 100%;
	overflow-x: auto;
}
@media (min-width: 992px) {
	.al-single-layout {
		grid-template-columns: 56px minmax(0, 1fr) minmax(200px, 260px);
	}
	.al-single-toc-col {
		display: block;
		grid-column: 3;
	}
}

/* Mega menu: Blogzine hover + Bootstrap .show for click / touch tablets */
@media (min-width: 992px) {
	.navbar-expand-lg .navbar-nav .dropdown.show > .dropdown-menu,
	.navbar-expand-lg .navbar-nav .dropdown-menu.show {
		top: 100%;
		visibility: visible;
		opacity: 1;
	}
}

/* Hero decorative blobs must not steal taps/clicks */
section.position-relative > .position-absolute.translate-middle {
	pointer-events: none;
}

/* sticky-js handles stick (Blogzine); CSS is fallback if JS off */
.al-share-sticky,
.al-toc-sticky {
	position: -webkit-sticky;
	position: sticky;
	top: 88px;
	z-index: 3;
	width: 100%;
}
/* TOC: no top gap when first in sidebar; gap only when a block sits above */
.al-toc-sticky,
.al-sidebar-toc {
	padding-top: 0;
	padding-bottom: 0;
}
.al-sidebar-toc {
	margin-top: 0;
	margin-bottom: 1.5rem;
}
.al-sidebar-toc:not(:first-child) {
	margin-top: 1.5rem;
}
.al-toc-sticky .nav-pills,
.al-sidebar-toc .nav-pills {
	gap: 0;
}
.al-toc-sticky .nav-pills .nav-link,
.al-sidebar-toc .nav-pills .nav-link {
	white-space: normal;
	padding: 0.4rem 0.75rem;
	margin-top: 0;
	margin-bottom: 0.5rem;
	border-radius: 0.35rem;
	color: var(--bs-body-color, #191a1f);
	font-weight: 500;
	line-height: 1.35;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.al-toc-sticky .nav-pills .nav-link:first-child,
.al-sidebar-toc .nav-pills .nav-link:first-child {
	margin-top: 0;
}
.al-toc-sticky .nav-pills .nav-link:last-child,
.al-sidebar-toc .nav-pills .nav-link:last-child {
	margin-bottom: 0;
}
.al-toc-sticky .nav-pills .nav-link:hover,
.al-toc-sticky .nav-pills .nav-link:focus,
.al-sidebar-toc .nav-pills .nav-link:hover,
.al-sidebar-toc .nav-pills .nav-link:focus {
	background-color: rgba(33, 99, 232, 0.1);
	color: #2163e8;
}
.al-toc-sticky .nav-pills .nav-link.active,
.al-sidebar-toc .nav-pills .nav-link.active {
	background-color: #2163e8;
	color: #fff;
}
.al-sidebar-toc + .al-most-read,
.al-toc-sticky .al-most-read {
	margin-top: 0;
}
.al-most-read > h5 {
	margin-top: 0;
}
/* Section blocks: match Blogzine (divider handles rhythm; no extra standout pad) */
.al-single-main [id^="item-"],
.al-shell .al-single-main [id^="item-"] {
	padding-top: 0;
	padding-bottom: 0;
	margin-top: 0;
	margin-bottom: 0;
}
.al-single-main [id^="item-"] > h4.mt-4:first-child,
.al-shell .al-single-main [id^="item-"] > h4.mt-4:first-child {
	margin-top: 1.5rem;
}
.al-single-main .text-center.h5.mb-4,
.al-shell .al-single-main .text-center.h5.mb-4 {
	margin-top: 1.5rem;
	margin-bottom: 1.5rem;
}
.al-product-media--overlay {
	aspect-ratio: 4 / 3;
	padding: 0;
	background: #0d0f12;
}
.al-product-media--overlay img {
	object-fit: cover;
	width: 100%;
	height: 100%;
}
.al-product-media--list-row {
	aspect-ratio: 4 / 3;
	padding: 0.5rem;
}
.al-product-media--types {
	aspect-ratio: 16 / 9;
	padding: 0.75rem;
}
.al-product-media--grid4 {
	aspect-ratio: 4 / 3;
	padding: 0.65rem;
	border-radius: 0.5rem;
	overflow: hidden;
}
.al-product-media--grid4 .card-img {
	object-fit: contain;
	width: 100%;
	height: 100%;
}
.al-grid4-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	min-height: calc(1.35em * 3);
	line-height: 1.35;
	font-size: 1.05rem;
}
body.admin-bar .al-share-sticky,
body.admin-bar .al-toc-sticky {
	top: 120px;
}
/* Keep sticky-js from leaving a ghost TOC under comments */
.al-single-toc-col .al-toc-sticky[style*="position: fixed"],
.al-single-toc-col .al-toc-sticky[style*="position:fixed"] {
	max-width: 260px;
}

/* TOC jumps: land below sticky header so titles stay visible */
[id^="item-"],
#comments {
	scroll-margin-top: 110px;
}
body.admin-bar [id^="item-"],
body.admin-bar #comments {
	scroll-margin-top: 142px;
}

/* Comments block: breathing room under related / author box */
.al-comments-section {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.1));
}
.al-comments-title {
	margin-bottom: 1.25rem;
}
.al-comments-list {
	margin-bottom: 1.5rem;
}
.al-comments-list .comment .avatar,
.al-comments-list .comment img.avatar {
	width: 48px;
	height: 48px;
	flex-shrink: 0;
}
.al-comment-reply {
	margin-top: 1.75rem;
	padding: 1.25rem 1.25rem 1.35rem;
	border-radius: 0.75rem;
	background: var(--bs-primary-bg-subtle, rgba(33, 99, 232, 0.08));
	border: 1px solid rgba(33, 99, 232, 0.12);
}
.al-comment-reply-title {
	margin-bottom: 0.5rem;
	font-size: 1.35rem;
}
.al-comment-form-wrap > h3:first-child {
	/* WP may print title inside wrap; keep compact */
	margin-bottom: 0.5rem;
}
.al-comment-logged a {
	text-decoration: underline;
	text-underline-offset: 2px;
}
.al-comment-form .form-control {
	border-radius: 0.5rem;
}
.al-comment-textarea {
	min-height: 6.5rem;
	resize: vertical;
}
.al-comment-submit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}
.al-comment-submit .btn {
	min-width: 9rem;
}
@media (max-width: 575.98px) {
	.al-comments-section {
		margin-top: 2.25rem;
		padding-top: 1.5rem;
	}
	.al-comment-reply {
		padding: 1rem;
		margin-left: -0.25rem;
		margin-right: -0.25rem;
	}
	.al-comment-submit .btn {
		width: 100%;
	}
}
/* Hide WP default redundant chrome if a plugin reintroduces it */
.al-comment-form .comment-notes + .comment-notes,
.al-comment-reply .logged-in-as + .comment-notes {
	display: none;
}
