/*
 * Theme Name: Ruokavisa
 * Description: The look of the 2026 Ruokavisa teacher app: a navy sign-in card,
 * hand-drawn paper boxes, blob buttons and vegetable icons. Fonts come from the
 * site theme.
 */
.sqm-theme-ruokavisa {
	--sqm-accent: #0d1e63;
	--sqm-accent-text: #000;
	--sqm-danger: #f35300;
	--sqm-success: #008d36;
	--sqm-text: #0d1e63;
	--sqm-shadow: none;
	--sqm-border: rgb(13 30 99 / 15%);
	--sqm-surface: rgb(255 255 255 / 60%);
	--sqm-radius: 6px;
	--rv-navy: #0d1e63;
	--rv-blue: #10287b;
	--rv-button: #a6c9fb;
	--rv-button-hover: #d0f1ac;
	--rv-paper: #f6f2ec;
	--rv-box: #e8e0cf;
	--rv-input: #f6f3eb;
	--rv-alert: #faa48d;
	--rv-blob: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 158 52' preserveAspectRatio='none'><path d='M102.153 0C117.102 0 128.602 1.19444 136.661 3.57571C144.72 5.95699 150.288 9.30446 153.373 13.6181C156.458 17.9318 158 22.9759 158 28.7503C158 36.0843 154.5 41.8206 147.508 45.9441C140.517 50.0676 128.864 52.0837 112.568 52L58.0169 50.7599C41.6186 50.7599 29.2458 49.5655 20.9068 47.1842C12.5593 44.7953 6.99152 41.6076 4.19491 37.6211C1.3983 33.6345 0 29.2067 0 24.3453C0 16.3722 3.5 10.5217 10.4915 6.80907C17.483 3.09642 29.7542 1.19444 47.3136 1.09554L102.153 0Z' fill='black'/></svg>");

	max-width: 50rem;
}

.sqm-theme-ruokavisa h2 {
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	font-weight: 400;
}

.sqm-theme-ruokavisa h3 {
	font-size: 1.25rem;
	font-weight: 400;
}

/* ── Buttons: the pale-blue blob, green on hover ───────────────────────── */

.sqm-theme-ruokavisa .sqm-button {
	position: relative;
	isolation: isolate;
	min-height: 52px;
	padding: 0 2.5rem;
	border: 0;
	border-radius: 0;
	font-weight: 400;
	color: #000;
	background: none;
}

/* The blob is a mask so one shape serves both colours. */
.sqm-theme-ruokavisa .sqm-button::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--rv-button);
	-webkit-mask: var(--rv-blob) center / 100% 100% no-repeat;
	mask: var(--rv-blob) center / 100% 100% no-repeat;
	transition: background-color 0.15s;
}

.sqm-theme-ruokavisa .sqm-button:hover::before {
	background: var(--rv-button-hover);
}

.sqm-theme-ruokavisa .sqm-button--small {
	min-height: 40px;
	padding: 0 1.5rem;
	font-size: 0.95em;
}

.sqm-theme-ruokavisa .sqm-button:focus-visible {
	outline: 2px solid #e6007e;
	outline-offset: 2px;
}

/* ── Fields ──────────────────────────────────────────────────────────── */

.sqm-theme-ruokavisa .sqm-field input,
.sqm-theme-ruokavisa .sqm-field select {
	padding: 0.75rem 1rem;
	border: 0;
	border-radius: var(--sqm-radius);
	color: #000;
	background: #fff;
}

.sqm-theme-ruokavisa .sqm-field label {
	font-weight: 700;
}

.sqm-theme-ruokavisa .sqm-notice {
	border: 0;
	border-radius: var(--sqm-radius);
	color: var(--rv-navy);
	background: var(--rv-alert);
}

.sqm-theme-ruokavisa .sqm-notice--success {
	background: #e6f4eb;
}

/* ── Signed out: the navy card ───────────────────────────────────────── */

.sqm-theme-ruokavisa:not(.sqm-portal--signed-in) .sqm-card {
	max-width: none;
	padding: clamp(1.5rem, 5vw, 2.5rem);
	border: 0;
	border-radius: 0;
	color: #fff;
	background: var(--rv-navy);
}

.sqm-theme-ruokavisa:not(.sqm-portal--signed-in) .sqm-card h2 {
	color: #fff;
}

.sqm-theme-ruokavisa:not(.sqm-portal--signed-in) .sqm-links {
	flex-direction: column;
	align-items: flex-start;
	padding-top: 1.25rem;
	border-top: 4px solid var(--rv-blue);
}

.sqm-theme-ruokavisa:not(.sqm-portal--signed-in) .sqm-link {
	color: #fff;
}

/* ── Signed in: hand-drawn paper ─────────────────────────────────────── */

