/*
 * Redesign styles used by the stat calculator body, copied from css/style-NEW.css so
 * stat-calculator2.php can launch before the site-wide redesign. Loaded only by that page,
 * before its own stat-calculator2.css.
 *
 * When style-NEW.css replaces style.css: delete this file and its <link> in stat-calculator2.php.
 * Nothing here targets the site header or footer.
 */

:root {
  --font-sans: "Hanken Grotesk", Helvetica, sans-serif;
  --dx-surface: rgba(255, 255, 255, 0.055);
  --dx-surface-hover: rgba(255, 255, 255, 0.035);
  --dx-border: rgba(255, 255, 255, 0.09);
  --dx-border-subtle: rgba(255, 255, 255, 0.07);
  --dx-inset-highlight: rgba(255, 255, 255, 0.07);
  --dx-overlay: rgba(0, 0, 0, 0.14);
  --dx-text-faint: rgba(233, 243, 241, 0.45);
}

/* Lightboxes (the header and footer don't use these classes) */
.lightbox,
.lightbox-fancy {
	padding: 22px 24px;
	border-radius: 16px;
	background: var(--dx-surface);
	border: 1px solid var(--dx-border);
	box-shadow: var(--dx-inset-highlight) 0 1px 0 inset;
}
.lightbox-fancy {
	margin-bottom: 18px;
}
/* Tinted lightbox: set --lb-tint to any color (defaults to soft violet) */
.lightbox-fancy--tint {
	--lb-tint: rgb(200, 190, 240);
	border-radius: 20px;
	background: linear-gradient(
		color-mix(in srgb, var(--lb-tint) 11%, transparent) 0%,
		color-mix(in srgb, var(--lb-tint) 3%, transparent) 100%
	);
	border: 1px solid color-mix(in srgb, color-mix(in srgb, var(--lb-tint), #fff 25%) 26%, transparent);
	box-shadow: rgba(0, 0, 0, 0.12) 0 7px 22px;
}

/* Page hero: big title with an accent span, a lede, and optional actions */
.dx-page-hero {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	/* Padding, not margin, on top: a top margin collapses through #main/#body and exposes the body background */
	margin: 0 0 3em;
	padding-top: 3em;
}
.dx-page-hero__title {
	margin: 0;
	padding: 0;
	font-size: clamp(34px, 6vw, 54px);
	font-weight: 600;
	letter-spacing: -0.035em;
	line-height: 1;
}
.dx-page-hero__accent {
	color: rgb(214, 207, 245);
}
.dx-page-hero__lede {
	margin: 0;
	max-width: 720px;
	font-size: 18px;
	line-height: 1.5;
	font-weight: 300;
	color: rgb(214, 226, 240);
	text-wrap: pretty;
}
/* Inline text action inside the lede, e.g. "How it works" */
.dx-page-hero__link {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	padding: 0;
	margin-left: 0.25em;
	border: none;
	background: none;
	font: inherit;
	font-weight: 500;
	color: rgb(214, 207, 245);
	cursor: pointer;
	white-space: nowrap;
	vertical-align: baseline;
}
.dx-page-hero__link span {
	text-decoration: underline;
	text-underline-offset: 0.2em;
	text-decoration-color: rgba(214, 207, 245, 0.45);
}
.dx-page-hero__link:hover span {
	text-decoration-color: currentColor;
}
.dx-page-hero__link:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
	border-radius: 3px;
}
.dx-page-hero__link i {
	font-size: 1em;
	line-height: 1;
}
.dx-page-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* Generic data table */
.dodo-table-wrap {
	border-radius: 16px;
	background: var(--dx-surface);
	border: 1px solid var(--dx-border);
	box-shadow: var(--dx-inset-highlight) 0 1px 0 inset;
	overflow: auto;
	margin-bottom: 18px;
}
.dodo-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 640px;
}
.dodo-table--fluid {
	min-width: 0;
}
.dodo-table th,
.dodo-table td {
	padding: 11px 14px;
	text-align: left;
	vertical-align: middle;
	border-bottom: 1px solid var(--dx-surface);
}
.dodo-table th:first-child,
.dodo-table td:first-child {
	padding-left: 24px;
}
.dodo-table th:last-child,
.dodo-table td:last-child {
	padding-right: 24px;
}
.dodo-table thead th {
	padding-top: 14px;
	padding-bottom: 14px;
	background: var(--dx-overlay);
	border-bottom: 1px solid var(--dx-border-subtle);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--dx-text-faint);
	white-space: nowrap;
}
.dodo-table tbody tr:last-child td {
	border-bottom: none;
}
.dodo-table--hover tbody tr:hover {
	background: var(--dx-surface-hover) !important;
}
.dodo-table-stat {
	display: flex;
	align-items: center;
	gap: 11px;
}
.dodo-table-stat-label {
	font-size: 14.5px;
	font-weight: 600;
}
.dodo-table--base-stats {
	table-layout: fixed;
}
.dodo-table--base-stats .base-stats-col-stat { width: 18%; }
.dodo-table--base-stats .base-stats-col-base { width: 17%; }
.dodo-table--base-stats .base-stats-col-wild { width: 22%; }
.dodo-table--base-stats .base-stats-col-tamed { width: 17%; }
.dodo-table--base-stats .base-stats-col-additive { width: 13%; }
.dodo-table--base-stats .base-stats-col-mult { width: 13%; }
.dodo-table--base-stats thead tr:first-child th[colspan] {
	padding-bottom: 4px;
	border-bottom: none;
}
.dodo-table--base-stats .dodo-table__subhead {
	padding-top: 6px;
	padding-bottom: 12px;
	font-size: 10px;
	letter-spacing: 0.1em;
}

/* Shared Dododex autocomplete (creatures / items) */
.dxAc {
  --dx-ac-bg: #fff;
  --dx-ac-text: #1a1a1a;
  --dx-ac-border: rgba(0, 0, 0, 0.16);
  --dx-ac-muted: rgba(0, 0, 0, 0.45);
  --dx-ac-active: rgba(0, 120, 90, 0.12);
  --dx-ac-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  --dx-ac-radius: 12px;
  --dx-ac-img-bg: rgba(0, 0, 0, 0.06);
  position: relative;
}
.dxAcInput {
  box-sizing: border-box;
}
.dxAcClear {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.8rem;
  height: 1.8rem;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.dxAcClear:hover {
  background: rgba(0, 0, 0, 0.14);
}
.dxAcResults {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0.35rem;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 80;
  background: var(--dx-ac-bg);
  color: var(--dx-ac-text);
  border: 1px solid var(--dx-ac-border);
  border-radius: var(--dx-ac-radius);
  box-shadow: var(--dx-ac-shadow);
  max-height: 18rem;
  overflow-y: auto;
}
.dxAcResults[hidden] {
  display: none;
}
.dxAcResult {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-size: 0.98rem;
}
.dxAcResult:hover,
.dxAcResult.isActive {
  background: var(--dx-ac-active);
}
.dxAcResultImg {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--dx-ac-img-bg);
  border-radius: 8px;
}
.dxAcResultImg--empty {
  display: block;
}
.dxAcResultLabel {
  flex: 1;
  min-width: 0;
}
.dxAcResultMatch {
  color: var(--dx-ac-muted);
  font-size: 0.9em;
}
.dxAcResultBadge {
  margin-left: auto;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dx-ac-muted);
  flex-shrink: 0;
}
