/*
Theme Name: AgbaLoaded Music Distribution Theme
Theme URI: https://distribution.agbaloaded.com.ng
Author: AgbaLoaded Digital Limited
Description: Presentation layer for the AgbaLoaded Music Distribution platform. Requires the AgbaLoaded Music Distribution Core plugin to be active — this theme supplies layout, navigation, the landing page, forms and the dashboard interface only; all business data comes from the plugin.
Version: 1.0.0
Requires at least: 5.9
Requires PHP: 7.4
Text Domain: agbld-theme
*/

/* ===== Brand tokens =====
   Light mode is the default; dark mode overrides via [data-theme="dark"]
   on <html> or the OS preference, whichever the visitor last chose (see
   assets/js/main.js). Every color used anywhere in the theme routes
   through one of these variables so the toggle actually works everywhere. */
:root {
	--agb-blue: #1449e0;
	--agb-blue-dark: #0e35ad;
	--agb-black: #0a0a0a;
	--agb-white: #ffffff;

	--agb-bg: #ffffff;
	--agb-bg-alt: #f5f7fb;
	--agb-surface: #ffffff;
	--agb-text: #10131a;
	--agb-text-muted: #5b6472;
	--agb-border: #e4e7ee;
	--agb-header-bg: #0a0a0a;
	--agb-header-text: #ffffff;

	--agb-radius: 10px;
	--agb-max-width: 1160px;
	--agb-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
	--agb-bg: #0a0a0a;
	--agb-bg-alt: #14161c;
	--agb-surface: #16181f;
	--agb-text: #f2f3f5;
	--agb-text-muted: #a3aab7;
	--agb-border: #262a33;
	--agb-header-bg: #050505;
	--agb-header-text: #ffffff;
}

@media (prefers-color-scheme: dark) {
	html:not([data-theme="light"]):not([data-theme="dark"]) {
		--agb-bg: #0a0a0a;
		--agb-bg-alt: #14161c;
		--agb-surface: #16181f;
		--agb-text: #f2f3f5;
		--agb-text-muted: #a3aab7;
		--agb-border: #262a33;
		--agb-header-bg: #050505;
		--agb-header-text: #ffffff;
	}
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--agb-font);
	background: var(--agb-bg);
	color: var(--agb-text);
	line-height: 1.55;
}

a { color: var(--agb-blue); }
img { max-width: 100%; display: block; }

.agb-container {
	max-width: var(--agb-max-width);
	margin: 0 auto;
	padding: 0 1.25rem;
}

/* ===== Site header ===== */
.agb-site-header {
	background: var(--agb-header-bg);
	color: var(--agb-header-text);
	position: sticky;
	top: 0;
	z-index: 50;
}
.agb-site-header .agb-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 68px;
}
.agb-logo {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--agb-header-text);
	text-decoration: none;
	font-weight: 700;
	font-size: 1.05rem;
}
.agb-logo img { height: 36px; width: 36px; }

.agb-primary-nav { display: flex; align-items: center; gap: 1.5rem; }
.agb-primary-nav a {
	color: var(--agb-header-text);
	text-decoration: none;
	font-size: 0.95rem;
	opacity: 0.85;
}
.agb-primary-nav a:hover { opacity: 1; }

.agb-nav-toggle {
	display: none;
	background: none;
	border: none;
	color: var(--agb-header-text);
	font-size: 1.5rem;
	cursor: pointer;
}

.agb-theme-toggle {
	background: rgba(255,255,255,0.08);
	border: 1px solid rgba(255,255,255,0.2);
	color: var(--agb-header-text);
	border-radius: 999px;
	width: 34px;
	height: 34px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
}

@media (max-width: 820px) {
	.agb-primary-nav {
		display: none;
		position: absolute;
		top: 68px;
		left: 0;
		right: 0;
		background: var(--agb-header-bg);
		flex-direction: column;
		align-items: flex-start;
		padding: 1rem 1.25rem 1.5rem;
		gap: 1rem;
	}
	.agb-primary-nav.is-open { display: flex; }
	.agb-nav-toggle { display: block; }
}

