/*
 * ============================================================
 *  TNT | Yahtzee: Zilch Edition — Styles
 *  File:    zilchStyles.css
 *  Coder:   KLP
 *  Created: 2026-06-14
 *
 *  Violet / purple theme — visually distinct from the amber
 *  palette of the standard SPARK Edition.
 *  Requires CSS custom properties from tnt-base-styles.css.
 * ============================================================
 */

/* ── Design tokens for the Zilch Edition ─────────────────── */
:root {
	--zilch-primary:   #7C3AED;   /* violet 600  */
	--zilch-dark:      #4C1D95;   /* violet 900  */
	--zilch-mid:       #6D28D9;   /* violet 700  */
	--zilch-light:     #EDE9FE;   /* violet 100  */
	--zilch-accent:    #A78BFA;   /* violet 400  */
	--zilch-gold:      #fdedb0;   /* scorecard cell tint */
	--zilch-gold-border: #c4a8e0; /* scorecard border  */
}

body {
	background-color: #f5f3ff;   /* faint violet tint */
}

/* ── Content max-width ── */
#appContent {
	max-width: 600px;
}


/* ═══════════════════════════════════════════════════════════════
   GAME PAGE HEADER
═══════════════════════════════════════════════════════════════ */

#gamePageHeader {
	background: #1e1533;         /* deep violet-black */
	border-bottom: 3px solid var(--zilch-primary);
	color: white;
}

#gamePageHeader h1 { color: white; }

.game-tagline {
	font-style: italic;
	color: rgba(255,255,255,0.65);
	font-size: 0.88rem;
}

.zilch-badge {
	display: inline-block;
	font-size: 0.5rem;
	font-weight: 700;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	background: var(--zilch-primary);
	color: white;
	padding: 3px 8px;
	border-radius: 12px;
	vertical-align: middle;
	margin-left: 6px;
	line-height: 1.5;
}


/* ═══════════════════════════════════════════════════════════════
   DICE LAYOUT
═══════════════════════════════════════════════════════════════ */

div#diceLayout {
	background-color: white;
	border-radius: 12px;
	padding: 0.5rem 1rem 0.25rem 1rem;
	margin-bottom: 0.75rem;
	border: 1px solid #ddd6fe;
	box-shadow: 0 2px 8px rgba(109,40,217,0.08);
}

div#diceLayout table {
	width: 60%;
	max-width: 320px;
	margin: 0 auto;
}

div#diceLayout table img { width: 100%; height: auto; }

div#diceLayout input { margin-top: 0; }

div#diceLayout div#info {
	margin-top: 0;
	margin-bottom: 0;
	text-align: left;
}

div#diceLayout div#info p {
	margin-bottom: 1px;
	text-align: right;
	font-size: 0.82rem;
	color: #555;
}

div#diceLayout div#info p span {
	margin-left: 12px;
	font-weight: 700;
	color: var(--zilch-dark);
}


/* ═══════════════════════════════════════════════════════════════
   ROLL BUTTON
═══════════════════════════════════════════════════════════════ */

input#rollBtn.primaryBtn {
	padding: 5px 18px;
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s, transform 0.1s;
}

input#rollBtn.ready {
	background-color: var(--zilch-primary);
}

input#rollBtn.ready:hover {
	background-color: var(--zilch-mid);
	transform: translateY(-1px);
}

input#rollBtn.active  { background-color: #059669; }   /* emerald — go! */
input#rollBtn.inactive { background-color: #adb5bd; cursor: default; }


/* ═══════════════════════════════════════════════════════════════
   MESSAGE PARAGRAPH
═══════════════════════════════════════════════════════════════ */

p#msgPara {
	margin: 0.2rem auto 0.1rem auto;
	font-style: italic;
	text-align: center;
	font-size: 0.88rem;
	clear: both;
}

