/* The blog post's sidebar (Single Post template "Blog post": containers "Article and sidebar", "Article", "Sidebar"
   and its cards; build/pro/blog-sidebar.php). From 1025px the article keeps its reading column on the left edge and
   the sidebar sits on the right edge, sticky under the header until the end of the article (inc/pro/blog-sidebar.php
   keeps a sidebar taller than the window within reach). Narrower, the sidebar follows the article, centred like it.
   Words, links, the categories and the article list are widget settings; this file only gives them the look. */

/* ================================================================== layout */
@media (min-width: 1025px) {
	.e-con.bj-blog-layout > .e-con-inner { align-items: flex-start !important; justify-content: space-between !important; }
	.e-con.bj-blog-layout > .e-con-inner > .e-con.bj-blog-main { flex: 0 1 720px !important; width: auto !important; max-width: 720px !important; min-width: 0; margin: 0 !important; }
	.e-con.bj-blog-layout > .e-con-inner > .e-con.bj-blog-side { flex: none !important; width: clamp(280px, 24vw, 340px) !important; max-width: none !important; margin: 0 !important; align-self: flex-start !important;
		position: sticky; top: var(--bj-side-top, calc(var(--header-sticky-height, 72px) + 24px)); }
	.admin-bar .e-con.bj-blog-layout > .e-con-inner > .e-con.bj-blog-side { top: var(--bj-side-top, calc(var(--header-sticky-height, 72px) + 32px + 24px)); }
	/* the sidebar removed or hidden in Elementor: the article goes back to the middle */
	.e-con.bj-blog-layout:not(:has(> .e-con-inner > .bj-blog-side:not(.elementor-hidden-desktop))) > .e-con-inner > .e-con.bj-blog-main { margin-inline: auto !important; }
}

