/*
Theme Name: Archivemarket
Description: A fresh build for the SIPC archive-and-market. Terminal mode — think Amstrad, 1990-1994: DOS blue, bright cyan borders, yellow highlights, everything monospace.
Version: 0.2
Requires at least: 6.7
Requires PHP: 8.0
*/

/* Bridge vars for sipc-dtf.css, which is built against a --void/--panel/
   --violet/--mono custom-property contract so it can be re-themed without
   touching the tested plugin CSS. Values mirror the theme.json palette. */
:root {
	--void: #0000AA;
	--panel: #1A1AC2;
	--violet: #55FFFF;
	--mono: 'VT323', 'Courier New', monospace;
}

/* Punchy short UI labels (buttons, price, stock count) get the pixel font;
   everything else in the buy panel stays on the more legible --mono. */
.sipcdtf-buy,
.sipcdtf-price,
.sipcdtf-stock,
.sipcdtf-tix-amount-label span {
	font-family: 'Silkscreen', var(--mono);
}

/* [am_all_posts] — the whole room's contents at a glance, above the fold,
   before the (paginated) excerpt loop further down the page. */
.am-all-posts {
	font-family: 'Silkscreen', var(--mono);
	font-size: .8rem;
	line-height: 1.8;
	color: var(--wp--preset--color--accent);
}
.am-all-posts a {
	color: var(--wp--preset--color--accent);
}
.am-all-posts a:hover {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--paper);
}

/* [am_breadcrumb] — the full root-to-leaf category path on a single post. */
.am-breadcrumb {
	display: block;
	font-family: 'Silkscreen', var(--mono);
	font-size: .8rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-quiet);
	margin: .5rem 0 1.5rem;
}
.am-breadcrumb a {
	color: var(--wp--preset--color--accent);
}
.am-breadcrumb a:hover {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--paper);
}
.am-breadcrumb-sep {
	color: var(--wp--preset--color--ink-quiet);
	margin: 0 .3em;
}

/* [am_nav] — Cyborg + the three rooms. Rooms with populated sub-categories
   render as a native <details>/<summary> pull-down, styled like a period
   menu bar dropdown rather than the browser's plain disclosure triangle. */
.am-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 1rem;
	font-family: 'Silkscreen', var(--mono);
	font-size: .8rem;
	text-transform: uppercase;
}
.am-nav a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.am-nav a:hover {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--paper);
}
.am-nav-room {
	position: relative;
}
.am-nav-room summary {
	cursor: pointer;
	list-style: none;
}
.am-nav-room summary::-webkit-details-marker {
	display: none;
}
.am-nav-room summary::after {
	content: " \25BE";
	font-size: .7em;
	color: var(--wp--preset--color--ink-quiet);
}
.am-nav-sub {
	position: absolute;
	top: 100%;
	left: 0;
	margin: .35rem 0 0;
	padding: .4rem 0;
	list-style: none;
	background: var(--wp--preset--color--paper);
	border: 2px solid var(--wp--preset--color--line);
	min-width: 8rem;
	z-index: 50;
}
.am-nav-sub li {
	margin: 0;
}
.am-nav-sub a {
	display: block;
	padding: .3rem .75rem;
	white-space: nowrap;
}

/* [am_room_title] — the room name standing in for "Cyborg Psychopomp"
   above a post's title. It's a link (to that room's archive) but should
   read as a heading, not an ordinary accent-yellow link, until hovered. */
.am-room-title a {
	color: inherit;
	text-decoration: none;
}

* {
	border-radius: 0 !important;
}

::selection {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--paper);
}

body {
	background: var(--wp--preset--color--paper);
}

/* Box-drawing corner ticks on groups that opt into a border — cheap nod to
   TUI window frames without hand-drawing full box characters. */
.wp-block-group {
	border-color: var(--wp--preset--color--line);
}

a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}
a:hover {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--paper);
	text-decoration: none;
}

input,
textarea,
button,
.wp-element-button {
	font-family: var(--mono);
	border-width: 2px !important;
}

input:focus,
textarea:focus,
button:focus {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 1px;
}

/* Search, terminal style — a bare underlined line, no box, no visible
   button. Enter submits; the submit button stays in the DOM for assistive
   tech, visually hidden. Applies to every search block (footer, 404). */
.wp-block-search .wp-block-search__inside-wrapper {
	background: transparent;
	border: none;
	padding: 0;
}
.wp-block-search__input {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0 !important;
	border-bottom: 1px solid var(--wp--preset--color--ink-quiet) !important;
	color: var(--wp--preset--color--ink);
	font-family: 'Silkscreen', var(--mono);
	font-size: .75rem;
	padding: .2rem 0;
	width: 10rem;
}
.wp-block-search__input::placeholder {
	color: var(--wp--preset--color--ink-quiet);
}
.wp-block-search__input:focus {
	outline: none;
	border-bottom-color: var(--wp--preset--color--accent) !important;
}
.wp-block-search__button {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
	padding: 0;
}
.am-footer-search {
	flex: 0 0 auto;
}
.am-footer-search .wp-block-search__input {
	width: 6.5rem;
	font-size: .7rem;
}

::-webkit-scrollbar {
	width: 14px;
	height: 14px;
}
::-webkit-scrollbar-track {
	background: var(--wp--preset--color--paper);
}
::-webkit-scrollbar-thumb {
	background: var(--wp--preset--color--line);
	border: 2px solid var(--wp--preset--color--paper);
}

/* Content was running edge-to-edge on narrow viewports — the constrained
   layout only sets max-width, it never had its own horizontal padding. */
.wp-site-blocks {
	padding-inline: 1rem;
}
@media (min-width: 600px) {
	.wp-site-blocks {
		padding-inline: 0;
	}
}
html, body {
	overflow-x: hidden;
	max-width: 100%;
}

/* Basket count in the footer — plain inline link, no fixed positioning, no
   iframe/modal. sipc-dtf.js already ships the .sipc-basket / .sipc-basket-n
   contract (hides when empty, fills in the count), so this lights up on
   its own with no plugin changes needed. Kept as a real page link rather
   than a modal so the eventual PayPal handoff is always a normal top-level
   navigation, never inside a frame. */
.sipc-basket[hidden] {
	display: none;
}
