/*
 * IKS — theme-wide tweaks that don't belong inside a widget or page-specific
 * stylesheet. Enqueued by iks_enqueue_styles() in functions.php as
 * `iks-custom`, depending on `iks-widgets-base`.
 */

/* ── External-link indicator on header menu items ──────────────────────────
 *
 * Any header / buddypanel menu item whose anchor has target="_blank" gets a
 * small "open in new tab" glyph after the label. The icon picks up the
 * current text color via `mask-image`, so it tracks the link's color in both
 * desktop and BB-panel contexts without needing a separate fill rule.
 *
 * Scoped to the two primary-menu containers so footer / profile / widget
 * menus aren't affected. Accessibility note: the target="_blank" + the
 * `rel="noopener noreferrer"` attribute already give assistive tech the
 * cue that this link leaves the page; the visual icon is for sighted users
 * scanning the nav.
 */
#primary-menu        .menu-item > a[target="_blank"]::after,
.bb-primary-menu     .menu-item > a[target="_blank"]::after {
	content: "";
	display: inline-block;
	width: 0.7em;
	height: 0.7em;
	margin-left: 0.4em;
	vertical-align: -0.05em;
	background-color: currentColor;
	opacity: 0.65;
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z'/><path d='M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.11.89 2 2 2h14c1.1 0 2-.89 2-2v-7h-2z'/></svg>");
	        mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z'/><path d='M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.11.89 2 2 2h14c1.1 0 2-.89 2-2v-7h-2z'/></svg>");
	-webkit-mask-repeat: no-repeat;
	        mask-repeat: no-repeat;
	-webkit-mask-position: center;
	        mask-position: center;
	-webkit-mask-size: contain;
	        mask-size: contain;
	transition: opacity .15s ease;
}
#primary-menu     .menu-item > a[target="_blank"]:hover::after,
.bb-primary-menu  .menu-item > a[target="_blank"]:hover::after {
	opacity: 0.9;
}

/* ── Mobile burger panel polish ────────────────────────────────────────────
 *
 * The BB mobile-panel walker injects a generic `bb-icon-file` glyph next to
 * every menu item, which looks like a placeholder more than a brand cue.
 * Hide it and reclaim the padding.
 *
 * Below the menu, `inc/mobile-panel-auth.php` appends an auth-buttons row
 * (Sign In / Sign Up when logged out; Log Out when logged in). Style it
 * to the IKS brand — purple→magenta gradient primary, outline secondary,
 * pill-shaped, no cream backgrounds.
 */
.bb-mobile-panel-inner .bb-icon-file,
.mobile-menu          .bb-icon-file {
	display: none !important;
}
.bb-mobile-panel-inner .menu-item > a,
.mobile-menu          .menu-item > a {
	padding-left: 15px;
}

.bb-mobile-panel-inner {
	display: flex;
	flex-direction: column;
}
.iks-mobile-panel-auth {
	margin-top: auto;
	padding: 20px;
	border-top: 1px solid rgba(45, 17, 56, 0.08);
	display: flex;
	gap: 10px;
}
.iks-mobile-panel-auth a {
	flex: 1;
	text-align: center;
	padding: 10px 14px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	transition: opacity 0.15s ease, background-color 0.15s ease;
}
.iks-mobile-panel-auth__primary {
	background: linear-gradient(135deg, var(--iks-purple, #8125A5), var(--iks-magenta, #AE0083));
	color: #fff;
}
.iks-mobile-panel-auth__primary:hover {
	opacity: 0.92;
	color: #fff;
}
.iks-mobile-panel-auth__secondary {
	border: 1px solid rgba(129, 37, 165, 0.35);
	color: var(--iks-purple, #8125A5);
	background: transparent;
}
.iks-mobile-panel-auth__secondary:hover {
	background: rgba(129, 37, 165, 0.06);
	color: var(--iks-purple, #8125A5);
}