p.encourage { color: #059669; font-weight: 600; }
p.warn      { color: #DC2626; font-weight: 700; }


/* ═══════════════════════════════════════════════════════════════
   SCORECARD
═══════════════════════════════════════════════════════════════ */

div#scoreCard {
	background-color: #faf5ff;   /* faint violet tint */
	border-radius: 12px;
	min-height: 380px;           /* slightly taller for extra row */
	padding: 0.75rem 0.5rem 2.5rem 0.5rem;
	border: 2px solid var(--zilch-primary);
	box-shadow: 0 2px 8px rgba(109,40,217,0.1);
	margin-bottom: 2rem;
}

div#scoreCard h2 {
	text-align: center;
	margin-bottom: 6px;
	color: var(--zilch-dark);
	font-family: var(--boogaloo);
	font-size: 1.4rem;
	letter-spacing: 0.5px;
}

div#leftScore,
div#rightScore {
	border: 1px solid var(--zilch-gold-border);
	border-radius: 10px;
	width: 45%;
	padding: 10px;
}

div#leftScore  { float: left;  margin-bottom: 10px; }
div#rightScore { float: right; width: 45%; }

div#leftScore table,
div#rightScore table { width: 100%; margin: 0; }

div#leftScore table td,
div#rightScore table td {
	padding-bottom: 2px;
	font-size: 0.88rem;
	background-color: var(--zilch-gold);
}

div#leftScore table tr td:first-child,
div#rightScore table tr td:first-child {
	text-align: right;
	font-weight: 600;
	padding-right: 5px;
	width: 62%;
	color: var(--zilch-dark);
}

div#leftScore table tr td:nth-child(2),
div#rightScore table tr td:nth-child(2) {
	background-color: white;
	width: 38%;
	text-align: right;
}

div#leftScore table tr td.gap,
div#rightScore table tr td.gap {
	padding-bottom: 10px;
	background-color: transparent;
}

/* Zilch row — violet highlight to make it stand out */
td#zilch, td#zilchTd {
	background-color: #ede9fe !important;
}

td#zilch {
	color: var(--zilch-primary) !important;
	font-style: italic;
}

div#scoreCard h3#grandTotal {
	text-align: center;
	clear: both;
	padding-top: 12px;
	color: var(--zilch-dark);
	font-family: var(--boogaloo);
	font-size: 1.3rem;
	margin-bottom: 0;
}

div#scoreCard.inactive td { cursor: default; }

.clickable {
	cursor: pointer;
	transition: background-color 0.15s;
}

.clickable:hover {
	background-color: var(--zilch-accent) !important;
	color: #fff !important;
}


/* ═══════════════════════════════════════════════════════════════
   STATS OFFCANVAS
═══════════════════════════════════════════════════════════════ */

.tnt-offcanvas {
	background: #1e1533;
	color: #f8f5ff;
	width: 320px;
}

.tnt-offcanvas .offcanvas-header {
	border-bottom: 2px solid var(--zilch-primary);
	padding: 1rem 1.25rem;
}

.tnt-offcanvas .offcanvas-title {
	font-family: var(--boogaloo);
	font-size: 1.2rem;
	color: var(--zilch-accent);
}

.offcanvas-intro   { color: rgba(255,255,255,0.65); font-size:0.85rem; margin-bottom:1rem; }

.offcanvas-section-label {
	color: var(--zilch-accent);
	font-weight: 700;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 0.5rem;
}

table#statsTable { width:100%; margin-top:6px; border-collapse:collapse; }

table#statsTable caption {
	color: var(--zilch-accent);
	font-weight: 600;
	font-size: 0.78rem;
	text-transform: uppercase;
	caption-side: top;
	padding-bottom: 4px;
	text-align: left;
}

table#statsTable tr td:first-child {
	text-align: right;
	padding-right: 14px;
	color: var(--zilch-accent);
	font-weight: 600;
	font-size: 0.88rem;
}

table#statsTable tr td {
	padding: 4px 6px;
	color: #f8f5ff;
	font-size: 0.88rem;
}

p#previousScoresPara {
	font-size: 0.82rem;
	color: rgba(255,255,255,0.65);
	word-break: break-all;
	line-height: 1.6;
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */

@media (max-width: 400px) {
	div#scoreCard { font-size: 0.82em; }
	div#leftScore table tr td:first-child,
	div#rightScore table tr td:first-child { font-size: 0.75rem; }
}
