/**
 * Draw results / winners page.
 */

body.hostyler-raffles-results-page .site-main--winners {
	padding-block: 40px 72px;
}

/* Hero */
.results-page__hero {
	margin-bottom: 28px;
	padding: 32px;
	text-align: center;
	background: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
}

.results-page__eyebrow {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-gold);
}

.results-page__title {
	margin: 0 0 10px;
	font-family: var(--font-serif);
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 400;
	line-height: 1.1;
	color: var(--color-text-primary);
}

.results-page__lead {
	max-width: 640px;
	margin: 0 auto;
	font-size: 15px;
	line-height: 1.6;
	color: var(--color-text-secondary);
}

/* Tabs */
.results-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 20px;
	padding: 4px;
	background: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
}

.results-tabs__tab {
	flex: 1 1 auto;
	min-width: 120px;
	margin: 0;
	padding: 11px 14px;
	background: transparent;
	border: none;
	border-radius: var(--radius-sm);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--color-text-muted);
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.results-tabs__tab:hover {
	color: var(--color-text-primary);
}

.results-tabs__tab.is-active {
	background: var(--color-gold-muted);
	color: var(--color-gold);
}

/* Panels */
.results-panels {
	display: block;
}

.results-panel {
	display: none !important;
}

.results-panel.is-active {
	display: block !important;
}

.results-panel__head {
	margin-bottom: 16px;
}

.results-panel__title {
	margin: 0 0 6px;
	font-family: var(--font-sans);
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--color-text-primary);
}

.results-panel__text {
	margin: 0;
	font-size: 14px;
	color: var(--color-text-muted);
}

.results-panel__content {
	padding: 24px;
	background: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	min-height: 120px;
	/* Contain plugin shortcode floats so tall lists don't collapse the panel. */
	display: flow-root;
	overflow: auto;
}

/* Plugin frontend.css floats these wrappers — breaks panel height and overlaps footer. */
.hostyler-raffles-results-page .lty-lottery-instant-winners-by-date-wrapper,
.hostyler-raffles-results-page .lty-lottery-instant-winners-by-date-inner-wrapper,
.hostyler-raffles-results-page .lty-lottery-winners-by-date-wrapper,
.hostyler-raffles-results-page .lty-lottery-winners-by-date-inner-wrapper {
	float: none !important;
	width: 100%;
}

.hostyler-raffles-results-page .lty-lottery-instant-winners-by-date-footer,
.hostyler-raffles-results-page .lty-lottery-winners-by-date-footer {
	float: none !important;
	clear: both;
	width: 100%;
}

/* All winners table */
.hostyler-raffles-results-page .results-table-wrap {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.hostyler-raffles-results-page .results-table__heading {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 1rem;
	font-weight: 700;
	color: var(--color-text-primary);
}

.hostyler-raffles-results-page .results-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: var(--radius-md);
}

.hostyler-raffles-results-page .results-table,
.hostyler-raffles-results-page .lty-lottery-winners-list-table {
	width: 100%;
	min-width: 720px;
	border-collapse: separate;
	border-spacing: 0;
	background: var(--color-bg-elevated);
	color: var(--color-text-primary);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	overflow: hidden;
}

.hostyler-raffles-results-page .lty-lottery-winners-list-table > thead > h2 {
	display: none;
}

.hostyler-raffles-results-page .results-table thead,
.hostyler-raffles-results-page .lty-lottery-winners-list-table thead {
	background: var(--color-bg-elevated) !important;
}

.hostyler-raffles-results-page .results-table thead th,
.hostyler-raffles-results-page .lty-lottery-winners-list-table thead th {
	padding: 12px 14px;
	text-align: left;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--color-text-muted) !important;
	border-bottom: 1px solid var(--color-border) !important;
	background: transparent !important;
}

.hostyler-raffles-results-page .results-table tbody td,
.hostyler-raffles-results-page .lty-lottery-winners-list-table tbody td {
	padding: 12px 14px;
	font-size: 14px;
	color: var(--color-text-secondary);
	border-bottom: 1px solid var(--color-border);
	vertical-align: middle;
	white-space: nowrap;
}

.hostyler-raffles-results-page .results-table tbody tr:nth-child(2n) td,
.hostyler-raffles-results-page .lty-lottery-winners-list-table tbody tr:nth-child(2n) td {
	background: rgba(255, 255, 255, 0.02);
}

.hostyler-raffles-results-page .results-table tbody tr:hover td,
.hostyler-raffles-results-page .lty-lottery-winners-list-table tbody tr:hover td {
	background: rgba(var(--color-gold-rgb), 0.05);
}

.hostyler-raffles-results-page .results-table tbody td a,
.hostyler-raffles-results-page .lty-lottery-winners-list-table tbody td a {
	color: var(--color-gold);
	text-decoration: none;
	font-weight: 600;
}

.hostyler-raffles-results-page .results-table tbody td a:hover,
.hostyler-raffles-results-page .lty-lottery-winners-list-table tbody td a:hover {
	text-decoration: underline;
}

.hostyler-raffles-results-page .results-ticket-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	padding: 4px 10px;
	border-radius: var(--radius-sm);
	font-weight: 700;
	color: var(--color-gold);
	background: rgba(var(--color-gold-rgb), 0.12);
	border: 1px solid var(--color-border-gold);
}

