﻿/* Sidebar (namespaced, no conflicts with layout.css) */
:root {
	--sidebar-bg: linear-gradient(180deg, #fffbf7 0%, #fff 100%);
	--item-text: #2d3748;
	--item-icon: #F26922; /* brand orange for icons */
	--item-muted: #64748b;
	--line: #fde4d8; /* warm border */
	--hover-bg: #fff5f0; /* warm hover */
	--active-bg: linear-gradient(135deg, #F26922 0%, #FF8B4D 100%); /* gradient active */
	--accent: #F26922;
	--shadow-warm: 0 2px 8px rgba(242, 105, 34, 0.08);
}

* {
	box-sizing: border-box;
}

.sidebar {
	width: 100%;
	min-height: 490px;
	padding: 20px 12px;
	background: var(--sidebar-bg);
	border-radius: 16px;
	box-shadow: var(--shadow-warm);
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

/* ==== RENAMED: .menu -> .side-menu ==== */
.side-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ==== RENAMED: .menu-item -> .side-menu__item ==== */
.side-menu__item {
	position: relative;
	margin-bottom: 4px;
}

	/* single separator line between items + bottom border on last */
	.side-menu__item + .side-menu__item {
		border-top: none;
	}

	.side-menu__item:last-child {
		border-bottom: none;
	}

/* ==== RENAMED: link rules -> .side-menu__link ==== */
.side-menu__link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 20px;
	color: var(--item-text);
	text-decoration: none;
	border-radius: 12px; /* rounded items */
	transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	font-weight: 600;
}

	/*.side-menu__link::before {
        content: "●";*/ /* Replace with actual icons */
	/*color: var(--item-icon);
        font-size: 18px;
        font-weight: bold;
        transition: transform .25s ease;
    }*/

	/* Arrow (SVG) — avoids missing glyphs */
	.side-menu__link::after {
		content: "";
		position: absolute;
		right: 12px;
		top: 50%;
		transform: translateY(-50%);
		width: 12px;
		height: 12px;
		background-repeat: no-repeat;
		background-position: center;
		background-size: 12px 12px;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
	}

	/* Hover state */
	.side-menu__link:hover {
		background: #ffffff;
		color: var(--primary);
		box-shadow: 0 4px 12px rgba(242, 105, 34, 0.15);
		transform: translateX(4px);
	}

		.side-menu__link:hover::after {
			transform: translateY(-50%) translateX(3px);
			background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F26922' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
		}


	/* Active/selected state (use .is-active on LI OR aria-current="page" on the link) */
	.side-menu__item.is-active > .side-menu__link,
	.side-menu__link[aria-current="page"] {
		background: var(--active-bg);
		color: #ffffff;
		box-shadow: 0 6px 16px rgba(242, 105, 34, 0.3);
	}

		.side-menu__item.is-active > .side-menu__link::after,
		.side-menu__link[aria-current="page"]::after {
			background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'/%3E%3C/svg%3E");
		}


		/* Left accent pill instead of bar */
		.side-menu__item.is-active > .side-menu__link::before,
		.side-menu__link[aria-current="page"]::before {
			box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
		}
		/* Left accent pill instead of bar */
		.side-menu__item.is-active > .side-menu__link::before,
		.side-menu__link[aria-current="page"]::before {
			box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
		}

	.side-menu__link:focus-visible {
		outline: 3px solid rgba(242, 105, 34, 0.4);
		outline-offset: 2px;
		box-shadow: 0 0 0 4px rgba(242, 105, 34, 0.1);
	}

	/* Keyboard focus */
	.side-menu__link:focus-visible {
		outline: 3px solid rgba(242, 105, 34, 0.4);
		outline-offset: 2px;
		box-shadow: 0 0 0 4px rgba(242, 105, 34, 0.1);
	}

/* Mobile guards */
@media (max-width: 640px) {
	.sidebar {
		display: block !important;
		width: 100% !important;
		min-height: auto !important;
		max-height: none !important;
	}
}
