/**
 * Historical Powerball draws ([hlp_historical_draws]).
 * Breaks out of TT5 constrained layout (contentSize ~645px).
 */

body.hlp-has-historical-draws {
	overflow-x: clip;
}

body.hlp-has-historical-draws .wp-site-blocks {
	overflow-x: clip;
	max-width: 100%;
}

body.hlp-has-historical-draws .entry-header,
body.hlp-has-historical-draws .page-header,
body.hlp-has-historical-draws .wp-block-post-title,
body.hlp-has-historical-draws h1.wp-block-post-title {
	display: none !important;
}

body.hlp-has-historical-draws .wp-site-blocks main.wp-block-group {
	margin-top: clamp(0.5rem, 1.5vw, 1rem) !important;
	max-width: none !important;
	width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

body.hlp-has-historical-draws .wp-site-blocks main.wp-block-group > .wp-block-group,
body.hlp-has-historical-draws .wp-site-blocks main.wp-block-group > .wp-block-group.alignfull,
body.hlp-has-historical-draws .wp-site-blocks main.wp-block-group > .wp-block-group.alignfull:first-child {
	padding-top: clamp(0.35rem, 1vw, 0.75rem) !important;
	padding-bottom: clamp(1.5rem, 3vw, 2.5rem) !important;
	max-width: none !important;
	width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

body.hlp-has-historical-draws .wp-block-post-content,
body.hlp-has-historical-draws .entry-content,
body.hlp-has-historical-draws .wp-block-post-content.is-layout-constrained,
body.hlp-has-historical-draws .wp-block-group.is-layout-constrained,
body.hlp-has-historical-draws main.wp-block-group.is-layout-constrained {
	max-width: none !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

body.hlp-has-historical-draws .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	max-width: none !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body.hlp-has-historical-draws .wp-block-post-content {
	padding-left: clamp(0.75rem, 2.5vw, 1.5rem) !important;
	padding-right: clamp(0.75rem, 2.5vw, 1.5rem) !important;
	box-sizing: border-box;
	max-width: 100% !important;
	overflow-x: clip;
}

.hlp-historical-draws {
	--hlp-hist-max: min(90rem, 100%);
	display: block;
	width: 100%;
	max-width: var(--hlp-hist-max);
	margin-left: auto;
	margin-right: auto;
	padding: clamp(1.25rem, 2.5vw, 2rem) clamp(1rem, 2.5vw, 1.75rem) clamp(1.5rem, 4vw, 2.25rem);
	box-sizing: border-box;
	background: rgba(12, 12, 14, 0.95);
	border: 1px solid rgba(212, 175, 55, 0.35);
	border-radius: 14px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
	color: rgba(232, 224, 208, 0.88);
	font-family: "DM Sans", var(--flock-body, system-ui, sans-serif);
	overflow: hidden;
	min-width: 0;
}

.hlp-historical-draws__head {
	text-align: center;
	padding-bottom: 1.25rem;
	margin-bottom: 1.25rem;
	border-bottom: 1px solid rgba(212, 175, 55, 0.22);
}

.hlp-historical-draws__eyebrow {
	margin: 0 0 0.35rem;
	font-family: var(--flock-display, "Orbitron", system-ui, sans-serif);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--flock-gold, #d4af37);
}

.hlp-historical-draws__title {
	margin: 0;
	font-family: var(--flock-display, "Orbitron", system-ui, sans-serif);
	font-size: clamp(1.25rem, 3.5vw, 1.75rem);
	font-weight: 700;
	color: var(--flock-gold-bright, #e8c547);
}

.hlp-historical-draws__intro,
.hlp-historical-draws__meta {
	margin: 0.65rem 0 0;
	font-size: 0.9rem;
	color: rgba(232, 224, 208, 0.7);
	line-height: 1.55;
}

.hlp-historical-draws__meta {
	font-size: 0.8rem;
	color: rgba(232, 224, 208, 0.5);
}

.hlp-historical-draws__tools {
	display: grid;
	gap: 1.25rem;
	margin-bottom: 1.25rem;
	min-width: 0;
}

.hlp-historical-draws__tools > * {
	min-width: 0;
}

@media (min-width: 900px) {
	.hlp-historical-draws__tools {
		grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
		align-items: start;
		gap: 1.5rem;
	}
}

.hlp-historical-draws__check,
.hlp-historical-draws__filters {
	padding: 1rem 1.1rem;
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(212, 175, 55, 0.28);
	border-radius: 12px;
	box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.06);
}

.hlp-historical-draws__tools-title {
	margin: 0 0 0.35rem;
	font-family: var(--flock-display, "Orbitron", system-ui, sans-serif);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--flock-gold-bright, #e8c547);
}

.hlp-historical-draws__tools-hint {
	margin: 0 0 0.75rem;
	font-size: 0.82rem;
	color: rgba(232, 224, 208, 0.55);
}

.hlp-historical-draws__combo-search-row {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0.5rem;
	margin-bottom: 0.45rem;
	width: 100%;
}

.hlp-historical-draws__combo-search {
	flex: 1 1 auto;
	display: block;
	width: 100%;
	min-width: 0;
	height: 2.75rem;
	min-height: 2.75rem;
	max-height: 2.75rem;
	padding: 0 0.75rem;
	font-family: inherit;
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.04em;
	background: rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(212, 175, 55, 0.35);
	border-radius: 8px;
	color: #e8e0d0;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hlp-historical-draws__combo-search:focus {
	outline: none;
	border-color: rgba(212, 175, 55, 0.65);
	box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

.hlp-historical-draws__combo-search-row .hlp-historical-draws__check-btn {
	flex: 0 0 auto;
	white-space: nowrap;
}

.hlp-historical-draws__combo-hint {
	margin: 0;
	font-size: 0.76rem;
	color: rgba(232, 224, 208, 0.5);
	line-height: 1.45;
}

.hlp-historical-draws__check-form .hlp-historical-draws__filter-label {
	margin-bottom: 0.3rem;
}

.hlp-historical-draws__check-btn {
	padding: 0.55rem 1rem;
	font-family: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	color: #1a1208;
	background: linear-gradient(180deg, var(--flock-gold-bright, #e8c547), var(--flock-gold, #d4af37));
	border: none;
	border-radius: 8px;
	cursor: pointer;
}

.hlp-historical-draws__check-result {
	margin-top: 0.75rem;
	padding: 0.65rem 0.75rem;
	border-radius: 8px;
	font-size: 0.85rem;
	line-height: 1.45;
}

.hlp-historical-draws__check-result-text {
	margin: 0 0 0.55rem;
}

.hlp-historical-draws__check-result .hlp-historical-draws__balls {
	margin-top: 0.15rem;
}

.hlp-historical-draws__check-hit-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem 0.65rem;
	margin-top: 0.55rem;
	padding-top: 0.55rem;
	border-top: 1px solid rgba(212, 175, 55, 0.12);
}

.hlp-historical-draws__check-hit-row:first-of-type {
	margin-top: 0.35rem;
	padding-top: 0;
	border-top: none;
}

.hlp-historical-draws__check-hit-date {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--flock-gold-bright, #e8c547);
	min-width: 6.5rem;
}

.hlp-historical-draws__check-hit-more {
	margin: 0.55rem 0 0;
	font-size: 0.76rem;
	color: rgba(232, 224, 208, 0.55);
}

.hlp-historical-draws__check-result--pending {
	background: rgba(212, 175, 55, 0.1);
	color: rgba(232, 224, 208, 0.7);
}

.hlp-historical-draws__check-result--ok {
	background: rgba(40, 120, 80, 0.25);
	border: 1px solid rgba(80, 180, 120, 0.35);
	color: #b8e8cc;
}

.hlp-historical-draws__check-result--hit {
	background: rgba(140, 40, 40, 0.25);
	border: 1px solid rgba(200, 80, 80, 0.35);
	color: #f0b8b8;
}

.hlp-historical-draws__check-result--warn {
	background: rgba(140, 100, 20, 0.2);
	border: 1px solid rgba(212, 175, 55, 0.35);
	color: #e8d8a8;
}

.hlp-historical-draws__filter-label {
	display: block;
	margin: 0 0 0.35rem;
	font-size: 0.78rem;
	font-weight: 600;
	color: rgba(232, 224, 208, 0.65);
}

.hlp-historical-draws__filter-label + .hlp-historical-draws__year,
.hlp-historical-draws__filter-label + .hlp-historical-draws__search {
	margin-bottom: 0.85rem;
}

.hlp-historical-draws__year,
.hlp-historical-draws__search {
	width: 100%;
	padding: 0.55rem 0.75rem;
	font-family: inherit;
	font-size: 0.88rem;
	background: rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(212, 175, 55, 0.28);
	border-radius: 8px;
	color: #e8e0d0;
}

.hlp-historical-draws__list-wrap {
	overflow-x: hidden;
	max-width: 100%;
	border: 1px solid rgba(212, 175, 55, 0.18);
	border-radius: 12px;
}

.hlp-historical-draws__list {
	width: 100%;
	max-width: 100%;
	font-size: 0.88rem;
}

.hlp-historical-draws__list-head {
	background: rgba(212, 175, 55, 0.08);
	border-bottom: 1px solid rgba(212, 175, 55, 0.22);
}

.hlp-historical-draws__list-row--head,
.hlp-historical-draws__list-body > .hlp-historical-draws__list-row:not(.hlp-historical-draws__list-row--status) {
	display: grid;
	grid-template-columns: minmax(7rem, 1.1fr) minmax(0, 3fr) minmax(3.5rem, 0.9fr) minmax(2.5rem, 0.55fr);
	gap: 0.5rem;
	align-items: center;
}

.hlp-historical-draws__list-row--head {
	padding: 0.55rem 0.75rem;
}

.hlp-historical-draws__list-row--head .hlp-historical-draws__col {
	font-family: var(--flock-display, "Orbitron", system-ui, sans-serif);
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--flock-gold, #d4af37);
}

.hlp-historical-draws__list-row--head .hlp-historical-draws__col--mult {
	text-align: center;
}

.hlp-historical-draws__list-body > .hlp-historical-draws__list-row:not(.hlp-historical-draws__list-row--status) {
	padding: 0.55rem 0.75rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hlp-historical-draws__list-body > .hlp-historical-draws__list-row:not(.hlp-historical-draws__list-row--status):hover {
	background: rgba(212, 175, 55, 0.04);
}

.hlp-historical-draws__col--date {
	white-space: nowrap;
	color: rgba(232, 224, 208, 0.75);
	min-width: 0;
}

.hlp-historical-draws__col--winning {
	min-width: 0;
}

.hlp-historical-draws__col--mult {
	text-align: center;
}

.hlp-historical-draws__balls {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0.3rem;
	min-width: 0;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.hlp-historical-draws__ball {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-width: 2rem;
	height: 2rem;
	padding: 0 0.35rem;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(212, 175, 55, 0.25);
	color: #e8e0d0;
}

.hlp-historical-draws__ball--pb {
	background: linear-gradient(180deg, rgba(232, 197, 71, 0.35), rgba(212, 175, 55, 0.2));
	border-color: rgba(232, 197, 71, 0.5);
	color: var(--flock-gold-bright, #e8c547);
}

.hlp-historical-draws__status {
	text-align: center;
	padding: 1.5rem !important;
	color: rgba(232, 224, 208, 0.55);
}

.hlp-historical-draws__pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin-top: 1rem;
}

.hlp-historical-draws__page-btn {
	padding: 0.45rem 0.9rem;
	font-family: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--flock-gold-bright, #e8c547);
	background: transparent;
	border: 1px solid rgba(212, 175, 55, 0.35);
	border-radius: 8px;
	cursor: pointer;
}

.hlp-historical-draws__page-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.hlp-historical-draws__page-label {
	font-size: 0.82rem;
	color: rgba(232, 224, 208, 0.6);
}

@media (min-width: 1200px) {
	.hlp-historical-draws {
		--hlp-hist-max: min(92rem, 100%);
	}
}

@media (max-width: 899px) {
	body.hlp-has-historical-draws .wp-block-post-content {
		padding-left: clamp(0.5rem, 2vw, 0.75rem) !important;
		padding-right: clamp(0.5rem, 2vw, 0.75rem) !important;
	}

	.hlp-historical-draws {
		--hlp-hist-max: 100%;
		border-radius: 12px;
		padding: 0.85rem 0.65rem 1rem;
		font-size: 0.78rem;
	}

	.hlp-historical-draws__eyebrow {
		font-size: 0.58rem;
		letter-spacing: 0.1em;
	}

	.hlp-historical-draws__title {
		font-size: clamp(0.95rem, 4.5vw, 1.15rem);
	}

	.hlp-historical-draws__intro,
	.hlp-historical-draws__meta {
		font-size: 0.72rem;
		line-height: 1.45;
	}

	.hlp-historical-draws__meta {
		font-size: 0.66rem;
	}

	.hlp-historical-draws__tools {
		grid-template-columns: 1fr;
		gap: 0.75rem;
		margin-bottom: 0.85rem;
	}

	.hlp-historical-draws__check,
	.hlp-historical-draws__filters {
		padding: 0.75rem 0.8rem;
	}

	.hlp-historical-draws__tools-title {
		font-size: 0.72rem;
	}

	.hlp-historical-draws__tools-hint {
		font-size: 0.68rem;
		margin-bottom: 0.55rem;
	}

	.hlp-historical-draws__filter-label {
		font-size: 0.66rem;
	}

	.hlp-historical-draws__year,
	.hlp-historical-draws__search {
		font-size: 0.75rem;
		padding: 0.45rem 0.6rem;
	}

	.hlp-historical-draws__combo-search-row {
		flex-direction: column;
		flex-wrap: wrap;
		gap: 0.45rem;
	}

	.hlp-historical-draws__combo-search-row .hlp-historical-draws__check-btn {
		width: 100%;
		min-height: 2.5rem;
	}

	.hlp-historical-draws__combo-search {
		flex: none;
		width: 100%;
		max-width: 100%;
		height: 2.5rem;
		min-height: 2.5rem;
		max-height: 2.5rem;
		padding: 0 0.65rem;
		font-size: 16px;
	}

	.hlp-historical-draws__combo-hint {
		font-size: 0.66rem;
		margin-top: 0.45rem;
	}

	.hlp-historical-draws__check-btn {
		width: 100%;
		font-size: 0.8rem;
		padding: 0.55rem 0.75rem;
	}

	.hlp-historical-draws__check-result {
		font-size: 0.72rem;
		padding: 0.55rem 0.65rem;
	}

	.hlp-historical-draws__check-hit-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.35rem;
	}

	.hlp-historical-draws__check-hit-date {
		min-width: 0;
		font-size: 0.74rem;
	}

	.hlp-historical-draws__check-result .hlp-historical-draws__balls {
		max-width: 100%;
	}

	.hlp-historical-draws__list-wrap {
		border: none;
		background: transparent;
		border-radius: 0;
	}

	.hlp-historical-draws__list {
		font-size: 0.72rem;
	}

	.hlp-historical-draws__list-head {
		display: none;
	}

	.hlp-historical-draws__list-body > .hlp-historical-draws__list-row:not(.hlp-historical-draws__list-row--status) {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			"date date"
			"winning winning"
			"pb mult";
		gap: 0.35rem 0.55rem;
		margin-bottom: 0.55rem;
		padding: 0.65rem 0.7rem;
		background: rgba(0, 0, 0, 0.35);
		border: 1px solid rgba(212, 175, 55, 0.22);
		border-radius: 8px;
	}

	.hlp-historical-draws__list-body > .hlp-historical-draws__list-row:not(.hlp-historical-draws__list-row--status):hover {
		background: rgba(0, 0, 0, 0.4);
	}

	.hlp-historical-draws__list-body > .hlp-historical-draws__list-row:not(.hlp-historical-draws__list-row--status) .hlp-historical-draws__col {
		display: block;
		min-width: 0;
		text-align: left;
	}

	.hlp-historical-draws__list-body > .hlp-historical-draws__list-row:not(.hlp-historical-draws__list-row--status) .hlp-historical-draws__col::before {
		display: block;
		margin-bottom: 0.2rem;
		font-family: var(--flock-display, "Orbitron", system-ui, sans-serif);
		font-size: 0.5rem;
		font-weight: 700;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		color: var(--flock-gold, #d4af37);
		content: attr(data-label);
	}

	.hlp-historical-draws__col--date {
		grid-area: date;
		padding-bottom: 0.35rem;
		margin-bottom: 0.1rem;
		border-bottom: 1px solid rgba(212, 175, 55, 0.15);
		font-size: 0.78rem;
		font-weight: 600;
		color: var(--flock-gold-bright, #e8c547);
		white-space: normal;
	}

	.hlp-historical-draws__col--date::before {
		display: none !important;
	}

	.hlp-historical-draws__col--winning {
		grid-area: winning;
	}

	.hlp-historical-draws__col--pb {
		grid-area: pb;
	}

	.hlp-historical-draws__col--mult {
		grid-area: mult;
		text-align: left;
	}

	.hlp-historical-draws__list-row--status {
		display: block;
		padding: 1rem 0.5rem;
		border: none;
		background: transparent;
	}

	.hlp-historical-draws__status {
		font-size: 0.72rem;
		padding: 1rem 0.5rem !important;
	}

	.hlp-historical-draws__balls,
	td.hlp-historical-draws__balls {
		flex-wrap: nowrap !important;
		flex-direction: row !important;
		justify-content: flex-start;
		gap: 0.2rem;
		overflow-x: auto;
	}

	.hlp-historical-draws__ball {
		flex: 0 0 auto;
		min-width: 1.35rem;
		width: 1.35rem;
		height: 1.35rem;
		padding: 0;
		font-size: 0.55rem;
		line-height: 1;
	}

	/* Legacy table markup fallback */
	.hlp-historical-draws__table thead {
		display: none !important;
	}

	.hlp-historical-draws__table {
		display: block !important;
		width: 100% !important;
		table-layout: auto !important;
	}

	.hlp-historical-draws__table tbody {
		display: block !important;
	}

	.hlp-historical-draws__table tbody tr:not(:has(.hlp-historical-draws__status)) {
		display: grid !important;
		grid-template-columns: 1fr 1fr !important;
		grid-template-areas:
			"date date"
			"winning winning"
			"pb mult" !important;
		gap: 0.35rem 0.55rem;
		margin-bottom: 0.55rem;
		padding: 0.65rem 0.7rem;
		background: rgba(0, 0, 0, 0.35);
		border: 1px solid rgba(212, 175, 55, 0.22);
		border-radius: 8px;
	}

	.hlp-historical-draws__table tbody td {
		display: block !important;
		width: 100% !important;
		overflow: visible !important;
		border: none !important;
		padding: 0.2rem 0 !important;
	}

	.hlp-historical-draws__table .hlp-historical-draws__date {
		grid-area: date;
		white-space: normal !important;
		font-size: 0.78rem;
	}

	.hlp-historical-draws__table .hlp-historical-draws__balls-cell {
		grid-area: winning;
	}

	.hlp-historical-draws__table .hlp-historical-draws__pb-cell {
		grid-area: pb;
	}

	.hlp-historical-draws__table .hlp-historical-draws__mult-cell {
		grid-area: mult;
	}

	.hlp-historical-draws__page-btn {
		font-size: 0.68rem;
		padding: 0.35rem 0.65rem;
	}

	.hlp-historical-draws__page-label {
		font-size: 0.68rem;
	}

	.hlp-historical-draws__pager {
		flex-wrap: wrap;
		gap: 0.5rem;
		margin-top: 0.75rem;
	}
}