/* ===== Buttons ===== */
.agb-btn {
	display: inline-block;
	padding: 0.85em 1.6em;
	border-radius: 999px;
	font-weight: 600;
	text-decoration: none;
	border: 2px solid var(--agb-blue);
	transition: transform 0.1s ease;
}
.agb-btn:hover { transform: translateY(-1px); }
.agb-btn-primary { background: var(--agb-blue); color: #fff; }
.agb-btn-primary:hover { background: var(--agb-blue-dark); color: #fff; }
.agb-btn-ghost { background: transparent; color: var(--agb-header-text); }
.agb-btn-outline { background: transparent; color: var(--agb-blue); }
.agb-btn-block { display: block; width: 100%; text-align: center; }

/* ===== Landing page ===== */
.agb-hero {
	background: var(--agb-black);
	color: #fff;
	text-align: center;
	padding: 5rem 1.25rem 6rem;
}
.agb-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 1rem; }
.agb-hero p { font-size: 1.1rem; color: #cfd3da; max-width: 640px; margin: 0 auto 2rem; }
.agb-hero .agb-btn { margin: 0 0.4rem; }

.agb-section { padding: 4.5rem 0; }
.agb-section h2 { text-align: center; font-size: 2rem; margin-bottom: 2.5rem; }
.agb-section-alt { background: var(--agb-bg-alt); }

.agb-steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5rem;
}
.agb-step {
	background: var(--agb-surface);
	border: 1px solid var(--agb-border);
	border-radius: var(--agb-radius);
	padding: 1.75rem;
	text-align: center;
}
.agb-step .agb-step-num {
	width: 42px; height: 42px;
	border-radius: 50%;
	background: var(--agb-blue);
	color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-weight: 700;
	margin: 0 auto 1rem;
}

.agb-feature-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 1.5rem;
}
.agb-feature {
	padding: 1.5rem;
	border-radius: var(--agb-radius);
	background: var(--agb-surface);
	border: 1px solid var(--agb-border);
}
.agb-feature h3 { margin-top: 0; }

.agb-release-types {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.5rem;
}
.agb-release-type-card {
	border: 1px solid var(--agb-border);
	border-radius: var(--agb-radius);
	padding: 1.75rem;
	background: var(--agb-surface);
}
.agb-release-type-card h3 { color: var(--agb-blue); }

.agb-requirements {
	max-width: 720px;
	margin: 0 auto;
	list-style: none;
	padding: 0;
}
.agb-requirements li {
	padding: 0.9rem 0 0.9rem 2rem;
	border-bottom: 1px solid var(--agb-border);
	position: relative;
}
.agb-requirements li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--agb-blue);
	font-weight: 700;
}

