/*
Theme Name: Strax
Description: Sales Trax — events tracker. Custom "Event" post type, CSV importer, per-user locking, notes log, and heat level.
Version: 1.5.0
Author: Sales Trax
Text Domain: strax
*/

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

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

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	line-height: 1.55;
	color: #0f172a;
	background: #f7f8fa;
	-webkit-font-smoothing: antialiased;
}

a { color: #0ea5e9; text-decoration: none; }
a:hover { text-decoration: underline; }

hr {
	border: 0;
	border-top: 1px solid #e2e8f0;
	margin: 2rem 0;
}

:root {
	/* Fluid side gutter: roomy on wide screens, never cramped on phones. */
	--strax-gutter: clamp(1.5rem, 5vw, 6rem);
}

header, main, footer {
	margin: 0;
	padding: 0 var(--strax-gutter);
}

header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 2rem;
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid #e2e8f0;
	background: #fff;
}
header h1 {
	font-size: 1.05rem;
	margin: 0;
	font-weight: 600;
	letter-spacing: -.005em;
}
header h1 a { color: #0f172a; }
header h1 a:hover { color: #0ea5e9; text-decoration: none; }
header nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 1.25rem;
	flex-wrap: wrap;
	font-size: .95rem;
}
header nav a { color: #475569; }
header nav a:hover { color: #0ea5e9; text-decoration: none; }
header hr { display: none; }

main {
	padding-top: 2.5rem;
	padding-bottom: 4rem;
}
main h1 {
	font-size: 1.75rem;
	font-weight: 600;
	margin: 0 0 .5rem;
	letter-spacing: -.015em;
}
main h2 {
	font-size: 1.2rem;
	font-weight: 600;
	margin: 1.75rem 0 .75rem;
}

footer {
	color: #64748b;
	font-size: .85rem;
	text-align: center;
	padding-top: 1.5rem;
	padding-bottom: 2rem;
}
footer hr { margin: 0 0 1rem; }

/* Forms */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="url"],
select,
textarea {
	font: inherit;
	color: inherit;
	padding: .5rem .75rem;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: #0ea5e9;
	box-shadow: 0 0 0 3px rgba(14, 165, 233, .18);
}

button,
input[type="submit"] {
	font: inherit;
	font-weight: 500;
	padding: .5rem 1rem;
	background: #0ea5e9;
	color: #fff;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	transition: background .15s, transform .05s;
}
button:hover,
input[type="submit"]:hover { background: #0284c7; }
button:active,
input[type="submit"]:active { transform: translateY(1px); }

main form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .75rem 1.25rem;
	margin: 1.5rem 0;
	padding: 1rem 1.25rem;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
}
main form label {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	color: #475569;
	font-size: .95rem;
}

/* Tables */

main table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
	margin: 1rem 0;
}
main th,
main td {
	text-align: left;
	padding: .7rem 1rem;
	border-bottom: 1px solid #e2e8f0;
	vertical-align: middle;
}
main thead th {
	background: #f1f5f9;
	font-weight: 600;
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #475569;
}
main tbody tr:last-child td { border-bottom: 0; }
main tbody tr:hover td { background-color: #f8fafc; }

/* Heat row tints (override hover where applicable) */

main tr.strax-heat-row-yes   td { background-color: #dcfce7; }
main tr.strax-heat-row-maybe td { background-color: #fef9c3; }
main tr.strax-heat-row-no    td { background-color: #fee2e2; }
main tr.strax-heat-row-yes:hover   td { background-color: #bbf7d0; }
main tr.strax-heat-row-maybe:hover td { background-color: #fef08a; }
main tr.strax-heat-row-no:hover    td { background-color: #fecaca; }

/* Definition list (single event metadata) */

main dl {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: .35rem 1.25rem;
	margin: 1rem 0 1.5rem;
	padding: 1rem 1.25rem;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
}
main dl dt {
	color: #64748b;
	font-weight: 500;
	font-size: .85rem;
	text-transform: uppercase;
	letter-spacing: .03em;
}
main dl dd { margin: 0; }

/* Login page */

body.strax-login {
	background: #eef2f6;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 2rem 1rem;
}
body.strax-login main {
	width: 100%;
	max-width: 380px;
	margin: 0;
	padding: 2rem 2rem 1.5rem;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, .04), 0 12px 30px rgba(15, 23, 42, .06);
}
body.strax-login h1 {
	font-size: 1rem;
	font-weight: 500;
	color: #64748b;
	text-align: center;
	margin: 0 0 .25rem;
	letter-spacing: 0;
}
body.strax-login h2 {
	font-size: 1.5rem;
	font-weight: 600;
	text-align: center;
	margin: 0 0 1.5rem;
}
body.strax-login form {
	display: block;
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
}
body.strax-login p { margin: 0 0 .9rem; }
body.strax-login label {
	display: block;
	font-size: .85rem;
	color: #475569;
	margin-bottom: .25rem;
}
body.strax-login input[type="text"],
body.strax-login input[type="password"] {
	width: 100%;
	padding: .6rem .8rem;
}
body.strax-login button {
	width: 100%;
	padding: .65rem 1rem;
	font-weight: 600;
}
body.strax-login [role="alert"] {
	background: #fef2f2;
	border-left: 3px solid #ef4444;
	padding: .6rem .85rem;
	border-radius: 4px;
	color: #991b1b;
	font-size: .9rem;
}
body.strax-login p > small a { color: #64748b; }

/* Archive list (events archive) */

main > ul {
	list-style: none;
	margin: 1rem 0;
	padding: 0;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	overflow: hidden;
}
main > ul > li {
	padding: .85rem 1.1rem;
	border-bottom: 1px solid #e2e8f0;
}
main > ul > li:last-child { border-bottom: 0; }
main > ul > li small { color: #64748b; margin-left: .5rem; }

/* "Add" button on the My Locked listing screens */

.strax-add-form { margin: 0 0 1.25rem; }

/* Article (single event) */

main article > h1 { margin-bottom: .25rem; }

@media (max-width: 640px) {
	header { gap: .5rem 1rem; }
	main h1 { font-size: 1.5rem; }
	main table { font-size: .9rem; }
	main th, main td { padding: .55rem .75rem; }
}
