/*
Theme Name: PubliFlow
Description: Presentation layer for PubliFlow — pixel-matched to the Claude Design handoff (publiflow-social-media-automation). Data/logic lives in the publiflow-core plugin.
Author: PubliFlow
Version: 0.1.0
Text Domain: publiflow
*/

/* Design tokens — copied verbatim from the .dc.html handoff spec. See
   claude.md → Design Tokens before changing any of these; the whole
   theme's pixel-fidelity depends on them staying in sync with the source. */
:root {
	--pf-navy: #101B2D;
	--pf-navy-light: #16243A;
	--pf-teal: #19B8A6;
	--pf-teal-dark: #0E8C7E;
	--pf-amber: #F5A623;
	--pf-bg: #FAFBFD;
	--pf-ink: #1B2433;
	--pf-border: #E6EBF1;
	--pf-muted: #6B7686;
	--pf-muted-2: #9AA4B4;
	--pf-danger: #E5484D;
	--pf-danger-bg: #FDECEC;
	--pf-danger-ink: #C2342F;
	--font-display: 'Sora', sans-serif;
	--font-body: 'Inter', system-ui, sans-serif;
	--font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
	background: var(--pf-bg);
	color: var(--pf-ink);
	font-family: var(--font-body);
	font-size: 15px;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
::selection { background: var(--pf-teal); color: #fff; }
input, textarea, select, button { font-family: inherit; }
textarea { resize: none; }
*:focus-visible { outline: 2px solid var(--pf-teal); outline-offset: 2px; }
a { color: inherit; }

@keyframes pfspin { to { transform: rotate(360deg); } }
@keyframes pfpulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.82); } }
@keyframes pfup { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes pfshim { 0% { background-position: -340px 0; } 100% { background-position: 340px 0; } }
.pf-up { animation: pfup .4s cubic-bezier(.2,.7,.3,1) both; }

/* Desktop: sidebar + content. The tab bar and mobile header exist only below
   880px, where .pf-side is hidden — see the breakpoint block. */
.pf-shell { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.pf-bottomnav { display: none; }
.pf-topbar-mobile { display: none; }

/* v0.30 guided tour: the spotlight. Its shadow is the dimmed page around the hole. */
.pf-tour-ring {
	border-radius: 12px;
	box-shadow: 0 0 0 2px var(--pf-teal), 0 0 0 9999px rgba(16,27,45,.55);
	transition: top .2s ease, left .2s ease, width .2s ease, height .2s ease;
}
@media (prefers-reduced-motion: reduce) {
	.pf-tour-ring { transition: none; }
}

@media (max-width: 880px) {
	.pf-shell { grid-template-columns: 1fr; }
	.pf-side { display: none !important; }
	.pf-bottomnav { display: flex !important; }
	/* Carries the identity, quota and account menu the hidden sidebar owned. */
	.pf-topbar-mobile { display: flex !important; }
	/* Bottom padding clears the fixed tab bar plus the home indicator. */
	.pf-content { padding: 18px 16px calc(92px + env(safe-area-inset-bottom)) !important; }
	.pf-two { grid-template-columns: 1fr !important; }
	.pf-hero { grid-template-columns: 1fr !important; }
	.pf-topbar { padding: 14px 16px !important; }
	.pf-landwrap { padding: 0 18px !important; }
	.pf-authcard { padding: 28px 22px !important; }
	.pf-banner { grid-template-columns: 1fr !important; justify-items: start !important; }
	.pf-btn-primary, .pf-btn-secondary { min-height: 44px; }
	.pf-skel {
		height: 84px;
		border-radius: 14px;
		background: linear-gradient( 90deg, var(--pf-border) 0%, #F3F6F9 20%, var(--pf-border) 40%, var(--pf-border) 100% );
		background-size: 700px 100%;
		animation: pfshim 1.5s ease-in-out infinite;
	}
}
@media (max-width: 480px) {
	.pf-modal-overlay { align-items: flex-end !important; padding: 0 !important; }
	/* 4 thumbnails per row leaves ~60px tiles on a 360px phone — drop to 3. */
	.pf-thumbgrid { grid-template-columns: repeat(3, 1fr) !important; }
	.pf-modal {
		max-width: 100% !important;
		border-radius: 18px 18px 0 0 !important;
		padding-bottom: calc(26px + env(safe-area-inset-bottom)) !important;
		animation: pfup .25s ease both;
	}
}
@media (prefers-reduced-motion: reduce) {
	* { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* Shared form field styles (referenced as {{ inputStyle }} / {{ areaStyle }} /
   {{ labelStyle }} / {{ errStyle }} in the original design spec — promoted to
   real classes here since we're not using its templating engine). */
.pf-input, .pf-area {
	width: 100%;
	border: 1px solid var(--pf-border);
	border-radius: 10px;
	padding: 11px 13px;
	font-size: 14px;
	color: var(--pf-ink);
	background: #fff;
}
.pf-label { font-size: 13px; font-weight: 600; color: #3A4658; display: block; margin-bottom: 6px; }
.pf-err { color: var(--pf-danger-ink); font-size: 12.5px; margin-top: 4px; }
.pf-btn-primary {
	background: var(--pf-teal); border: 0; color: #06231F; font-weight: 600;
	cursor: pointer; padding: 14px; border-radius: 11px; font-size: 15px;
}
.pf-btn-secondary {
	background: #F1F4F8; border: 0; color: #3A4658; font-weight: 600;
	cursor: pointer; padding: 12px 18px; border-radius: 10px; font-size: 14px;
}

/* Public legal pages (template-legal.php). The body copy is editor-managed
   post_content, so it needs real element styling rather than the inline styles
   the hand-built marketing templates use. */
.pf-legal { color: #3A4658; font-size: 15.5px; line-height: 1.7; }
.pf-legal h2 {
	font-family: var(--font-display); font-weight: 700; font-size: 22px;
	letter-spacing: -.015em; color: var(--pf-ink); margin: 40px 0 12px;
	padding-top: 18px; border-top: 1px solid var(--pf-border);
}
.pf-legal h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.pf-legal h3 {
	font-family: var(--font-display); font-weight: 600; font-size: 16.5px;
	color: var(--pf-ink); margin: 26px 0 8px;
}
.pf-legal p { margin: 0 0 14px; }
.pf-legal ul, .pf-legal ol { margin: 0 0 16px; padding-left: 22px; }
.pf-legal li { margin-bottom: 8px; }
.pf-legal a { color: var(--pf-teal-dark); text-decoration: underline; text-underline-offset: 2px; }
.pf-legal strong { color: var(--pf-ink); font-weight: 600; }
.pf-legal table {
	width: 100%; border-collapse: collapse; margin: 0 0 20px;
	font-size: 14px; background: #fff;
	border: 1px solid var(--pf-border);
}
.pf-legal th, .pf-legal td {
	text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--pf-border);
	vertical-align: top;
}
.pf-legal th { font-weight: 600; color: var(--pf-ink); background: #F4F7FA; }
.pf-legal tr:last-child td { border-bottom: 0; }
/* The subprocessor and retention tables are the only wide blocks on these
   pages; scroll them internally so the page body never scrolls sideways
   (claude.md mobile rules). */
@media (max-width: 640px) {
	.pf-legal { font-size: 15px; }
	.pf-legal table { display: block; overflow-x: auto; }
}