.agb-dashboard-preview {
	max-width: 820px;
	margin: 0 auto;
	background: var(--agb-black);
	color: #fff;
	border-radius: 16px;
	padding: 2rem;
}
.agb-dashboard-preview .agb-preview-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 1rem;
	margin-top: 1rem;
}
.agb-dashboard-preview .agb-preview-stat {
	background: rgba(255,255,255,0.06);
	border-radius: 10px;
	padding: 1rem;
}
.agb-dashboard-preview .agb-preview-stat .num { font-size: 1.4rem; font-weight: 700; color: var(--agb-blue); }
.agb-dashboard-preview .agb-preview-stat .label { font-size: 0.8rem; color: #b7bdc8; }

.agb-final-cta {
	text-align: center;
	background: linear-gradient(135deg, var(--agb-blue), var(--agb-blue-dark));
	color: #fff;
	border-radius: 20px;
	padding: 3.5rem 1.5rem;
	margin: 0 1.25rem;
}
.agb-final-cta h2 { color: #fff; }

/* ===== Footer ===== */
.agb-site-footer {
	background: var(--agb-black);
	color: #cfd3da;
	padding: 3rem 0 2rem;
	margin-top: 3rem;
}
.agb-footer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 1.5rem;
}
.agb-footer-grid a {
	display: block;
	color: #cfd3da;
	text-decoration: none;
	padding: 0.3rem 0;
	font-size: 0.92rem;
}
.agb-footer-grid a:hover { color: #fff; }
.agb-footer-bottom {
	text-align: center;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid #232323;
	font-size: 0.85rem;
	color: #8b8f97;
}

/* ===== Auth pages ===== */
.agb-auth-shell {
	min-height: calc(100vh - 68px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2.5rem 1.25rem;
	background: var(--agb-bg-alt);
}
.agb-auth-card {
	width: 100%;
	max-width: 440px;
	background: var(--agb-surface);
	border: 1px solid var(--agb-border);
	border-radius: 16px;
	padding: 2.25rem;
}
.agb-auth-card .agb-auth-logo { text-align: center; margin-bottom: 1.25rem; }
.agb-auth-card .agb-auth-logo img { height: 56px; width: 56px; margin: 0 auto; }
.agb-auth-card h1 { text-align: center; font-size: 1.4rem; margin-top: 0; }

.agbld-auth-form { max-width: none; margin: 0; padding: 0; border: none; }
.agbld-auth-form label { color: var(--agb-text); }
.agbld-auth-form input[type="text"],
.agbld-auth-form input[type="email"],
.agbld-auth-form input[type="password"] {
	background: var(--agb-bg);
	color: var(--agb-text);
	border: 1px solid var(--agb-border);
}
.agbld-auth-form .agbld-btn,
.agbld-dashboard-shell .agbld-btn { display: inline-block; }
.agbld-auth-form button[type="submit"] {
	width: 100%;
	padding: 0.85em;
	border-radius: 8px;
	background: var(--agb-blue);
	color: #fff;
	border: none;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	margin-top: 0.5rem;
}
.agb-auth-card p { text-align: center; font-size: 0.92rem; }

/* ===== Static / legal pages ===== */
.agb-static-shell {
	max-width: 760px;
	margin: 0 auto;
	padding: 3rem 1.25rem 4rem;
}
.agb-static-shell h1 { font-size: 2rem; }

/* ===== Dashboard area ===== */
.agb-dashboard-layout {
	display: grid;
	grid-template-columns: 240px 1fr;
	min-height: calc(100vh - 68px);
}
.agb-dashboard-sidebar {
	background: var(--agb-black);
	color: #fff;
	padding: 1.75rem 1rem;
}
.agb-dashboard-sidebar .agb-sidebar-user {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid #232323;
}
.agb-avatar-initials {
	width: 38px; height: 38px;
	border-radius: 50%;
	background: var(--agb-blue);
	color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-weight: 700;
	font-size: 0.9rem;
	flex-shrink: 0;
}
.agb-sidebar-user .name { font-size: 0.9rem; font-weight: 600; }

.agb-dashboard-sidebar nav a {
	display: block;
	color: #cfd3da;
	text-decoration: none;
	padding: 0.65rem 0.75rem;
	border-radius: 8px;
	font-size: 0.92rem;
	margin-bottom: 0.15rem;
}
.agb-dashboard-sidebar nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.agb-dashboard-sidebar nav a.is-active { background: var(--agb-blue); color: #fff; }
.agb-dashboard-sidebar nav a.agb-logout-link { color: #9aa0aa; margin-top: 1rem; }

.agb-dashboard-main {
	padding: 2rem 2rem 3rem;
	background: var(--agb-bg-alt);
}
.agb-dashboard-topbar {
	display: none;
	align-items: center;
	justify-content: space-between;
	background: var(--agb-black);
	color: #fff;
	padding: 0.85rem 1.25rem;
}
.agb-dashboard-topbar button {
	background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer;
}

@media (max-width: 900px) {
	.agb-dashboard-layout { grid-template-columns: 1fr; }
	.agb-dashboard-sidebar {
		position: fixed;
		top: 0; bottom: 0; left: 0;
		width: 240px;
		transform: translateX(-100%);
		transition: transform 0.2s ease;
		z-index: 60;
		overflow-y: auto;
	}
	.agb-dashboard-sidebar.is-open { transform: translateX(0); }
	.agb-dashboard-topbar { display: flex; }
	.agb-dashboard-main { padding: 1.5rem 1rem 2.5rem; }
}

/* Re-skin the plugin's own dashboard stat grid/shell so it matches the
   theme instead of the plugin's baseline styles. */
.agb-dashboard-main .agbld-dashboard-shell { max-width: none; margin: 0; padding: 0; }
.agb-dashboard-main .agbld-dashboard-nav { display: none; } /* theme's sidebar replaces this nav */
.agb-dashboard-main .agbld-stat { background: var(--agb-surface); color: var(--agb-text); border: 1px solid var(--agb-border); }
.agb-dashboard-main .agbld-stat-label { color: var(--agb-text-muted); }
.agb-dashboard-main h1 { margin-top: 0; }

.agbld-coming-soon, .agbld-notice {
	background: var(--agb-surface);
	border: 1px dashed var(--agb-border);
	border-radius: var(--agb-radius);
	padding: 2rem;
	text-align: center;
	color: var(--agb-text-muted);
}

/* Release form / My Releases, re-skinned to match the dashboard surface. */
.agb-dashboard-main .agbld-release-form-wrap,
.agb-dashboard-main .agbld-my-releases,
.agb-dashboard-main .agbld-release-detail { max-width: none; }
.agb-dashboard-main .agbld-release-form-wrap input[type="text"],
.agb-dashboard-main .agbld-release-form-wrap input[type="date"],
.agb-dashboard-main .agbld-release-form-wrap select,
.agb-dashboard-main .agbld-release-form-wrap textarea {
	background: var(--agb-surface);
	color: var(--agb-text);
	border-color: var(--agb-border);
}
.agb-dashboard-main .agbld-track-row,
.agb-dashboard-main .agbld-release-card { background: var(--agb-surface); border-color: var(--agb-border); }
.agb-dashboard-main .agbld-detail-table th,
.agb-dashboard-main .agbld-detail-table td { border-color: var(--agb-border); }
.agb-dashboard-main .agbld-detail-table th { color: var(--agb-text-muted); }
.agb-dashboard-main .agbld-release-info span,
.agb-dashboard-main .agbld-current-file { color: var(--agb-text-muted); }
