/* Matches the main pizza-planet.co.uk site (public/_css): white page, system font,
   Bootstrap-style cards, blue headers, green order buttons. */

:root {
	--accent: #0068b2;
	--blue: #0068b2;
	--blue-dark: #004f88;
	--green: #198754;
	--red: #b22422;
	--yellow: #ffc107;
	--bg: #ffffff;
	--card: #ffffff;
	--card-soft: #f8f9fa;
	--text: #212529;
	--muted: #6c757d;
	--border: #dfe4e8;
	--shadow: 0 2px 4px rgba(0, 0, 0, 0.075);
	--shadow-hover: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
	--radius: 6px;
	--radius-btn: 8px;
	color-scheme: light;
}

:root[data-theme="dark"] {
	--bg: #212529;
	--card: #2b3035;
	--card-soft: #343a40;
	--text: #dee2e6;
	--muted: #adb5bd;
	--border: #495057;
	--shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	:root[data-theme="auto"] {
		--bg: #212529;
		--card: #2b3035;
		--card-soft: #343a40;
		--text: #dee2e6;
		--muted: #adb5bd;
		--border: #495057;
		--shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
		color-scheme: dark;
	}
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	font: 400 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
}

a { color: inherit; }

.page {
	width: 100%;
	max-width: 540px;
	margin: 0 auto;
	padding: max(24px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
}

/* Profile */
.profile { text-align: center; margin-bottom: 20px; }
.logo { display: block; width: auto; height: auto; max-width: 240px; max-height: 160px; margin: 0 auto; }
.avatar {
	width: 112px;
	height: 112px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid var(--border);
	box-shadow: var(--shadow);
}
.profile h1 { margin: 12px 0 4px; font-size: 1.75rem; font-weight: 500; line-height: 1.2; }
.bio { margin: 0 auto; max-width: 420px; color: var(--muted); }

.status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	padding: 6px 14px;
	border-radius: var(--radius-btn);
	background: var(--card-soft);
	border: 1px solid var(--border);
	color: var(--text);
	font-weight: 700;
	text-decoration: none;
}
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status-open { background: var(--green); border-color: var(--green); color: #fff; }
.status-open .dot { background: #fff; }
.status-soon .dot { background: var(--green); }

.socials ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 14px 0 0; padding: 0; list-style: none; }
.socials a {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 1.35rem;
	text-decoration: none;
	color: var(--blue);
	transition: background-color 0.16s, color 0.16s;
}
.socials a:hover { background: rgba(0, 104, 178, 0.08); color: var(--blue-dark); }

/* Same look as the main site's info banners */
.announcement {
	margin: 0 0 16px;
	padding: 12px 16px;
	border-radius: var(--radius);
	background: #cff4fc;
	border: 1px solid #9eeaf9;
	color: #055160;
	font-weight: 500;
	text-align: center;
}
.announcement i { margin-right: 4px; }

/* Links */
.links { display: grid; gap: 12px; }

.section-heading {
	margin: 12px 0 0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
	text-align: center;
}

.link {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 60px;
	padding: 10px 16px;
	border-radius: var(--radius-btn);
	background: var(--card);
	border: 1px solid var(--border);
	box-shadow: var(--shadow);
	color: var(--text);
	text-decoration: none;
	transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.link:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.link:active { transform: translateY(0); }
.link:focus-visible, .status:focus-visible, .socials a:focus-visible { outline: 0.2rem solid rgba(0, 104, 178, 0.4); outline-offset: 0.2rem; }

.link-icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 0.75rem;
	background: color-mix(in srgb, var(--accent) 10%, transparent);
	color: var(--accent);
	font-size: 1.15rem;
}
.link-image { flex: none; width: 44px; height: 44px; border-radius: var(--radius); object-fit: cover; }
.link-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.link:not(.has-image) .link-text:only-child { text-align: center; }
.link-title { font-size: 1.05rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.link-subtitle { font-size: 0.875rem; color: var(--muted); line-height: 1.4; }

.badge, .pill {
	display: inline-block;
	vertical-align: 2px;
	padding: 0.25em 0.55em;
	border-radius: var(--radius);
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1;
}
.badge { margin-left: 4px; background: var(--red); color: #fff; }
.pill-green { background: var(--green); color: #fff; }

/* Filled buttons, like the main site's btn-success / bg-primary */
.style-highlight, .style-blue, .style-brand {
	min-height: 64px;
	border: 0;
	color: #fff;
}
.style-highlight { background: var(--green); }
.style-blue { background: var(--blue); }
.style-brand { background: var(--red); }
.style-highlight .link-title, .style-blue .link-title, .style-brand .link-title { font-size: 1.2rem; font-weight: 500; }
.style-highlight .link-subtitle, .style-blue .link-subtitle, .style-brand .link-subtitle { color: rgba(255, 255, 255, 0.85); }
.style-highlight .link-icon, .style-blue .link-icon, .style-brand .link-icon { background: rgba(255, 255, 255, 0.16); color: #fff; }
.style-highlight .badge, .style-blue .badge, .style-brand .badge { background: #fff; color: var(--text); }

.style-gold { background: var(--yellow); border-color: var(--yellow); color: #212529; }
.style-gold .link-subtitle { color: rgba(33, 37, 41, 0.75); }
.style-gold .link-icon { background: rgba(255, 255, 255, 0.35); color: #212529; }

.style-outline { background: var(--card); box-shadow: none; border: 1px solid rgba(0, 104, 178, 0.45); color: var(--blue); }
.style-outline:hover { border-color: var(--blue); }
.style-outline .link-icon { background: rgba(0, 104, 178, 0.08); color: var(--blue); }

.style-feature { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; gap: 0; border-radius: var(--radius); }
.style-feature .link-image { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 0; }
.style-feature .link-icon { margin: 14px 16px 0; }
.style-feature .link-text { padding: 12px 16px 14px; text-align: left; }
.style-feature .link-title { font-size: 1.15rem; }

/* Custom background colour chosen in the link manager. Text colour is picked for contrast. */
.link.has-colour { background: var(--link-bg); border-color: var(--link-bg); color: var(--link-fg); }
.link.has-colour .link-subtitle { color: var(--link-fg); opacity: 0.85; }
.link.has-colour .link-icon { background: color-mix(in srgb, var(--link-fg) 16%, transparent); color: var(--link-fg); }
.link.has-colour .badge { background: var(--link-fg); color: var(--link-bg); }
.link.has-colour.style-outline { background: var(--card); border: 2px solid var(--link-bg); color: var(--text); }
.link.has-colour.style-outline .link-subtitle { color: var(--muted); opacity: 1; }
.link.has-colour.style-outline .link-icon { background: color-mix(in srgb, var(--link-bg) 14%, transparent); color: var(--link-bg); }
.link.has-colour.style-outline .badge { background: var(--link-bg); color: var(--link-fg); }

.empty { text-align: center; color: var(--muted); padding: 24px 8px; }

/* Opening hours: same layout as the main site's opening hours card */
.card {
	margin-top: 24px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--card);
	box-shadow: var(--shadow);
	overflow: hidden;
}
.card-header {
	margin: 0;
	padding: 14px 16px;
	background: var(--blue);
	color: #fff;
	font-size: 1.25rem;
	font-weight: 700;
}
.card-header i { margin-right: 6px; }
.hours ul { margin: 0; padding: 0; list-style: none; }
.hours li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	border-top: 1px solid var(--border);
}
.hours li:first-child { border-top: 0; }
.hours li.is-today { background: var(--card-soft); box-shadow: inset 0 0 0 3px var(--blue); border-top-color: transparent; }
.hours .day { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.hours .day strong { font-weight: 700; }
.hours .date { flex-basis: 100%; color: var(--text); font-size: 0.95rem; }
.hours .date sup { font-size: 0.65em; }
.hours .times { flex: none; display: grid; justify-items: end; text-align: right; align-content: start; }
.hours .times strong, .hours .detail { white-space: nowrap; }
.hours .state-unknown .times strong { white-space: normal; }
.hours .times strong { color: var(--blue); font-weight: 700; font-variant-numeric: tabular-nums; }
.hours .detail { font-size: 0.875rem; color: var(--text); }
.hours .state-closed .times strong, .hours .state-soldout .times strong { color: var(--red); }
.hours .state-unknown .times strong { color: var(--muted); font-weight: 400; }
:root[data-theme="dark"] .hours .times strong { color: #6ea8fe; }

.footer { margin-top: 24px; text-align: center; color: var(--muted); font-size: 0.875rem; }
.footer p { margin: 12px 0 0; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
	.link-icon i, .link-icon svg { animation: none !important; }
	.link, .socials a { transition: none; }
	.link:hover { transform: none; }
}

/* Staff preview */
.preview-bar { position: sticky; top: 0; z-index: 10; padding: 10px 16px; background: #fff3cd; border-bottom: 1px solid #ffe69c; color: #664d03; font-size: 0.875rem; text-align: center; }
.link.is-draft { outline: 2px dashed #b45309; outline-offset: 3px; opacity: 0.8; }
.draft-tag { position: absolute; top: -10px; right: 12px; padding: 2px 8px; border-radius: var(--radius); background: #b45309; color: #fff; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
