/*
 * Best of Lime USA: product page content. The bag calculator and downloads list (shortcodes in
 * bol-usa-site.php) and the Usage, Technical and Safety, and Shipping panels, which are core
 * Details blocks in the product description. Loaded on product pages and wherever a shortcode runs.
 * Field borders #767676 (4.54:1 on white) pass WCAG 1.4.11, as in forms.css.
 */

/* Bag calculator */
.bol-calc {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 760px;
	padding: 28px;
	border-radius: 8px;
	background-color: #F8F8F8;
	border-top: 6px solid #7C950E;
}
.bol-calc-title { margin: 0; }
.bol-calc-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }
.bol-calc-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; }
.bol-calc-field label { font-weight: 700; color: #363636; }
.bol-calc :is(input, select) {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid #767676;
	border-radius: 4px;
	background-color: #FFFFFF;
	color: #363636;
	font: 16px/1.5 'Lato', sans-serif;
}
.bol-calc select { appearance: auto; }
.bol-calc :is(input, select):hover { border-color: #265362; }
.bol-calc input[aria-invalid="true"] { border: 2px solid #A4161A; }
.bol-calc button.bol-calc-button { cursor: pointer; font: inherit; font-weight: 700; }
.bol-calc-error { margin: 0; color: #A4161A; font-weight: 700; }
.bol-calc-result { display: flex; flex-direction: column; gap: 6px; }
.bol-calc-answer { margin: 0; font-size: 20px; font-weight: 700; color: #265362; }
.bol-calc-retry { margin: 0; }
.bol-calc-retry a { color: #5F730A; }
.bol-calc-note { margin: 0; font-size: 14px; color: #595959; }
.bol-calc [hidden] { display: none; }

/* Downloads */
.bol-downloads { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.bol-download { position: relative; padding-left: 28px; margin: 0; }
.bol-download::before {
	content: "";
	position: absolute;
	left: 0;
	top: 3px;
	width: 18px;
	height: 18px;
	background-color: #5F730A;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1v9m0 0l-4-4m4 4l4-4M2 14h12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1v9m0 0l-4-4m4 4l4-4M2 14h12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.bol-download a { font-weight: 700; }
.bol-download-meta { font-size: 14px; color: #595959; }

/* Panels: core Details blocks with an H2 inside */
.bol-panel {
	border: 1px solid #D6D6D6;
	border-radius: 8px;
	background-color: #FFFFFF;
}
.bol-panel + .bol-panel { margin-top: 16px; }
.bol-panel > summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 56px;
	padding: 14px 24px;
	cursor: pointer;
	list-style: none;
	color: #265362;
	font-size: 20px;
	font-weight: 700;
}
.bol-panel > summary::-webkit-details-marker { display: none; }
.bol-panel > summary::after {
	content: "";
	flex: 0 0 auto;
	width: 12px;
	height: 12px;
	border-right: 3px solid currentColor;
	border-bottom: 3px solid currentColor;
	transform: rotate(45deg) translate(-3px, -3px);
}
.bol-panel[open] > summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.bol-panel > summary:hover { background-color: #F8F8F8; }
.bol-panel > :not(summary) { margin-left: 24px; margin-right: 24px; }
.bol-panel > :not(summary) + * { margin-top: 16px; }
.bol-panel > summary + * { margin-top: 8px; }
.bol-panel > :last-child { margin-bottom: 28px; }
.bol-panel h3 { margin-top: 28px; }

/* FAQs: the same panel, lighter and tighter, so a run of questions reads as one list */
.bol-faq + .bol-faq { margin-top: 12px; }
.bol-faq > summary { font-size: 18px; line-height: 1.4; }
.bol-faq > :last-child { margin-bottom: 24px; }

/* Embedded video keeps its frame inside the column */
.bol-prose .wp-block-embed iframe,
.bol-prose .wp-block-embed .ckm-embed { width: 100%; max-width: 100%; aspect-ratio: 16 / 9; height: auto; }

/* Panels on phones */
@media (max-width: 767px) {
	.bol-calc { padding: 20px; }
	.bol-panel > summary { padding: 12px 16px; font-size: 18px; }
	.bol-faq > summary { font-size: 17px; }
	.bol-panel > :not(summary) { margin-left: 16px; margin-right: 16px; }
}
