/* Overview of the partners: search field, list, folded detail block. */

.sgp-directory {
	--sgp-line: #e0e0e0;
	--sgp-muted: #666;
}

.sgp-search {
	margin: 0 0 1.5rem;
}

.sgp-search__label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25rem;
}

.sgp-search__input {
	width: 100%;
	max-width: 22rem;
	padding: 0.6rem 0.75rem;
	font-size: 1rem;
	border: 1px solid var(--sgp-line);
	border-radius: 4px;
}

.sgp-search__count {
	margin: 0.4rem 0 0;
	color: var(--sgp-muted);
	font-size: 0.875rem;
}

.sgp-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sgp-item {
	border-bottom: 1px solid var(--sgp-line);
	padding: 0.9rem 0;
}

.sgp-item[hidden] {
	display: none;
}

.sgp-item__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.15rem 0.9rem;
}

.sgp-item__name {
	margin: 0;
	font-size: 1.05rem;
	color: var(--sg-primary, #2e7d32);
}

.sgp-item__place {
	color: var(--sgp-muted);
	font-size: 0.875rem;
}

.sgp-item__web {
	font-size: 0.875rem;
	word-break: break-all;
}

.sgp-item__body {
	margin-top: 0.6rem;
}

/* The script folds the detail blocks; without it everything stays open. */
.sgp-js .sgp-item__body {
	display: none;
}

.sgp-js .sgp-item.is-open .sgp-item__body {
	display: block;
}

.sgp-item__body p {
	margin: 0.2rem 0;
}

/* Colours are set on purpose and with the class of the list in front: themes often give every
   button white text, which is unreadable on a transparent background. */
.sgp-directory .sgp-item__toggle {
	display: none;
	margin-left: auto;
	align-self: center;
	appearance: none;
	background: var(--sg-primary, #2e7d32);
	color: var(--sg-on-primary, #fff);
	border: 1px solid var(--sg-primary, #2e7d32);
	border-radius: 4px;
	padding: 0.3rem 0.8rem;
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	text-transform: none;
	box-shadow: none;
}

.sgp-directory .sgp-item__toggle:hover,
.sgp-directory .sgp-item__toggle:focus-visible,
.sgp-directory .sgp-item.is-open .sgp-item__toggle {
	background: var(--sg-primary-dark, #1b5e20);
	border-color: var(--sg-primary-dark, #1b5e20);
	color: var(--sg-on-primary, #fff);
}

.sgp-empty,
.sgp-none {
	color: var(--sgp-muted);
}

.sgp-directory.sgp-js .sgp-item__toggle {
	display: block;
}