/* Winners / instant wins by date cards */
.hostyler-raffles-results-page .lty-lottery-winners-by-date-wrapper,
.hostyler-raffles-results-page .lty-lottery-instant-winners-by-date-wrapper {
	color: var(--color-text-primary);
}

.hostyler-raffles-results-page .results-win-day {
	margin-bottom: 16px;
	padding: 16px 18px;
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
}

.hostyler-raffles-results-page .results-win-day:last-child {
	margin-bottom: 0;
}

.hostyler-raffles-results-page .results-win-day--instant {
	border-color: rgba(var(--color-gold-rgb), 0.2);
}

.hostyler-raffles-results-page .results-win-day__date {
	margin: 0 0 12px;
	padding-bottom: 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-gold);
	border-bottom: 1px solid var(--color-border);
}

.hostyler-raffles-results-page .results-win-day__list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hostyler-raffles-results-page .results-win-card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 16px;
	padding: 12px 14px;
	background: var(--color-bg-secondary);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
}

.hostyler-raffles-results-page .results-win-card--instant {
	background: linear-gradient(135deg, rgba(var(--color-gold-rgb), 0.08) 0%, rgba(var(--color-gold-rgb), 0.02) 100%);
}

.hostyler-raffles-results-page .results-win-card__main {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.hostyler-raffles-results-page .results-win-card__prize {
	font-size: 14px;
	font-weight: 700;
	color: var(--color-text-primary);
}

.hostyler-raffles-results-page .results-win-card__winner {
	font-size: 13px;
	color: var(--color-text-muted);
}

.hostyler-raffles-results-page .results-win-card__ticket {
	flex-shrink: 0;
	padding: 4px 10px;
	border-radius: var(--radius-sm);
	font-size: 12px;
	font-weight: 700;
	color: var(--color-gold);
	background: rgba(var(--color-gold-rgb), 0.12);
	border: 1px solid var(--color-border-gold);
}

/* Legacy plugin wrappers (fallback) */
.hostyler-raffles-results-page .lty-lottery-winners-by-date-content {
	margin-bottom: 16px;
	padding: 16px 18px;
	background: var(--color-bg-elevated);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
}

.hostyler-raffles-results-page .lty-lottery-winners-date,
.hostyler-raffles-results-page .lty-lottery-instant-winners-date {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-gold);
}

.hostyler-raffles-results-page .lty-lottery-winners-by-date-content p,
.hostyler-raffles-results-page .lty-lottery-instant-winners-by-date-content p {
	margin: 0 0 8px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--color-text-secondary);
}

.hostyler-raffles-results-page .lty-lottery-winners-by-date-content b {
	color: var(--color-text-primary);
	font-weight: 600;
}

/* Pagination */
.hostyler-raffles-results-page .lty-frontend-table tfoot td,
.hostyler-raffles-results-page .lty-lottery-winners-by-date-footer,
.hostyler-raffles-results-page .lty-lottery-instant-winners-by-date-footer {
	padding-top: 16px;
	border-top: 1px solid var(--color-border);
}

.hostyler-raffles-results-page .lty-frontend-table tfoot nav ul,
.hostyler-raffles-results-page .lty-lottery-winners-by-date-footer nav ul,
.hostyler-raffles-results-page .lty-lottery-instant-winners-by-date-footer nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
	justify-content: center;
}

.hostyler-raffles-results-page .lty-frontend-table tfoot nav ul li a,
.hostyler-raffles-results-page .lty-frontend-table tfoot nav ul li span,
.hostyler-raffles-results-page .lty-lottery-winners-by-date-footer nav ul li a,
.hostyler-raffles-results-page .lty-lottery-winners-by-date-footer nav ul li span,
.hostyler-raffles-results-page .lty-lottery-instant-winners-by-date-footer nav ul li a,
.hostyler-raffles-results-page .lty-lottery-instant-winners-by-date-footer nav ul li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	min-height: 36px;
	padding: 0 10px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	font-size: 13px;
	font-weight: 600;
	color: var(--color-text-secondary);
	text-decoration: none;
	background: var(--color-bg-elevated);
}

.hostyler-raffles-results-page .lty-frontend-table tfoot nav ul li a:hover,
.hostyler-raffles-results-page .lty-lottery-winners-by-date-footer nav ul li a:hover,
.hostyler-raffles-results-page .lty-lottery-instant-winners-by-date-footer nav ul li a:hover {
	border-color: var(--color-border-gold);
	color: var(--color-gold);
}

.hostyler-raffles-results-page .lty-frontend-table tfoot nav ul li .current,
.hostyler-raffles-results-page .lty-lottery-winners-by-date-footer nav ul li .current,
.hostyler-raffles-results-page .lty-lottery-instant-winners-by-date-footer nav ul li .current {
	border-color: var(--color-border-gold);
	background: rgba(var(--color-gold-rgb), 0.12);
	color: var(--color-gold);
}

/* Tablet + mobile */
@media (max-width: 900px) {
	.results-tabs__tab {
		flex: 1 1 calc(33.333% - 6px);
		min-width: 0;
		padding: 10px 8px;
		font-size: 13px;
	}

	.results-panel__content {
		padding: 18px 16px;
	}
}

@media (max-width: 640px) {
	.results-page__hero {
		padding: 24px 20px;
	}

	.results-tabs__tab {
		flex: 1 1 100%;
	}

	.hostyler-raffles-results-page .results-win-card {
		flex-direction: column;
		align-items: flex-start;
	}
}
