/*
Theme Name: Company Locations
Description: Company info site with a daily Open/Closed status, an editable info box, and links to each location. Designated users ("Status Editor" role) can change the status and info box from the dashboard.
Version: 1.3.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: company-locations
*/

:root {
	--green: #1e8e3e;
	--red: #c62828;
	--ink: #1f2933;
	--muted: #5f6b7a;
	--line: #d9dee5;
	--bg: #f4f6f8;
	--card: #ffffff;
	--accent: #1d4f91;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--ink);
	background: var(--bg);
	line-height: 1.5;
}

a { color: var(--accent); }

.site-header {
	background: var(--card);
	border-bottom: 1px solid var(--line);
}
.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
}
.site-title {
	font-size: 1.25rem;
	font-weight: 700;
	text-decoration: none;
	color: var(--ink);
}
.site-header .login-link { font-size: .9rem; color: var(--muted); }

.wrap { max-width: 960px; margin: 0 auto; }

main.wrap { padding: 32px 20px 60px; }

/* ---------- Date + status ---------- */
.today {
	text-align: center;
	margin: 10px 0 24px;
}
.location-name {
	font-size: clamp(1.4rem, 3.5vw, 2rem);
	font-weight: 700;
	color: var(--accent);
	margin-bottom: 6px;
}
.today-date {
	font-size: clamp(2.2rem, 6vw, 4rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.status-box {
	display: block;
	width: min(100%, 520px);
	margin: 0 auto 32px;
	padding: 22px 20px;
	border-radius: 12px;
	text-align: center;
	color: #fff;
	font-size: clamp(2.4rem, 7vw, 4.5rem);
	font-weight: 900;
	letter-spacing: .08em;
	text-transform: uppercase;
	box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.status-open   { background: var(--green); }
.status-closed { background: var(--red); }

.status-box.small {
	display: inline-block;
	width: auto;
	margin: 0 0 20px;
	padding: 6px 16px;
	font-size: 1.1rem;
	border-radius: 8px;
	box-shadow: none;
}

/* ---------- Info box ---------- */
.info-box {
	background: var(--card);
	border: 1px solid var(--line);
	border-left: 6px solid var(--accent);
	border-radius: 10px;
	padding: 20px 24px;
	margin: 0 auto 40px;
	max-width: 760px;
	font-size: 1.05rem;
}
.info-box > :first-child { margin-top: 0; }
.info-box > :last-child  { margin-bottom: 0; }
.edit-note { text-align: center; font-size: .9rem; }
.page-content { max-width: 760px; margin: 0 auto 30px; }

/* ---------- Locations ---------- */
.locations-title {
	text-align: center;
	font-size: clamp(1.6rem, 4vw, 2.4rem);
	margin: 10px 0 28px;
}
.locations h2 {
	text-align: center;
	font-size: 1.4rem;
	margin: 0 0 16px;
}
.location-grid {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 14px;
}
.location-grid a {
	display: block;
	padding: 22px 16px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 10px;
	text-align: center;
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--ink);
	text-decoration: none;
	transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.location-grid a:hover,
.location-grid a:focus {
	transform: translateY(-2px);
	border-color: var(--accent);
	box-shadow: 0 6px 14px rgba(0,0,0,.08);
	outline: none;
}

/* ---------- Colorful landing page ---------- */
.home main.wrap { padding-top: 0; }
.hero {
	background: linear-gradient(120deg, #1d4f91 0%, #3a3fa8 45%, #0f8b8d 100%);
	color: #fff;
	text-align: center;
	padding: 46px 20px 90px;
	margin-bottom: -58px;
}
.hero .locations-title { color: #fff; margin: 0 0 8px; text-shadow: 0 2px 6px rgba(0,0,0,.18); }
.hero-sub { margin: 0; font-size: 1.1rem; opacity: .9; }

.location-grid.colorful {
	gap: 18px;
	position: relative;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
@media (max-width: 560px) {
	.location-grid.colorful { grid-template-columns: 1fr 1fr; gap: 12px; }
	.location-grid.colorful a.tile { min-height: 112px; font-size: 1.05rem; padding: 16px 8px; }
	.tile-pin { width: 38px !important; height: 38px !important; }
	.hero { padding: 34px 16px 76px; }
}
.location-grid.colorful a.tile {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 140px;
	padding: 22px 16px;
	border: none;
	border-radius: 16px;
	color: #fff;
	font-size: 1.3rem;
	font-weight: 700;
	text-shadow: 0 1px 3px rgba(0,0,0,.2);
	box-shadow: 0 8px 20px rgba(20,30,60,.16);
	overflow: hidden;
}
.location-grid.colorful a.tile::after {           /* soft shine */
	content: "";
	position: absolute;
	top: -40%; right: -30%;
	width: 140px; height: 140px;
	border-radius: 50%;
	background: rgba(255,255,255,.14);
}
.location-grid.colorful a.tile:hover,
.location-grid.colorful a.tile:focus {
	transform: translateY(-4px) scale(1.02);
	box-shadow: 0 14px 28px rgba(20,30,60,.24);
	outline: 3px solid rgba(255,255,255,.7);
	outline-offset: -6px;
}
.tile-pin {
	display: grid;
	place-items: center;
	width: 46px; height: 46px;
	border-radius: 50%;
	background: rgba(255,255,255,.22);
}
.tile-go {
	position: absolute;
	right: 14px; bottom: 10px;
	font-size: 1.2rem;
	opacity: .75;
	transition: transform .15s ease, opacity .15s ease;
}
.tile:hover .tile-go { transform: translateX(4px); opacity: 1; }

.location-grid.colorful a.tile-0 { background: linear-gradient(135deg, #e8590c, #f59f00); }  /* orange  */
.location-grid.colorful a.tile-1 { background: linear-gradient(135deg, #1971c2, #4dabf7); }  /* blue    */
.location-grid.colorful a.tile-2 { background: linear-gradient(135deg, #2b8a3e, #51cf66); }  /* green   */
.location-grid.colorful a.tile-3 { background: linear-gradient(135deg, #862e9c, #cc5de8); }  /* purple  */
.location-grid.colorful a.tile-4 { background: linear-gradient(135deg, #0b7285, #22b8cf); }  /* teal    */
.location-grid.colorful a.tile-5 { background: linear-gradient(135deg, #c2255c, #f06595); }  /* pink    */
.location-grid.colorful a.tile-6 { background: linear-gradient(135deg, #5f3dc4, #845ef7); }  /* indigo  */

/* ---------- Inner pages ---------- */
.page-content {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 28px;
}
.page-content h1 { margin-top: 0; }
.back-link { display: inline-block; margin-bottom: 18px; }

.site-footer {
	text-align: center;
	color: var(--muted);
	font-size: .85rem;
	padding: 20px;
}
