.nest-rs-wrap {
	box-sizing: border-box;
	margin: 1.5rem 0;
	max-width: none;
	padding-left: clamp(1.25rem, 4vw, 4rem);
	padding-right: clamp(1.25rem, 4vw, 4rem);
	width: 100%;
}

.wp-block-shortcode:has(.nest-rs-wrap),
.entry-content:has(.nest-rs-wrap),
.wp-block-post-content:has(.nest-rs-wrap) {
	box-sizing: border-box;
	max-width: min(82rem, 100vw) !important;
	width: min(82rem, 100vw) !important;
}

.wp-block-shortcode:has(.nest-rs-wrap) {
	margin-left: auto !important;
	margin-right: auto !important;
}

.wp-site-blocks main:has(.nest-rs-wrap) .entry-content,
.wp-site-blocks main:has(.nest-rs-wrap) .wp-block-post-content {
	padding-left: 0;
	padding-right: 0;
}

.nest-rs-header {
	align-items: center;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.nest-rs-store-header {
	border-bottom: 1px solid #d9e2ec;
	margin-bottom: 1.25rem;
	padding-bottom: 1rem;
}

.nest-rs-store-header p {
	color: #52606d;
	margin: 0.25rem 0 0;
}

.nest-rs-section {
	border: 1px solid #d9e2ec;
	border-radius: 8px;
	margin: 1rem 0;
	overflow: clip;
}

.nest-rs-section summary {
	align-items: center;
	background: #f5f7fa;
	cursor: pointer;
	display: flex;
	font-weight: 700;
	justify-content: space-between;
	list-style-position: inside;
	padding: 0.85rem 1rem;
}

.nest-rs-section summary small {
	color: #52606d;
	font-weight: 500;
}

.nest-rs-section-body {
	padding: 1rem;
}

.nest-rs-balance {
	background: #102a43;
	border-radius: 8px;
	color: #fff;
	font-size: 2rem;
	font-weight: 700;
	line-height: 1;
	padding: 0.75rem 1rem;
}

.nest-rs-balance span {
	display: block;
	font-size: 0.8rem;
	font-weight: 500;
	margin-top: 0.25rem;
}

.nest-rs-table {
	border-collapse: collapse;
	margin: 1rem 0;
	width: 100%;
}

.nest-rs-table th,
.nest-rs-table td {
	border-bottom: 1px solid #d9e2ec;
	padding: 0.65rem;
	text-align: left;
}

.nest-rs-table th {
	background: #f0f4f8;
	font-weight: 700;
}

.nest-rs-badge {
	background: #e0f2fe;
	border-radius: 999px;
	display: inline-block;
	padding: 0.15rem 0.5rem;
}

.is-positive {
	color: #18794e;
	font-weight: 700;
}

.is-negative {
	color: #b42318;
	font-weight: 700;
}

.nest-rs-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	margin: 1rem 0 2rem;
}

.nest-rs-product-grid {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	margin: 1.25rem 0 2rem;
}

.nest-rs-product-tile {
	border: 1px solid #d9e2ec;
	border-radius: 8px;
	color: inherit;
	display: grid;
	gap: 0.55rem;
	padding: 0.75rem;
	text-decoration: none;
}

.nest-rs-product-title {
	font-weight: 700;
}

.nest-rs-card {
	border: 1px solid #d9e2ec;
	border-radius: 8px;
	padding: 1rem;
}

.nest-rs-product-access {
	color: #52606d;
	font-size: 0.95rem;
}

.nest-rs-product-image {
	aspect-ratio: 4 / 3;
	display: block;
	height: auto;
	margin-bottom: 0.75rem;
	object-fit: cover;
	width: 100%;
}

.nest-rs-store-filter,
.nest-rs-store-links {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1rem 0;
}

.nest-rs-product-detail {
	display: grid;
	gap: 2rem;
	grid-template-columns: minmax(220px, 420px) minmax(0, 1fr);
}

.nest-rs-product-price {
	font-size: 1.4rem;
	font-weight: 700;
}

.nest-rs-media-preview img {
	display: block;
	height: auto;
	margin-top: 0.5rem;
	max-width: 120px;
}

.nest-rs-product-form,
.nest-rs-manual-form,
.nest-rs-filter {
	align-items: end;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1rem 0;
}

.nest-rs-modal .nest-rs-product-form {
	align-items: stretch;
	display: grid;
	grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.nest-rs-modal .nest-rs-product-form label,
.nest-rs-modal .nest-rs-product-form .nest-rs-student-picks {
	min-width: 0;
}

.nest-rs-modal .nest-rs-product-form label:has(textarea),
.nest-rs-modal .nest-rs-product-form .nest-rs-student-picks,
.nest-rs-modal .nest-rs-product-form .nest-rs-status-field {
	grid-column: 1 / -1;
}

.nest-rs-status-field {
	border: 1px solid #d9e2ec;
	border-radius: 8px;
	padding: 0.75rem;
}

.nest-rs-status-field label {
	align-items: center;
	display: flex;
	gap: 0.5rem;
}

.nest-rs-status-field p {
	color: #52606d;
	font-size: 0.95rem;
	margin: 0.35rem 0 0;
}

.nest-rs-product-form label,
.nest-rs-manual-form label,
.nest-rs-filter label {
	display: grid;
	gap: 0.25rem;
}

.nest-rs-product-form textarea {
	min-height: 80px;
}

.nest-rs-student-picks {
	border: 1px solid #d9e2ec;
	border-radius: 8px;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
	padding: 0.75rem;
}

.nest-rs-modal[hidden] {
	display: none;
}

.nest-rs-download-file-field[hidden] {
	display: none !important;
}

.nest-rs-modal {
	align-items: center;
	background: rgba(15, 23, 42, 0.58);
	bottom: 0;
	display: flex;
	justify-content: center;
	left: 0;
	padding: 1rem;
	position: fixed;
	right: 0;
	top: 0;
	z-index: 9999;
}

.nest-rs-modal-panel {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
	max-height: min(88vh, 900px);
	max-width: 980px;
	overflow: auto;
	padding: 1.25rem;
	position: relative;
	width: min(980px, calc(100vw - 2rem));
}

.nest-rs-modal-close {
	align-items: center;
	display: inline-flex;
	font-size: 1.5rem;
	height: 2.25rem;
	justify-content: center;
	padding: 0;
	position: absolute;
	right: 1rem;
	top: 1rem;
	width: 2.25rem;
}

.nest-rs-wrap button,
.nest-rs-button {
	background: #2563eb;
	border: 0;
	border-radius: 6px;
	color: #fff;
	cursor: pointer;
	display: inline-block;
	padding: 0.55rem 0.8rem;
	text-decoration: none;
}

.nest-rs-wrap button:disabled {
	background: #9aa6b2;
	cursor: not-allowed;
}

@media (max-width: 680px) {
	.nest-rs-header {
	align-items: flex-start;
	flex-direction: column;
	}

	.nest-rs-table {
	display: block;
	overflow-x: auto;
	}

	.nest-rs-product-detail {
	grid-template-columns: 1fr;
	}

	.nest-rs-modal .nest-rs-product-form {
	grid-template-columns: 1fr;
	}
}