/* ================================================================== cards (Categories, Latest Articles, Shop by Intention) */
.e-con.bj-blog-side > .e-con.bj-side-card { --padding-top: 24px; --padding-right: 26px; --padding-bottom: 20px; --padding-left: 26px;
	background: #fdfbf7; border: 1px solid #efe7db; border-radius: 6px; box-shadow: 0 12px 30px -24px rgba(26, 26, 26, .45); }
/* a card's title: gold small caps, then a thin gold rule */
.bj-side-title .elementor-heading-title { display: flex; align-items: center; gap: 14px; margin: 0; font-family: var(--bj-caps) !important; font-size: 12.5px !important; font-weight: 500 !important; line-height: 1.4 !important; letter-spacing: .2em; text-transform: uppercase; color: var(--bj-gold-text) !important; }
.bj-side-title .elementor-heading-title::after { content: ""; flex: 1 1 auto; min-width: 24px; height: 1px; background: linear-gradient(90deg, var(--bj-gold), rgba(203, 167, 103, .15)); }

/* ================================================================== search (Search widget, blog articles only) */
.bj-side-search .e-search { opacity: 1 !important; visibility: visible !important; }
.bj-side-search .e-search-form { position: relative; align-items: center; height: 52px; background: #fff; border: 1px solid #e3d8c4; border-radius: 6px; transition: border-color .2s var(--bj-ease), box-shadow .2s var(--bj-ease); }
.bj-side-search .e-search-form:focus-within { border-color: var(--bj-gold); box-shadow: 0 0 0 3px rgba(203, 167, 103, .18); }
.bj-side-search .e-search-label { display: none !important; }
.bj-side-search .e-search-input-wrapper { height: 100%; }
.bj-side-search .e-search-input { height: 100% !important; min-height: 0 !important; margin: 0 !important; padding: 0 38px 0 16px !important; font-size: 15.5px !important; color: var(--bj-charcoal) !important; background: none !important; border: 0 !important; border-radius: 6px 0 0 6px !important; box-shadow: none !important; outline: none; }
.bj-side-search .e-search-input::placeholder { color: var(--bj-muted) !important; opacity: 1; }
.bj-side-search .e-search-input-wrapper > svg { width: 12px !important; height: 12px !important; right: 12px !important; color: var(--bj-muted); fill: none !important; }
.bj-side-search .e-search-input-wrapper > svg * { stroke: currentColor; }
.bj-side-search .e-search .e-search-submit { display: grid !important; place-items: center; flex: none; width: 42px !important; height: 42px !important; margin: 0 4px 0 0 !important; padding: 0 !important; color: var(--bj-charcoal) !important; background: var(--bj-gold) !important; border: 0 !important; border-radius: 4px !important; cursor: pointer; transition: background-color .2s var(--bj-ease); }
.bj-side-search .e-search .e-search-submit:hover, .bj-side-search .e-search .e-search-submit:focus-visible { background: var(--bj-gold-hover) !important; }
.bj-side-search .e-search .e-search-submit svg { width: 19px !important; height: 19px !important; margin: 0 !important; fill: none !important; color: var(--bj-charcoal); }
.bj-side-search .e-search .e-search-submit svg * { stroke: currentColor; }
.bj-side-search .e-search-results-container { display: none !important; }

/* ================================================================== categories (widget "Blog Categories", here as a list) */
.bj-side-cats .bj-blog-cats__list { flex-direction: column; flex-wrap: nowrap; justify-content: flex-start !important; gap: 0 !important; }
.bj-side-cats .bj-blog-cats__list li { border-bottom: 1px solid #efe7db; }
.bj-side-cats .bj-blog-cats__list li:last-child { border-bottom: 0; }
.bj-side-cats .bj-blog-cats__link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 43px; padding: 7px 0; border-radius: 0; font-size: 15.5px; font-weight: 500; line-height: 1.3; color: var(--bj-charcoal) !important; background: none; box-shadow: none !important; transition: color .2s var(--bj-ease), padding .3s var(--bj-ease); }
.bj-side-cats .bj-blog-cats__link:hover, .bj-side-cats .bj-blog-cats__link:focus-visible { padding-left: 6px; color: var(--bj-gold-text) !important; }
.bj-side-cats .bj-blog-cats__count { flex: none; min-width: 30px; padding: 3px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.2; text-align: center; color: var(--bj-gold-text); background: #f3ecdf; }
.bj-side-cats .bj-blog-cats__link.is-current { color: var(--bj-gold-text) !important; background: none; }
.bj-side-cats .bj-blog-cats__link.is-current .bj-blog-cats__count { color: #fff; background: var(--bj-gold-text); }

/* ================================================================== latest articles (Posts widget, classic, picture on the left) */
.bj-side-latest__list .elementor-posts-container { margin: 0; }
.bj-side-latest__list .elementor-post { align-items: center; }
.bj-side-latest__list .elementor-post__thumbnail__link { flex: none; margin-bottom: 0 !important; }
.bj-side-latest__list .elementor-post__thumbnail { border-radius: 4px; overflow: hidden; background: var(--bj-well); }
.bj-side-latest__list .elementor-posts-container .elementor-post__thumbnail img { position: absolute; inset: 0 !important; width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 0; transform: none !important; transition: transform .8s var(--bj-ease); }
.bj-side-latest__list .elementor-posts-container .elementor-post:hover .elementor-post__thumbnail img { transform: scale(1.06) !important; }
.bj-side-latest__list .elementor-post__text { min-width: 0; }
.bj-side-latest__list .elementor-post__title { margin: 0 0 5px !important; font-family: var(--bj-serif) !important; font-size: 1.16rem !important; font-weight: 600 !important; line-height: 1.16 !important; }
.bj-side-latest__list .elementor-post__title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: inherit !important; color: var(--bj-charcoal) !important; text-decoration: none; transition: color .2s var(--bj-ease); }
.bj-side-latest__list .elementor-post:hover .elementor-post__title a, .bj-side-latest__list .elementor-post__title a:focus-visible { color: var(--bj-gold-text) !important; }
.bj-side-latest__list .elementor-post__meta-data { margin: 0 !important; padding: 0 !important; border: 0 !important; font-family: var(--bj-sans) !important; font-size: 11.5px !important; font-weight: 600; line-height: 1.4 !important; letter-spacing: .12em; text-transform: uppercase; color: var(--bj-muted) !important; }

/* ================================================================== shop by intention (Icon List + Button) */
.e-con.bj-blog-side > .e-con.bj-side-shop { position: relative; isolation: isolate; overflow: hidden; }
.e-con.bj-side-shop::after { content: ""; position: absolute; right: -34px; bottom: -30px; z-index: -1; width: 170px; height: 124px; background: var(--bj-gold); opacity: .07; -webkit-mask: var(--bj-i-lotus) center / contain no-repeat; mask: var(--bj-i-lotus) center / contain no-repeat; pointer-events: none; }
.bj-side-shop__list .elementor-icon-list-items { margin: 0 !important; padding: 0 !important; }
.bj-side-shop__list .elementor-icon-list-item { margin: 0 !important; padding: 0 !important; }
.bj-side-shop__list .elementor-icon-list-item > a { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 40px; padding: 6px 0; text-decoration: none; transition: padding .3s var(--bj-ease); }
.bj-side-shop__list .elementor-icon-list-text { padding: 0 !important; font-size: 15.5px; font-weight: 500; line-height: 1.3; color: var(--bj-charcoal) !important; transition: color .2s var(--bj-ease); }
.bj-side-shop__list .elementor-icon-list-item > a::after { content: ""; flex: none; width: 16px; height: 16px; background: var(--bj-gold-text); opacity: .45; transition: opacity .2s var(--bj-ease), transform .3s var(--bj-ease);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Cpath d='M4.5 12h15M13.5 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Cpath d='M4.5 12h15M13.5 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.bj-side-shop__list .elementor-icon-list-item > a:hover, .bj-side-shop__list .elementor-icon-list-item > a:focus-visible { padding-left: 6px; }
.bj-side-shop__list .elementor-icon-list-item > a:hover .elementor-icon-list-text, .bj-side-shop__list .elementor-icon-list-item > a:focus-visible .elementor-icon-list-text { color: var(--bj-gold-text) !important; }
.bj-side-shop__list .elementor-icon-list-item > a:hover::after, .bj-side-shop__list .elementor-icon-list-item > a:focus-visible::after { opacity: 1; transform: translateX(3px); }
.bj-side-shop__btn { margin-top: 6px; }
.bj-side-shop__btn, .bj-side-shop__btn .elementor-button { width: 100% !important; }
.bj-side-shop__btn .elementor-button { justify-content: center; padding: 15px 22px !important; font-size: 15px !important; }
.bj-side-shop__btn .elementor-button-content-wrapper { gap: 10px; }
.bj-side-shop__btn .elementor-button-icon svg { width: 16px; height: 16px; transition: transform .3s var(--bj-ease); }
.bj-side-shop__btn .elementor-button:hover .elementor-button-icon svg { transform: translateX(4px); }

/* ================================================================== tablet and phone: after the article, before Keep Reading */
@media (max-width: 1024px) {
	.e-con.bj-blog-layout > .e-con-inner > .e-con.bj-blog-side { position: static; }
}
/* tablet: the categories in two columns, so the wide card is not half empty */
@media (min-width: 640px) and (max-width: 1024px) {
	.bj-side-cats .bj-blog-cats__list { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 44px !important; }
	.bj-side-cats .bj-blog-cats__list li, .bj-side-cats .bj-blog-cats__list li:last-child { border-bottom: 0; border-top: 1px solid #efe7db; }
	.bj-side-cats .bj-blog-cats__list li:nth-child(-n+2) { border-top: 0; }
}
@media (max-width: 767px) {
	.e-con.bj-blog-side > .e-con.bj-side-card { --padding-top: 20px; --padding-right: 20px; --padding-bottom: 18px; --padding-left: 20px; }
	.bj-side-search .e-search-input { font-size: 16px !important; } /* 16px: phones do not zoom into the field */
}
