/* RS Result — frontend styles. Everything is scoped under
   .rs-result-wrapper so nothing leaks into the surrounding theme. */

.rs-result-wrapper {
	font-family: var(--rs-font-family, inherit);
	color: var(--rs-text, #241A57);
	background: var(--rs-bg, #F8F8FA);
	background-image: var(--rs-bg-image, none);
	background-size: cover;
	background-position: center;
	border-radius: 18px;
	padding: 28px;
	box-sizing: border-box;
	max-width: 100%;
	overflow-x: hidden;
}

.rs-result-wrapper * { box-sizing: border-box; }

.rs-result-header {
	display: flex;
	gap: 32px;
	align-items: flex-start;
	max-width: 100%;
}

.rs-result-main { flex: 0 0 var(--rs-table-width, 65%); max-width: var(--rs-table-width, 65%); min-width: 0; }
.rs-result-sidebar { flex: 0 0 var(--rs-sidebar-width, 35%); max-width: var(--rs-sidebar-width, 35%); }

.rs-result-logo { margin-top: 0; margin-bottom: 16px; }
.rs-result-logo-left { text-align: left; }
.rs-result-logo-center { text-align: center; }
.rs-result-logo-right { text-align: right; }
.rs-result-logo img { display: inline-block; height: auto; }

.rs-result-title {
	font-size: var(--rs-title-size, 34px);
	font-weight: 800;
	line-height: 1.15;
	margin: 0 0 6px;
	color: var(--rs-primary, #241A57);
	letter-spacing: 0.2px;
}

.rs-result-subtitle {
	display: inline-block;
	background: var(--rs-secondary, #DE1B52);
	color: #fff;
	font-size: var(--rs-subtitle-size, 16px);
	font-weight: 700;
	padding: 8px 18px;
	border-radius: 999px;
	margin-bottom: 20px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

.rs-result-search { margin-bottom: 14px; }
.rs-result-search-input {
	width: 100%;
	max-width: 320px;
	padding: 10px 14px;
	border: var(--rs-border-width, 1px) solid var(--rs-border, #E3E2EA);
	border-radius: 8px;
	font-size: 14px;
}

.rs-result-table-outer {
	width: 100%;
	overflow-x: auto;
	border-radius: var(--rs-border-radius, 10px);
	border: var(--rs-border-width, 1px) solid var(--rs-border, #E3E2EA);
	box-shadow: 0 6px 18px rgba(36, 26, 87, 0.06);
}

.rs-result-table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--rs-table-size, 16px);
	background: #fff;
}

.rs-result-table thead th {
	background: var(--rs-th-bg, #241A57);
	color: var(--rs-th-text, #fff);
	font-size: var(--rs-header-size, 15px);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	text-align: left;
	padding: 14px 18px;
}

.rs-result-table td {
	height: var(--rs-row-height, 52px);
	padding: 10px 18px;
	border-bottom: var(--rs-border-width, 1px) solid var(--rs-border, #E3E2EA);
	vertical-align: middle;
	word-break: break-word;
}

.rs-result-row-alt td { background: var(--rs-alt-row, #F8F8FA); }

.rs-result-cell-name { color: var(--rs-name-text, #241A57); font-weight: 600; }

.rs-result-cell-score { width: 1%; white-space: nowrap; }
.rs-result-score-pill {
	display: inline-block;
	background: var(--rs-score-bg, #FDE7EC);
	color: var(--rs-score-text, #DE1B52);
	font-size: var(--rs-score-size, 18px);
	font-weight: 800;
	padding: 6px 16px;
	border-radius: 999px;
	min-width: 46px;
	text-align: center;
}

.rs-result-empty { padding: 20px; text-align: center; color: #888; }

.rs-result-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.rs-result-pagination button {
	border: 1px solid var(--rs-border, #E3E2EA);
	background: #fff;
	border-radius: 6px;
	padding: 6px 12px;
	cursor: pointer;
	font-size: 13px;
}
.rs-result-pagination button.is-active { background: var(--rs-primary, #241A57); color: #fff; border-color: var(--rs-primary, #241A57); }
.rs-result-pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

.rs-result-congrats {
	font-size: var(--rs-congrats-size, 30px);
	font-weight: var(--rs-congrats-weight, 700);
	color: var(--rs-congrats-color, #241A57);
	text-align: var(--rs-congrats-align, center);
	text-transform: var(--rs-congrats-transform, none);
	letter-spacing: var(--rs-congrats-spacing, 0);
	margin-bottom: 18px;
	animation: rs-result-fade-in 0.5s ease both;
}

.rs-result-illustration { text-align: center; margin-bottom: 20px; }
.rs-result-illustration img, .rs-result-illustration-svg { max-width: 100%; height: auto; }

.rs-result-buttons { display: flex; flex-direction: column; gap: 10px; }

.rs-result-button {
	display: flex;
	align-items: center;
	justify-content: center;
	height: var(--rs-btn-height, 46px);
	background: var(--rs-btn-bg, #DE1B52);
	color: var(--rs-btn-text, #fff);
	border-radius: var(--rs-btn-radius, 8px);
	text-decoration: none;
	font-weight: 700;
	font-size: 15px;
	transition: background-color 0.2s ease, transform 0.15s ease;
}
.rs-result-button:hover, .rs-result-button:focus {
	background: var(--rs-btn-hover, #241A57);
	color: #fff;
	transform: translateY(-1px);
}

.rs-result-error { color: #a12b2b; font-weight: 600; }

@keyframes rs-result-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.rs-result-congrats, .rs-result-button { animation: none; transition: none; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 782px) {
	.rs-result-header { flex-direction: column; }
	.rs-result-header.rs-result-layout-sidebar-first { flex-direction: column-reverse; }
	.rs-result-main, .rs-result-sidebar { flex: 1 1 100%; max-width: 100%; }
	.rs-result-title { font-size: calc(var(--rs-title-size, 34px) * 0.75); }
	.rs-result-wrapper { padding: 18px; }
	.rs-result-buttons { flex-direction: row; flex-wrap: wrap; }
	.rs-result-button { flex: 1 1 auto; }
}