.sqm-theme-ruokavisa.sqm-portal--signed-in {
	padding: 1.25rem;
	border-radius: var(--sqm-radius);
	color: var(--rv-navy);
	background: var(--rv-paper);
}

@media (min-width: 48rem) {
	.sqm-theme-ruokavisa.sqm-portal--signed-in {
		padding: 2.5rem;
		border-radius: 0;
		background: url(bg-container.webp) center / 100% 100% no-repeat;
	}
}

.sqm-theme-ruokavisa.sqm-portal--signed-in h2,
.sqm-theme-ruokavisa.sqm-portal--signed-in h3 {
	color: var(--rv-navy);
}

.sqm-theme-ruokavisa.sqm-portal--signed-in .sqm-card h2,
.sqm-theme-ruokavisa.sqm-portal--signed-in .sqm-card h3 {
	margin-bottom: 1rem;
	font-size: 1.6rem;
	font-weight: 400;
}

.sqm-theme-ruokavisa .sqm-header {
	border-bottom: 4px solid var(--rv-box);
}

.sqm-theme-ruokavisa .sqm-tab[aria-current="page"] {
	background: var(--rv-box);
}

.sqm-theme-ruokavisa .sqm-link--danger {
	color: var(--sqm-danger);
}

.sqm-theme-ruokavisa.sqm-portal--signed-in .sqm-card,
.sqm-theme-ruokavisa .sqm-group {
	padding: clamp(1rem, 4vw, 2rem);
	border: 0;
	border-radius: 0;
	background: url(bg-box.webp) center / 100% 100% no-repeat;
}

.sqm-theme-ruokavisa.sqm-portal--signed-in .sqm-field input,
.sqm-theme-ruokavisa.sqm-portal--signed-in .sqm-field select {
	padding: 1rem;
	background: var(--rv-input);
}

/* The 2026 app's column icons: bee for the group, tomato for its code,
   strawberry for the points, mushroom for each player's sections. */
.sqm-theme-ruokavisa .sqm-group__name,
.sqm-theme-ruokavisa .sqm-code__label {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

/* The strawberry is the stats grid's first column, across both rows. */
.sqm-theme-ruokavisa .sqm-stats {
	column-gap: 1.5rem;
}

.sqm-theme-ruokavisa .sqm-stats::before {
	grid-row: span 2;
	align-self: center;
}

.sqm-theme-ruokavisa .sqm-group__name::before,
.sqm-theme-ruokavisa .sqm-code__label::before,
.sqm-theme-ruokavisa .sqm-stats::before {
	content: "";
	flex: none;
	width: 2.25rem;
	height: 2.5rem;
	background: url(icon-bee.webp) center / contain no-repeat;
}

.sqm-theme-ruokavisa .sqm-code__label::before {
	width: 1.75rem;
	height: 1.75rem;
	background-image: url(icon-tomato.webp);
}

.sqm-theme-ruokavisa .sqm-stats::before {
	background-image: url(icon-strawberry.webp);
}

.sqm-theme-ruokavisa .sqm-state--stopped {
	display: inline-block;
	padding: 0.3rem 0.75rem;
	border-radius: var(--sqm-radius);
	color: var(--rv-navy);
	background: var(--rv-alert);
}

.sqm-theme-ruokavisa .sqm-code__value {
	padding: 0.15rem 0.6rem;
	border-radius: var(--sqm-radius);
	background: #fff;
}

.sqm-theme-ruokavisa .sqm-table {
	border-collapse: separate;
	border-spacing: 0 0.35rem;
}

.sqm-theme-ruokavisa .sqm-table th,
.sqm-theme-ruokavisa .sqm-table td {
	border: 0;
}

.sqm-theme-ruokavisa .sqm-table tbody td {
	background: #fff;
}

.sqm-theme-ruokavisa .sqm-table tbody td:first-child {
	border-radius: var(--sqm-radius) 0 0 var(--sqm-radius);
}

.sqm-theme-ruokavisa .sqm-table tbody td:last-child {
	border-radius: 0 var(--sqm-radius) var(--sqm-radius) 0;
}

.sqm-theme-ruokavisa .sqm-parts {
	opacity: 1; /* would show the row's white through; dim the text instead */
	color: rgb(13 30 99 / 75%);
}

.sqm-theme-ruokavisa .sqm-parts::before {
	content: "";
	display: inline-block;
	width: 1rem;
	height: 1rem;
	margin-right: 0.4rem;
	vertical-align: -0.15rem;
	background: url(icon-mushroom.webp) center / contain no-repeat;
}

/* The rules page's own headings, a step below the card's title. Weighted to
   outrank the signed-in card headings above. */
.sqm-theme-ruokavisa .sqm-card .sqm-rules h2,
.sqm-theme-ruokavisa .sqm-card .sqm-rules h3 {
	margin: 1.5rem 0 0.5rem;
	font-size: 1.35rem;
}
