/**
 * BPO Order Theme — main stylesheet (source, pre-build).
 *
 * This is a placeholder entry point. As development progresses this file
 * should @import the partials under base/, layout/, components/, pages/,
 * and utilities/, and a build step should output the bundled, minified
 * result to /assets/dist/main.min.css for production enqueueing.
 */

:root {
	--bpo-color-primary: #2563eb;
	--bpo-color-primary-dark: #1d4ed8;
	--bpo-color-text: #1f2937;
	--bpo-color-text-muted: #6b7280;
	--bpo-color-bg: #f9fafb;
	--bpo-color-surface: #ffffff;
	--bpo-color-border: #e5e7eb;
	--bpo-color-focus: #93c5fd;

	--bpo-spacing-unit: 8px;
	--bpo-radius: 8px;
	--bpo-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
	--bpo-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);

	--bpo-header-height: 64px;
	--bpo-sidebar-width: 260px;
	--bpo-z-header: 100;
	--bpo-z-sidebar: 90;
	--bpo-z-dropdown: 110;
}

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

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

a {
	color: var(--bpo-color-primary);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* -----------------------------------------------------------------------
 * Skip link
 * ---------------------------------------------------------------------*/

.bpo-skip-link:focus {
	position: fixed;
	top: var(--bpo-spacing-unit);
	left: var(--bpo-spacing-unit);
	width: auto;
	height: auto;
	clip: auto;
	z-index: 1000;
	padding: 12px 16px;
	background: var(--bpo-color-surface);
	color: var(--bpo-color-text);
	border-radius: var(--bpo-radius);
	box-shadow: var(--bpo-shadow-md);
}

/* -----------------------------------------------------------------------
 * App shell
 * ---------------------------------------------------------------------*/

.bpo-app-shell {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* -----------------------------------------------------------------------
 * Site header
 * ---------------------------------------------------------------------*/

.bpo-site-header {
	position: sticky;
	top: 0;
	z-index: var(--bpo-z-header);
	height: var(--bpo-header-height);
	background: var(--bpo-color-surface);
	border-bottom: 1px solid var(--bpo-color-border);
}

.bpo-site-header__inner {
	height: 100%;
	max-width: 1600px;
	margin: 0 auto;
	padding: 0 calc(var(--bpo-spacing-unit) * 2);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: calc(var(--bpo-spacing-unit) * 2);
}

.bpo-site-header__start,
.bpo-site-header__end {
	display: flex;
	align-items: center;
	gap: calc(var(--bpo-spacing-unit) * 1.5);
}

.bpo-site-header__site-title {
	font-weight: 700;
	font-size: 1.125rem;
	text-decoration: none;
	color: var(--bpo-color-text);
}

.bpo-site-header__login-link {
	font-weight: 600;
	text-decoration: none;
}

.bpo-primary-nav__list {
	display: flex;
	gap: calc(var(--bpo-spacing-unit) * 2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.bpo-primary-nav__list a {
	text-decoration: none;
	color: var(--bpo-color-text);
	font-weight: 500;
}

@media (max-width: 782px) {
	.bpo-primary-nav {
		display: none;
	}
}

/* -----------------------------------------------------------------------
 * Mobile sidebar toggle
 * ---------------------------------------------------------------------*/

.bpo-sidebar-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	width: 40px;
	height: 40px;
	padding: 8px;
	background: transparent;
	border: 1px solid var(--bpo-color-border);
	border-radius: var(--bpo-radius);
	cursor: pointer;
}

.bpo-sidebar-toggle__bar {
	display: block;
	height: 2px;
	background: var(--bpo-color-text);
	border-radius: 1px;
}

.bpo-sidebar-toggle:focus-visible {
	outline: 2px solid var(--bpo-color-focus);
	outline-offset: 2px;
}

@media (max-width: 1024px) {
	.bpo-sidebar-toggle {
		display: flex;
	}
}

/* -----------------------------------------------------------------------
 * App body: sidebar + content wrapper
 * ---------------------------------------------------------------------*/

.bpo-app-body {
	flex: 1;
	display: flex;
	align-items: flex-start;
}

.bpo-sidebar {
	position: sticky;
	top: var(--bpo-header-height);
	width: var(--bpo-sidebar-width);
	flex-shrink: 0;
	height: calc(100vh - var(--bpo-header-height));
	background: var(--bpo-color-surface);
	border-right: 1px solid var(--bpo-color-border);
	overflow-y: auto;
	z-index: var(--bpo-z-sidebar);
}

.bpo-sidebar__nav {
	padding: calc(var(--bpo-spacing-unit) * 2);
}

.bpo-sidebar__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.bpo-sidebar__list a {
	display: block;
	padding: 10px 12px;
	border-radius: var(--bpo-radius);
	text-decoration: none;
	color: var(--bpo-color-text);
	font-weight: 500;
}

.bpo-sidebar__list a:hover,
.bpo-sidebar__list a:focus-visible {
	background: var(--bpo-color-bg);
}

.bpo-sidebar__placeholder {
	color: var(--bpo-color-text-muted);
	font-size: 0.875rem;
}

.bpo-content-wrapper {
	flex: 1;
	min-width: 0;
	padding: calc(var(--bpo-spacing-unit) * 3);
}

@media (max-width: 1024px) {
	.bpo-sidebar {
		position: fixed;
		top: var(--bpo-header-height);
		left: 0;
		transform: translateX(-100%);
		transition: transform 0.2s ease-in-out;
		box-shadow: var(--bpo-shadow-md);
	}

	.bpo-app-body.bpo-sidebar-is-open .bpo-sidebar {
		transform: translateX(0);
	}

	.bpo-content-wrapper {
		padding: calc(var(--bpo-spacing-unit) * 2);
	}
}

/* -----------------------------------------------------------------------
 * Breadcrumbs
 * ---------------------------------------------------------------------*/

.bpo-breadcrumbs__list {
	list-style: none;
	margin: 0 0 calc(var(--bpo-spacing-unit) * 2);
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 0.875rem;
	color: var(--bpo-color-text-muted);
}

.bpo-breadcrumbs__item:not(:last-child)::after {
	content: "/";
	margin-left: 6px;
	color: var(--bpo-color-border);
}

.bpo-breadcrumbs__link {
	text-decoration: none;
	color: var(--bpo-color-text-muted);
}

.bpo-breadcrumbs__link:hover {
	color: var(--bpo-color-primary);
}

.bpo-breadcrumbs__item--current {
	color: var(--bpo-color-text);
	font-weight: 500;
}

/* -----------------------------------------------------------------------
 * Dropdowns (notification + profile)
 * ---------------------------------------------------------------------*/

.bpo-dropdown {
	position: relative;
}

.bpo-dropdown__toggle {
	display: flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: 1px solid transparent;
	border-radius: var(--bpo-radius);
	padding: 6px 8px;
	cursor: pointer;
}

.bpo-dropdown__toggle:hover,
.bpo-dropdown__toggle[aria-expanded="true"] {
	background: var(--bpo-color-bg);
	border-color: var(--bpo-color-border);
}

.bpo-dropdown__toggle:focus-visible {
	outline: 2px solid var(--bpo-color-focus);
	outline-offset: 2px;
}

.bpo-dropdown__panel {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 280px;
	background: var(--bpo-color-surface);
	border: 1px solid var(--bpo-color-border);
	border-radius: var(--bpo-radius);
	box-shadow: var(--bpo-shadow-md);
	z-index: var(--bpo-z-dropdown);
}

.bpo-dropdown__header {
	padding: calc(var(--bpo-spacing-unit) * 1.5) calc(var(--bpo-spacing-unit) * 2);
	border-bottom: 1px solid var(--bpo-color-border);
}

.bpo-dropdown__title {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
}

.bpo-dropdown__body {
	padding: calc(var(--bpo-spacing-unit) * 2);
}

.bpo-notification-dropdown__icon {
	width: 20px;
	height: 20px;
	border: 2px solid var(--bpo-color-text);
	border-radius: 50%;
	display: inline-block;
}

.bpo-notification-dropdown__empty {
	margin: 0;
	color: var(--bpo-color-text-muted);
	font-size: 0.875rem;
}

.bpo-profile-dropdown__avatar {
	border-radius: 50%;
	display: block;
}

.bpo-profile-dropdown__name {
	font-weight: 500;
	font-size: 0.875rem;
}

@media (max-width: 600px) {
	.bpo-profile-dropdown__name {
		display: none;
	}
}

.bpo-profile-dropdown__caret {
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--bpo-color-text-muted);
	border-bottom: 2px solid var(--bpo-color-text-muted);
	transform: rotate(45deg);
}

.bpo-profile-dropdown__list {
	list-style: none;
	margin: 0;
	padding: calc(var(--bpo-spacing-unit) * 1);
}

.bpo-profile-dropdown__list a {
	display: block;
	padding: 8px 12px;
	border-radius: var(--bpo-radius);
	text-decoration: none;
	color: var(--bpo-color-text);
	font-size: 0.9375rem;
}

.bpo-profile-dropdown__list a:hover,
.bpo-profile-dropdown__list a:focus-visible {
	background: var(--bpo-color-bg);
}

/* -----------------------------------------------------------------------
 * Site footer
 * ---------------------------------------------------------------------*/

.bpo-site-footer {
	border-top: 1px solid var(--bpo-color-border);
	background: var(--bpo-color-surface);
}

.bpo-site-footer__inner {
	max-width: 1600px;
	margin: 0 auto;
	padding: calc(var(--bpo-spacing-unit) * 2);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: calc(var(--bpo-spacing-unit) * 2);
	font-size: 0.875rem;
	color: var(--bpo-color-text-muted);
}

.bpo-footer-nav__list {
	display: flex;
	gap: calc(var(--bpo-spacing-unit) * 2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.bpo-footer-nav__list a {
	color: var(--bpo-color-text-muted);
	text-decoration: none;
}
