/**
 * Multi-select dropdown filters on the payout archives.
 */

.payout-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 25px;
}

.payout-filters__label {
	font-weight: 600;
	font-size: 15px;
	color: #333;
	margin-right: 2px;
}

.payout-filter {
	position: relative;
}

.payout-filter__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 160px;
	padding: 9px 14px;
	background: #fff;
	border: 1px solid #d5d5d5;
	border-radius: 4px;
	font-size: 15px;
	line-height: 1.2;
	color: #333;
	cursor: pointer;
	transition: border-color .15s ease;
}

.payout-filter__toggle:hover,
.payout-filter__toggle[aria-expanded="true"] {
	border-color: #b8952f;
}

.payout-filter__name {
	flex: 1 1 auto;
	text-align: left;
	white-space: nowrap;
}

.payout-filter__count {
	flex: 0 0 auto;
	min-width: 20px;
	padding: 1px 6px;
	background: #b8952f;
	border-radius: 10px;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
}

.payout-filter__count[hidden] {
	display: none;
}

.payout-filter__caret {
	flex: 0 0 auto;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid #777;
	transition: transform .15s ease;
}

.payout-filter__toggle[aria-expanded="true"] .payout-filter__caret {
	transform: rotate(180deg);
}

.payout-filter__menu {
	display: none;
	position: absolute;
	z-index: 20;
	top: calc(100% + 4px);
	left: 0;
	min-width: 100%;
	max-height: 320px;
	overflow-y: auto;
	padding: 6px 0;
	background: #fff;
	border: 1px solid #d5d5d5;
	border-radius: 4px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}

.payout-filter.is-open .payout-filter__menu {
	display: block;
}

.payout-filter__option {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	padding: 7px 16px;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.3;
	white-space: nowrap;
	cursor: pointer;
}

.payout-filter__option:hover {
	background: #faf6ea;
}

/* Options that would return nothing are removed from the list. A ticked one
   stays, so it can always be un-ticked, with its zero called out. */
.payout-filter__option[hidden] {
	display: none;
}

.payout-filter__option.is-empty .payout-filter__option-count {
	color: #c0392b;
}

.payout-filter__option input {
	margin: 0;
	flex: 0 0 auto;
}

.payout-filter__option-name {
	flex: 1 1 auto;
}

.payout-filter__option-count {
	flex: 0 0 auto;
	color: #999;
	font-size: 13px;
}

.payout-filter__option--child {
	padding-left: 34px;
}

.payout-filter__option--child .payout-filter__option-name {
	color: #555;
}

.payout-filters__apply {
	padding: 9px 20px;
	background: #b8952f;
	border: 1px solid #b8952f;
	border-radius: 4px;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease;
}

.payout-filters__apply:hover {
	background: #a3831f;
}

.payout-filters__clear {
	font-size: 14px;
	color: #777;
	text-decoration: underline;
}

.payout-filters__clear:hover {
	color: #b8952f;
}

.payout-filters__summary {
	margin: -10px 0 20px;
	font-size: 14px;
	color: #777;
}

@media (max-width: 767px) {

	.payout-filters {
		gap: 8px;
	}

	.payout-filters__label {
		flex: 0 0 100%;
	}

	.payout-filter {
		flex: 1 1 calc(50% - 4px);
	}

	.payout-filter__toggle {
		width: 100%;
		min-width: 0;
	}

	.payout-filter__menu {
		min-width: 220px;
	}

	.payout-filters__apply {
		flex: 1 1 100%;
	}
}
