/**
 * Public sponsor child listing.
 */

.portal-sponsor {
	max-width: 1100px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: #1d2327;
}

.portal-sponsor-search {
	display: block;
	margin-bottom: 12px;
}

.portal-sponsor-search input,
.portal-sponsor-filter-row select {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	background: #fff;
	font-size: 1rem;
	color: #1d2327;
}

.portal-sponsor-filter-row {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 20px;
}

.portal-sponsor-filter-row label {
	display: block;
	min-width: 0;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.portal-sponsor-results[aria-busy="true"] {
	opacity: 0.6;
}

.portal-sponsor-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}

.portal-sponsor-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 12px 12px 16px;
	background: #fff;
	border: 1px solid #e2e4e7;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	text-align: center;
}

.portal-sponsor-photo-link {
	display: block;
	width: 100%;
}

.portal-sponsor-photo,
.portal-sponsor-photo-fallback {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1.15;
	object-fit: cover;
	object-position: center top;
	border-radius: 8px;
	background: #f0f0f1;
}

.portal-sponsor-name {
	margin: 10px 0 0;
	font-size: 1rem;
}

.portal-sponsor-meta {
	margin: 0;
	color: #3c434a;
}

.portal-sponsor-read,
.portal-sponsor-choose {
	border: 0;
	cursor: pointer;
	font-weight: 600;
}

.portal-sponsor-read {
	margin-top: 6px;
	padding: 0;
	background: transparent;
	color: #3c8c40;
	font-size: 1rem;
}

.portal-sponsor-read:hover,
.portal-sponsor-read:focus {
	text-decoration: underline;
}

.portal-sponsor-choose {
	margin-top: 8px;
	padding: 8px 16px;
	border-radius: 999px;
	background: #2f3db8;
	color: #fff;
	font-size: 0.95rem;
}

.portal-sponsor-choose:hover,
.portal-sponsor-choose:focus {
	background: #24329a;
}

.portal-sponsor-empty {
	margin: 12px 0;
	color: #50575e;
}

.portal-sponsor-pager {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 20px;
}

.portal-sponsor-pager button {
	min-width: 40px;
	padding: 8px 12px;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	background: #fff;
	color: #1d2327;
	cursor: pointer;
}

.portal-sponsor-pager button[aria-current="page"] {
	background: #2f3db8;
	border-color: #2f3db8;
	color: #fff;
}

.portal-sponsor-pager button:disabled {
	opacity: 0.45;
	cursor: default;
}

.portal-sponsor-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	background: rgba(0, 0, 0, 0.7);
}

.portal-sponsor-modal[hidden] {
	display: none !important;
}

.portal-sponsor-modal-dialog {
	position: relative;
	width: min(860px, 100%);
	max-height: calc(100vh - 48px);
	overflow: auto;
	padding: 36px 28px 28px;
	background: #fff;
	border-radius: 12px;
}

.portal-sponsor-modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #e5e7eb;
	color: #111827;
	font-size: 28px;
	font-weight: 600;
	line-height: 1;
	min-width: 36px;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.portal-sponsor-modal-layout {
	display: grid;
	grid-template-columns: minmax(180px, 240px) 1fr;
	gap: 24px;
	align-items: start;
}

.portal-sponsor-modal-photo img,
.portal-sponsor-modal-photo .portal-sponsor-photo-fallback {
	width: 100%;
	border-radius: 8px;
	aspect-ratio: 1 / 1.15;
	object-fit: cover;
}

.portal-sponsor-modal-details p {
	margin: 0 0 8px;
}

.portal-sponsor-modal-story {
	line-height: 1.6;
}

.portal-sponsor-pay {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	background: rgba(0, 0, 0, 0.7);
}

.portal-sponsor-pay[hidden] {
	display: none !important;
}

.portal-sponsor-pay-dialog {
	position: relative;
	width: min(720px, 100%);
	max-height: calc(100vh - 48px);
	overflow: auto;
	padding: 36px 28px 28px;
	background: #fff;
	border-radius: 12px;
}

.portal-sponsor-pay-step[hidden],
.portal-sponsor-pay-thanks[hidden] {
	display: none !important;
}

.portal-sponsor-pay-photo-wrap {
	display: flex;
	justify-content: center;
	margin-bottom: 12px;
}

.portal-sponsor-pay-photo {
	width: 72px;
	height: 72px;
	aspect-ratio: auto;
	border-radius: 8px;
	object-fit: cover;
	object-position: center top;
}

.portal-sponsor-pay-photo[hidden] {
	display: none !important;
}

.portal-sponsor-pay-kicker {
	margin: 0;
	text-align: center;
	color: #50575e;
}

.portal-sponsor-pay-child {
	margin: 4px 0 8px;
	text-align: center;
	font-size: 1.4rem;
}

.portal-sponsor-pay-note {
	margin: 0 0 16px;
	text-align: center;
	color: #3c434a;
	line-height: 1.5;
}

.portal-sponsor-amounts {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 16px;
}

.portal-sponsor-amount {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	cursor: pointer;
}

.portal-sponsor-amount.is-selected {
	border-color: #2f3db8;
	box-shadow: 0 0 0 1px #2f3db8;
}

.portal-sponsor-amount input {
	width: 1.1rem;
	height: 1.1rem;
	margin: 0;
	flex: 0 0 auto;
}

.portal-sponsor-amount-name {
	flex: 1;
	font-weight: 600;
}

.portal-sponsor-amount-price {
	font-weight: 600;
	color: #2f3db8;
}

.portal-sponsor-pay-unavailable {
	margin: 0 0 12px;
	color: #8a2424;
}

.portal-sponsor-pay-thanks {
	text-align: center;
}

body.portal-sponsor-modal-open {
	overflow: hidden;
}
	overflow: hidden;
}

@media (max-width: 900px) {
	.portal-sponsor-filter-row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	.portal-sponsor-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.portal-sponsor-modal-layout {
		grid-template-columns: 1fr;
	}
}
