/* Front-end styles for the Digital Garden Archive block */

/* Breadcrumbs */
.digital-garden-breadcrumb-title {
	margin-top: 0;
}

.digital-garden-breadcrumbs ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
}

.digital-garden-breadcrumbs li:not(:last-of-type)::after {
	content: '»';
	padding: 0 3px;
}

/* stylelint-disable no-descending-specificity -- breadcrumbs and archive are independent components that never nest */
.digital-garden-breadcrumbs ul li a {
	text-decoration: none;
}

.digital-garden-breadcrumbs ul li a:hover {
	text-decoration: underline;
}
/* stylelint-enable no-descending-specificity */

/* Container Filters */
.digital-garden-tag-filter {
	margin-bottom: 1rem;
}

.digital-garden-tag-filter legend {
	font-weight: 600;
}

.digital-garden-filter-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.digital-garden-filter-list__item {
	margin: 0;
}

.digital-garden-filter-select {
	appearance: none;
	background-color: #edf2f7;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230073aa' d='M6 8a1 1 0 0 1-.7-.29l-5-5A1 1 0 0 1 1.7.3L6 4.59 10.3.3a1 1 0 0 1 1.4 1.41l-5 5A1 1 0 0 1 6 8Z'/%3E%3C/svg%3E");
	background-position: right 0.65rem center;
	background-repeat: no-repeat;
	background-size: 12px 8px;
	border: 1px solid #cbd5f5;
	border-radius: 6px;
	color: #1a202c;
	font-size: 0.95rem;
	line-height: 1.4;
	max-width: 320px;
	padding: 0.45rem 2.25rem 0.45rem 0.75rem;
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		background-color 0.2s ease;
}

.digital-garden-filter-select:focus {
	background-color: #fff;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
	outline: none;
}

.digital-garden-filter-input {
	border: 0;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.digital-garden-filter-button {
	align-items: center;
	background-color: #edf2f7;
	border: 1px solid #cbd5f5;
	border-radius: 999px;
	color: #1a202c;
	cursor: pointer;
	display: inline-flex;
	gap: 0.25rem;
	padding: 0.25rem 0.5rem;
	position: relative;
	transition:
		background-color 0.2s ease,
		color 0.2s ease,
		border-color 0.2s ease,
		box-shadow 0.2s ease;
}

.digital-garden-filter-button:hover {
	background-color: #0073aa;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
	color: #fff;
}

.digital-garden-filter-button.is-active {
	background-color: #0073aa;
	border-color: #0073aa;
	color: #fff;
}

.digital-garden-filter-button__label {
	font-weight: 500;
}

.digital-garden-filter-count {
	font-size: 0.85em;
}

.digital-garden-filter-button.is-active .digital-garden-filter-count {
	opacity: 0.95;
}

.digital-garden-filter__empty {
	color: #4a5568;
	font-style: italic;
	margin: 0;
}

.digital-garden-search {
	margin-bottom: 1.5rem;
}

.digital-garden-search__label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.digital-garden-search-form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	position: relative;
	max-width: 480px;
}

.digital-garden-search__field {
	flex: 1 1 160px;
	min-width: 160px;
	appearance: none;
	background-color: #edf2f7;
	border: 1px solid #cbd5f5;
	border-radius: 999px;
	color: #1a202c;
	font-size: 0.95rem;
	line-height: 1.4;
	padding: 0.5rem;
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		background-color 0.2s ease;
}

.digital-garden-search__field:focus {
	background-color: #fff;
	border-color: #0073aa;
	box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
	outline: none;
}

.digital-garden-search__icon {
	position: absolute;
	right: 0.75rem;
	width: 1.15rem;
	height: 1.15rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230073aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'%3E%3C/circle%3E%3Cline x1='20' y1='20' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E")
		no-repeat center center;
	background-size: 1.15rem;
	pointer-events: none;
}

/* Note Cards */
.digital-garden-note {
	background-color: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.digital-garden-note-title {
	margin: 0;
	font-size: 1.35rem;
	line-height: 1.3;
	color: #0f172a;
}

.digital-garden-note-content__more {
	color: #0073aa;
	font-weight: 600;
	font-size: 0.95rem;
}

.digital-garden-note-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.digital-garden-note-tags .note-tag {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.75rem;
	border-radius: 999px;
	background-color: #eef2ff;
	color: #3730a3;
	font-size: 0.85rem;
	font-weight: 600;
}

.digital-garden-note-tags__empty {
	color: #94a3b8;
	font-size: 0.9rem;
}

.digital-garden-note-completeness {
	align-self: flex-start;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.2rem 0.75rem;
	border-radius: 999px;
	background-color: #f97316;
	color: #fff;
}

.digital-garden-note-featured-image {
	border-radius: 10px;
	overflow: hidden;
	background-color: #e2e8f0;
	min-height: 180px;
	align-content: center;
	text-align: center;
}

.digital-garden-note-featured-image__placeholder {
	width: 100%;
	height: 100%;
	background: repeating-linear-gradient(
		45deg,
		rgba(255, 255, 255, 0.35),
		rgba(255, 255, 255, 0.35) 10px,
		rgba(148, 163, 184, 0.35) 10px,
		rgba(148, 163, 184, 0.35) 20px
	);
}

.digital-garden-note-featured-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.digital-garden-note-publish-date,
.digital-garden-note-modify-date {
	font-size: 1rem;
}

.digital-garden-note-block__empty {
	color: #4a5568;
	font-style: italic;
	margin: 1.5rem 0 0;
}

/* Linked From */
.digital-garden-linked-from__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Related Notes */
.digital-garden-related-notes__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* [[Draft]] placeholder — shown instead of a link when the linked note
   hasn't been published yet, preventing 404s for visitors. */
.digital-garden-note-link--draft {
	border-bottom: 1px dashed currentColor;
	color: inherit;
	cursor: default;
	opacity: 0.5;
}
