/*
 * Unix timestamp converter styles.
 * Shared variables, reset, body (grid background), .brand, .nav, .eyebrow,
 * .seo-content and footer styles come from /style.css (loaded first). This
 * file only holds what is specific to this page, plus overrides of the shared
 * rules.
 */

body {
	padding: 40px 20px;
}

.wrap {
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
}

/* ---------- top nav (overrides shared .nav sizing) ---------- */
.topnav {
	max-width: none;
	margin: 0 0 36px;
	padding: 0;
}

/* ---------- headings ---------- */
.eyebrow {
	margin-bottom: 10px;
}

h1 {
	font-size: 30px;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 4px;
}
.sub {
	color: var(--muted);
	font-size: 14.5px;
	margin: 0 0 28px;
}

/* ---------- card ---------- */
.card {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow:
		0 1px 2px rgba(20, 20, 20, 0.03),
		0 12px 32px -18px rgba(20, 20, 20, 0.18);
	overflow: hidden;
}

.block {
	padding: 18px;
	border-top: 1px solid var(--line);
}
.block:first-child {
	border-top: none;
}

.field-label,
.section-title {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-family: "JetBrains Mono", monospace;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 8px;
}
.section-title {
	color: var(--ink);
	font-weight: 600;
	margin-bottom: 10px;
}

.live-dot {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	letter-spacing: 0.08em;
}
.live-dot::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--good);
	animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
	50% {
		opacity: 0.25;
	}
}

/* ---------- inputs ---------- */
input[type="text"],
select {
	background: #fbfbfa;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 12px 14px;
	font-family: "JetBrains Mono", monospace;
	font-size: 16px;
	color: var(--ink);
	outline: none;
	transition: border-color 0.15s ease;
}
input[type="text"] {
	flex: 1;
	min-width: 0;
}
select {
	cursor: pointer;
	max-width: 100%;
}
#tz {
	width: 100%;
}
input[type="text"]:focus,
select:focus {
	border-color: var(--accent);
}
input[type="text"]::placeholder {
	color: #b7b9bd;
}

.input-row {
	display: flex;
	gap: 8px;
}

/* example chips */
.examples {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
}
.examples-label {
	font-family: "JetBrains Mono", monospace;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
	margin-right: 2px;
}
.chip {
	font-family: "JetBrains Mono", monospace;
	font-size: 12px;
	padding: 4px 9px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: #fff;
	color: var(--ink);
	cursor: pointer;
	transition: all 0.15s ease;
}
.chip:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.status {
	font-family: "JetBrains Mono", monospace;
	font-size: 12px;
	color: var(--muted);
	margin: 12px 0 4px;
	min-height: 18px;
}
.status.error {
	color: var(--error);
}

/* ---------- results ---------- */
.grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 18px;
	margin: 0;
}
.grid[hidden] {
	display: none;
}
.item {
	padding: 11px 0;
	border-top: 1px solid var(--line);
	min-width: 0;
}
.now-block .item {
	border-top: none;
	padding: 4px 0 0;
}
dt {
	font-family: "JetBrains Mono", monospace;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 4px;
}
dd {
	margin: 0;
}
button.val {
	display: block;
	max-width: 100%;
	padding: 3px 6px;
	margin: 0 -6px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: transparent;
	font-family: "JetBrains Mono", monospace;
	font-size: 14px;
	color: var(--ink);
	text-align: left;
	word-break: break-word;
	cursor: copy;
	transition: all 0.15s ease;
}
button.val.big {
	font-size: 22px;
	font-weight: 600;
	color: var(--accent);
}
button.val:hover {
	background: #fbfbfa;
	border-color: var(--line);
}
button.val.copied {
	background: var(--good);
	border-color: var(--good);
	color: #fff;
}

/* ---------- actions ---------- */
.actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px 18px;
	border-top: 1px solid var(--line);
}
.hint {
	font-family: "JetBrains Mono", monospace;
	font-size: 11.5px;
	color: var(--muted);
}
button.act {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	font-family: "Space Grotesk", sans-serif;
	font-weight: 600;
	font-size: 13.5px;
	padding: 9px 16px;
	border-radius: 7px;
	border: 1px solid var(--line);
	background: #fff;
	color: var(--ink);
	cursor: pointer;
	transition: all 0.15s ease;
}
button.act:hover {
	border-color: #c9c7be;
	background: #fafaf8;
}

.ico {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

button:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.footer-note {
	text-align: center;
	font-size: 12px;
	color: var(--muted);
	margin-top: 18px;
	font-family: "JetBrains Mono", monospace;
}

/* ---------- explainer below the tool (single column, like the other tools) ---------- */
.seo-content {
	max-width: 680px;
	margin: 50px auto 0;
	padding: 0;
	border-top: none;
}
.seo-content h2 {
	font-size: 20px;
	font-weight: 700;
	margin: 32px 0 10px;
}
.seo-content p,
.seo-content li {
	color: var(--muted);
	line-height: 1.7;
}
.seo-content ol {
	padding-left: 22px;
}
.seo-content strong {
	color: var(--ink);
}

/* ---------- footer (overrides shared footer: stacked, left-aligned) ---------- */
footer {
	max-width: none;
	margin: 60px 0 0;
	padding: 24px 0 0;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	text-align: left;
}

/* ---------- tablet & below ---------- */
@media (max-width: 900px) {
	body {
		padding: 28px 16px;
	}
	.seo-content {
		margin-top: 40px;
	}
}

/* ---------- phones ---------- */
@media (max-width: 600px) {
	.grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.now-block .grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0 10px;
	}
	button.val.big {
		font-size: 17px;
	}
	.input-row {
		flex-wrap: wrap;
	}
	.input-row input[type="text"] {
		flex: 1 1 100%;
	}
	.input-row select {
		flex: 1;
	}
}

@media (max-width: 480px) {
	body {
		padding: 20px 14px;
	}
	.topnav {
		margin-bottom: 24px;
	}
	h1 {
		font-size: 24px;
	}
	.sub {
		margin-bottom: 20px;
	}
	.block {
		padding: 14px;
	}
	.actions {
		padding: 12px 14px 14px;
	}
	.seo-content h2 {
		font-size: 18px;
	}
	footer {
		margin-top: 40px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.live-dot::before {
		animation: none;
	}
	.chip,
	button.val,
	button.act {
		transition: none;
	}
}
