/*
 * Print sheet styling for KalenderJawa Core.
 *
 * Standalone A4 landscape sheet (?utskrift=1): 4 x 3 month grid, pasaran and
 * Javanese date under each Gregorian number, holidays in red, cuti bersama in
 * amber, plus the holiday lists and a legend at the bottom.
 *
 * The palette and typography follow the reference design (kalendernorge clone)
 * so both clones stay visually identical.
 */

@page { size: A4 landscape; margin: 8mm; }

* { box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

html, body {
	margin: 0;
	background: #fff;
	color: #17202d;
	font: 10pt/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-variant-numeric: tabular-nums;
}

.bar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: center;
	padding: 14px;
	background: #0f2a4a;
}

.bar a, .bar button {
	font: 600 15px/1 inherit;
	font-family: inherit;
	padding: 11px 18px;
	border-radius: 999px;
	border: 0;
	cursor: pointer;
	text-decoration: none;
}

.bar button { background: #c8102e; color: #fff; }
.bar a { background: #fff; color: #0f2a4a; }

.sheet { width: 281mm; margin: 12px auto; padding: 0; }

.head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	border-bottom: 2.5pt solid #c8102e;
	padding-bottom: .8mm;
	margin-bottom: 1.5mm;
}

.head h1 { margin: 0; font-size: 18pt; color: #0f2a4a; letter-spacing: -.01em; }
.head span { font-size: 9pt; color: #5d6879; font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5mm 2.5mm; }

.kn-month {
	border: .6pt solid #c9d1dc;
	border-radius: 2.5mm;
	padding: 1.2mm 1.6mm 1mm;
	break-inside: avoid;
}

.kn-month__title {
	margin: 0 0 0.4mm;
	font-size: 9pt;
	color: #0f2a4a;
	display: flex;
	justify-content: space-between;
	border-bottom: 1pt solid #c8102e;
	padding-bottom: .4mm;
}

.kn-month__title span { font-size: 7.5pt; color: #8a94a6; }
.kn-jvmeta { display: none; }

.kn-cal { width: 100%; border-collapse: collapse; table-layout: fixed; border-spacing: 0; }
.kn-cal th { font-size: 6pt; color: #6b7686; font-weight: 700; padding: .2mm 0; text-transform: uppercase; }
.kn-cal th.kn-sun { color: #c8102e; }
.kn-cal td {
	text-align: center;
	padding: .15mm 0;
	height: auto;
	font-size: 0;
	line-height: 0;
	vertical-align: middle;
	border-radius: 0;
	white-space: nowrap;
}
.kn-cal td .kn-ce { display: block; font-size: 7.4pt; line-height: 1.1; }
.kn-cal td :is(.kn-cell-weton, .kn-jv, .kn-cell-hijri, .kn-cell-neptu) {
	display: block;
	font-size: 4.8pt;
	line-height: 1.05;
	color: #364357;
}
.kn-cal td .kn-cell-weekday { display: none; }
.kn-cal td .kn-cell-weton { font-weight: 700; }
.kn-cal td .kn-cell-hijri { white-space: normal; overflow-wrap: anywhere; }
.kn-cal td .kn-cell-hijri > span { white-space: nowrap; }
.sheet[data-jv-calendar-view="jawa"] .kn-cal .kn-cell-hijri,
.sheet[data-jv-calendar-view="hijriah"] .kn-cal :is(.kn-cell-weton, .kn-cell-neptu),
.sheet[data-jv-calendar-view="angka"] .kn-cal .kn-pas { display: none; }
.sheet[data-jv-calendar-view="angka"] .kn-cal .kn-ce { font-size: 10pt; line-height: 1.4; }
.kn-cal td.kn-sun .kn-ce { color: #c8102e; }
.kn-cal td.kn-libur { background: #fdecef; }
.kn-cal td.kn-libur .kn-ce { color: #c8102e; font-weight: 700; }
.kn-cal td.kn-cuti { background: #fff7e0; }
.kn-cal td.kn-cuti .kn-ce { color: #8a5a00; font-weight: 700; }
.kn-cal td.kn-jvstart .kn-jv { text-decoration: underline dotted; text-decoration-thickness: .6pt; }
.kn-cal td.kn-out { background: transparent; }
.kn-cal td .kn-pas--legi,
.kn-cal td .kn-pas--pahing,
.kn-cal td .kn-pas--pon,
.kn-cal td .kn-pas--wage,
.kn-cal td .kn-pas--kliwon { color: #7b8596; }

.jv-lists { margin-top: 1.5mm; font-size: 6pt; color: #3b4555; display: grid; gap: .6mm; }
.jv-lists .jv-list { display: flex; flex-wrap: wrap; gap: .4mm 3mm; align-items: baseline; }
.jv-lists strong { color: #c8102e; }
.jv-lists span { white-space: nowrap; }
.jv-lists .jv-list + .jv-list strong { color: #8a5a00; }

.foot { margin-top: .8mm; font-size: 5.8pt; color: #8a94a6; display: flex; justify-content: space-between; }

@media screen and (max-width: 300mm) { .sheet { width: auto; margin: 10px; } }
@media screen and (max-width: 700px) { .grid { grid-template-columns: repeat(2, 1fr); } }

@media print {
	.bar { display: none; }
	.sheet { width: auto; margin: 0; }
	.grid { grid-template-columns: repeat(4, 1fr); }
}
