.bbdl-library {
	--bbdl-blue: #1e73be;
	--bbdl-blue-dark: #155f9e;
	--bbdl-border: #dbe5ee;
	--bbdl-ink: #183049;
	--bbdl-muted: #657789;
	--bbdl-surface: #f7fafc;
	color: var(--bbdl-ink);
}

.bbdl-library *,
.bbdl-library *::before,
.bbdl-library *::after {
	box-sizing: border-box;
}

.bbdl-library__header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 18px;
}

.bbdl-library__header h2 {
	margin: 0 0 3px;
	color: var(--bbdl-ink);
	font-size: clamp(23px, 2.2vw, 30px);
	line-height: 1.2;
}

.bbdl-library__header p {
	margin: 0;
	color: var(--bbdl-muted);
	font-size: 14px;
	line-height: 1.5;
}

.bbdl-search {
	position: relative;
	display: block;
	flex: 0 1 360px;
	margin: 0;
}

.bbdl-search svg {
	position: absolute;
	top: 50%;
	left: 14px;
	width: 19px;
	height: 19px;
	transform: translateY(-50%);
	fill: none;
	stroke: #7b8c9c;
	stroke-linecap: round;
	stroke-width: 1.8;
	pointer-events: none;
}

.bbdl-search input[type="search"] {
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 14px 0 43px;
	border: 1px solid var(--bbdl-border);
	border-radius: 8px;
	background: #fff;
	box-shadow: none;
	color: var(--bbdl-ink);
	font-size: 14px;
}

.bbdl-search input[type="search"]:focus {
	border-color: var(--bbdl-blue);
	box-shadow: 0 0 0 3px rgba(30, 115, 190, .12);
	outline: 0;
}

.bbdl-results {
	min-height: 0;
	margin: 0 0 10px;
	color: var(--bbdl-muted);
	font-size: 13px;
}

.bbdl-results:empty {
	display: none;
}

.bbdl-orders {
	display: grid;
	gap: 10px;
}

.bbdl-library--initializing .bbdl-order:nth-child(n+11) {
	display: none;
}

.bbdl-order {
	overflow: hidden;
	border: 1px solid var(--bbdl-border);
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(28, 54, 80, .04);
}

.bbdl-order[hidden] {
	display: none !important;
}

.bbdl-order__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	min-height: 68px;
	padding: 14px 18px;
	cursor: pointer;
	list-style: none;
	transition: background-color .15s ease;
}

.bbdl-order__summary::-webkit-details-marker {
	display: none;
}

.bbdl-order__summary:hover {
	background: var(--bbdl-surface);
}

.bbdl-order__summary:focus-visible {
	box-shadow: inset 0 0 0 3px rgba(30, 115, 190, .22);
	outline: 0;
}

.bbdl-order[open] > .bbdl-order__summary {
	border-bottom: 1px solid var(--bbdl-border);
	background: var(--bbdl-surface);
}

.bbdl-order__identity {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.bbdl-order__identity strong {
	color: var(--bbdl-ink);
	font-size: 16px;
	line-height: 1.3;
}

.bbdl-order__identity time {
	color: var(--bbdl-muted);
	font-size: 13px;
	line-height: 1.3;
}

.bbdl-order__count {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex: 0 0 auto;
	color: var(--bbdl-muted);
	font-size: 13px;
	font-weight: 600;
}

.bbdl-order__chevron {
	width: 9px;
	height: 9px;
	border-right: 2px solid var(--bbdl-blue);
	border-bottom: 2px solid var(--bbdl-blue);
	transform: rotate(45deg) translateY(-2px);
	transition: transform .15s ease;
}

.bbdl-order[open] .bbdl-order__chevron {
	transform: rotate(225deg) translate(-2px, -2px);
}

.bbdl-order__downloads {
	padding: 0 18px;
}

.bbdl-download {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 15px 0;
	border-bottom: 1px solid #edf1f5;
}

.bbdl-download:last-child {
	border-bottom: 0;
}

.bbdl-download__copy {
	display: grid;
	gap: 3px;
	min-width: 0;
}

.bbdl-download__product {
	overflow-wrap: anywhere;
	color: var(--bbdl-ink);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
}

a.bbdl-download__product:hover {
	color: var(--bbdl-blue);
}

.bbdl-download__file,
.bbdl-download__meta {
	overflow-wrap: anywhere;
	color: var(--bbdl-muted);
	font-size: 12.5px;
	line-height: 1.4;
}

.bbdl-download__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	flex: 0 0 auto;
	min-height: 38px;
	padding: 9px 13px;
	border-radius: 7px;
	background: var(--bbdl-blue);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}

.bbdl-download__button:hover,
.bbdl-download__button:focus {
	background: var(--bbdl-blue-dark);
	color: #fff;
}

.bbdl-download__button:focus-visible {
	box-shadow: 0 0 0 3px rgba(30, 115, 190, .22);
	outline: 0;
}

.bbdl-download__button svg {
	width: 17px;
	height: 17px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.bbdl-empty {
	padding: 34px 20px;
	border: 1px dashed var(--bbdl-border);
	border-radius: 10px;
	background: var(--bbdl-surface);
	text-align: center;
}

.bbdl-empty strong {
	display: block;
	margin-bottom: 3px;
}

.bbdl-empty p {
	margin: 0;
	color: var(--bbdl-muted);
	font-size: 14px;
}

.bbdl-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 20px;
}

.bbdl-pagination[hidden] {
	display: none !important;
}

.bbdl-pagination button {
	min-height: 38px;
	margin: 0;
	padding: 8px 14px;
	border: 1px solid var(--bbdl-border);
	border-radius: 7px;
	background: #fff;
	box-shadow: none;
	color: var(--bbdl-blue);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

.bbdl-pagination button:hover:not(:disabled),
.bbdl-pagination button:focus:not(:disabled) {
	border-color: var(--bbdl-blue);
	background: #f4f9fd;
}

.bbdl-pagination button:disabled {
	opacity: .45;
	cursor: not-allowed;
}

.bbdl-pagination span {
	color: var(--bbdl-muted);
	font-size: 13px;
}

@media (max-width: 700px) {
	.bbdl-library__header {
		align-items: stretch;
		flex-direction: column;
		gap: 14px;
	}

	.bbdl-search {
		flex-basis: auto;
	}

	.bbdl-order__summary {
		min-height: 64px;
		padding: 13px 14px;
	}

	.bbdl-order__count {
		gap: 9px;
	}

	.bbdl-order__downloads {
		padding: 0 14px;
	}

	.bbdl-download {
		align-items: stretch;
		flex-direction: column;
		gap: 11px;
	}

	.bbdl-download__button {
		align-self: stretch;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bbdl-order__summary,
	.bbdl-order__chevron {
		transition: none;
	}
}
