/**
 * Fixed Nav — PC 우측 세로 패널 / MO 하단 3버튼.
 * Breakpoints: base (PC) → 767
 *
 * @package Lhour
 */

.fixed-nav {
	--fnav-green: var(--color-primary, #00b28a);
	--fnav-ink: var(--color-neutral-8, #1e1e1e);
	position: fixed;
	right: 24px;
	bottom: 170px;
	z-index: 200;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	pointer-events: none;
}

.fixed-nav__panel {
	display: none;
	flex-direction: column;
	align-items: stretch;
	box-sizing: border-box;
	width: 148px;
	padding: 18px 12px 14px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.9);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
	pointer-events: auto;
}

.fixed-nav.is-open .fixed-nav__panel {
	display: flex;
}

.fixed-nav__brand {
	display: flex;
	justify-content: center;
	margin: 0 0 14px;
}

.fixed-nav__brand-logo {
	display: block;
	width: 100px;
	height: 17px;
	background-color: var(--fnav-green);
	object-fit: none;
	object-position: 0 -999px;
	-webkit-mask-image: url("../images/logo.svg");
	mask-image: url("../images/logo.svg");
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

.fixed-nav__list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.fixed-nav__item {
	margin: 0;
}

.fixed-nav__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-sizing: border-box;
	width: 100%;
	min-height: 40px;
	padding: 8px 12px 8px 14px;
	border: calc(1px / 0.9) solid var(--color-neutral-2, #ebebeb);
	border-radius: 10px;
	background: var(--color-neutral-1, #ffffff);
	color: var(--fnav-ink);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.fixed-nav__link.is-accent {
	border-color: var(--fnav-green);
	background: var(--fnav-green);
	color: #ffffff;
}

.fixed-nav__link:hover,
.fixed-nav__link:focus-visible {
	border-width: calc(2px / 0.9);
	border-color: var(--fnav-green);
	color: var(--fnav-green);
	outline: none;
}

.fixed-nav__link.is-accent:hover,
.fixed-nav__link.is-accent:focus-visible {
	border-color: #007a5e;
	background: var(--fnav-green);
	color: #ffffff;
}

.fixed-nav__link-text {
	min-width: 0;
}

.fixed-nav__chevron {
	display: block;
	flex-shrink: 0;
	width: 14px;
	height: 14px;
}

.fixed-nav__collapse {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	margin: 12px auto 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--color-neutral-5, #737373);
	font-size: 13px;
	line-height: 1.4;
	cursor: pointer;
	pointer-events: auto;
}

.fixed-nav__collapse:hover,
.fixed-nav__collapse:focus-visible {
	color: var(--fnav-ink);
	outline: none;
}

.fixed-nav__collapse-x {
	font-size: 15px;
	line-height: 1;
}

.fixed-nav__tab {
	display: none;
	align-items: center;
	justify-content: center;
	width: 88px;
	height: 88px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: var(--fnav-green);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
	color: #ffffff;
	cursor: pointer;
	line-height: 1;
	pointer-events: auto;
}

.fixed-nav:not(.is-open) .fixed-nav__tab {
	display: flex;
}

.fixed-nav__tab-logo {
	display: block;
	width: 58px;
	height: auto;
	filter: brightness(0) invert(1);
}

.fixed-nav__mo {
	display: none;
}

@media all and (max-width: 767px) {
	.fixed-nav {
		right: 0;
		bottom: 0;
		left: 0;
		align-items: stretch;
	}

	.fixed-nav__panel,
	.fixed-nav__tab,
	.fixed-nav.is-open .fixed-nav__panel,
	.fixed-nav:not(.is-open) .fixed-nav__tab {
		display: none;
	}

	.fixed-nav__mo {
		display: flex;
		align-items: stretch;
		box-sizing: border-box;
		width: 100%;
		padding: 0 calc(8px + env(safe-area-inset-bottom, 0px));
		border: 0;
		border-radius: 10px 10px 0 0;
		background: #ffffff;
		box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.08);
		pointer-events: auto;
	}

	.fixed-nav__mo-link {
		flex: 1 1 0;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		min-width: 0;
		min-height: 64px;
		padding: 8px 4px;
		border: 0;
		border-radius: 0;
		background: transparent;
		color: var(--fnav-green);
		font-size: 16px;
		font-weight: 700;
		line-height: 1.3;
		letter-spacing: -0.02em;
		text-align: center;
		text-decoration: none;
	}

	.fixed-nav__mo-link.is-accent {
		position: relative;
		flex: 1.3 1 0;
		padding: 10px 16px;
		border-radius: 5px;
		background: var(--fnav-green);
		color: #ffffff;
	}

	.fixed-nav__mo-text {
		display: block;
	}

	.fixed-nav__mo-link .fixed-nav__chevron {
		position: absolute; top: 50%; right: 12px;
		transform: translateY(-50%);
		width: 18px;
		height: 18px;
		stroke-width: 2.2;
	}

	body:has(.fixed-nav__mo) {
		padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
	}
}
