/* gs2_header_react.css — Modern nav styles for React header
   Uses design tokens from gs2_allnew.css (:root custom properties) */

/* ============================================================================
   Top header bar (user menu area)
   ========================================================================== */

/* Override the fixed height from gs2.menu.css .toptbDiv */
.toptbDiv:has(.gs-top-toolbar) {
	height: auto;
}

.gs-top-toolbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	height: 36px;
	background: var(--gs-navy);
	padding: 0 24px;
	/* Break out of gridContainer to go full-width */
	width: 100vw;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
	box-sizing: border-box;
}

/* ============================================================================
   Logo + Nav row — full-width white background, content centered
   ========================================================================== */
.gs-header-row {
	display: flex;
	align-items: center;
	/* Break out to full browser width — eliminates the visible box edge */
	width: 100vw;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
	background: #fff;
	padding: 0 24px;
	box-sizing: border-box;
	border-bottom: 1px solid var(--gs-gray-200);
}

.gs-header-row-inner {
	display: flex;
	align-items: center;
	max-width: 1140px;
	width: 100%;
	margin: 0 auto;
	padding: 12px 0;
}

/* Override logo styles from gs2.menu.css when inside our header row */
.gs-header-row .header_logo {
	float: none;
	padding: 0;
	width: auto;
	flex-shrink: 0;
}

.gs-header-row .header_logo img {
	height: 44px;
	width: auto;
}

/* Override #header from gs2.menu.css when inside our header row */
.gs-header-row #header {
	float: none;
	margin-top: 0;
	flex: 1;
}

/* ============================================================================
   Main nav bar
   ========================================================================== */
.gs-main-toolbar {
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	flex: 1;
	flex-wrap: nowrap;
	gap: 2px;
}

/* ============================================================================
   Nav button — base
   ========================================================================== */
.gs-nav-btn {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--gs-gray-700);
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 10px 14px;
	position: relative;
	white-space: nowrap;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	line-height: 1;
	border-radius: var(--gs-radius-sm);
	transition: color var(--gs-transition-fast), background-color var(--gs-transition-fast);
}

.gs-nav-btn:hover {
	color: var(--gs-teal);
	background-color: var(--gs-gray-50);
}

/* Active state for open dropdown */
.gs-nav-btn-active {
	color: var(--gs-teal);
	background-color: var(--gs-gray-100);
}

/* ============================================================================
   Sign-in button — pill with teal accent
   ========================================================================== */
.gs-nav-btn-signin {
	color: #fff !important;
	background: var(--gs-teal) !important;
	border-radius: 100px;
	padding: 8px 22px;
	font-weight: 600;
	font-size: 12px;
	letter-spacing: 0.06em;
	margin-left: 6px;
	transition: background-color var(--gs-transition-fast), transform var(--gs-transition-fast), box-shadow var(--gs-transition-fast);
	box-shadow: 0 1px 3px rgba(0, 151, 167, 0.25);
}

.gs-nav-btn-signin:hover {
	background: #00838f !important;
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 3px 10px rgba(0, 151, 167, 0.35);
}

/* ============================================================================
   Top-bar link (Studio Lite, sits left of user button on navy bar)
   ========================================================================== */
a.gs-top-link,
a.gs-top-link:link,
a.gs-top-link:visited {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	padding: 6px 14px;
	margin-right: 4px;
	border-radius: var(--gs-radius-sm);
	white-space: nowrap;
	transition: color var(--gs-transition-fast), background-color var(--gs-transition-fast);
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

a.gs-top-link:hover,
a.gs-top-link:active,
a.gs-top-link:focus {
	color: #fff;
	background-color: rgba(255, 255, 255, 0.1);
	text-decoration: none;
}

/* ============================================================================
   User button (top-right, on navy bar)
   ========================================================================== */
.gs-user-btn {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.85);
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 6px 14px;
	position: relative;
	white-space: nowrap;
	border-radius: var(--gs-radius-sm);
	transition: color var(--gs-transition-fast), background-color var(--gs-transition-fast);
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.gs-user-btn:hover {
	color: #fff;
	background-color: rgba(255, 255, 255, 0.1);
}

/* ============================================================================
   User avatar circle
   ========================================================================== */
.gs-user-avatar {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--gs-teal);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-right: 8px;
	letter-spacing: 0;
	flex-shrink: 0;
}

/* ============================================================================
   Dropdown arrow caret
   ========================================================================== */
.gs-nav-arrow {
	font-size: 10px;
	margin-left: 5px;
	opacity: 0.5;
	transition: transform var(--gs-transition-fast), opacity var(--gs-transition-fast);
}

.gs-nav-btn:hover .gs-nav-arrow,
.gs-nav-btn-active .gs-nav-arrow {
	opacity: 0.8;
}

/* ============================================================================
   Dropdown panel
   ========================================================================== */
.gs-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	background: #fff;
	border: 1px solid var(--gs-gray-200);
	border-radius: var(--gs-radius);
	box-shadow: var(--gs-shadow-lg);
	z-index: 19000;
	min-width: 200px;
	padding: 6px;
	animation: gs-dropdown-in 0.15s ease-out;
}

/* User dropdown on navy bar — position from right */
.gs-dropdown-user {
	right: 0;
	left: auto;
}

@keyframes gs-dropdown-in {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ============================================================================
   Dropdown item
   ========================================================================== */
.gs-dropdown-item {
	display: block;
	width: 100%;
	text-align: left;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 13px;
	font-weight: 400;
	color: var(--gs-gray-700);
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 8px 12px;
	white-space: nowrap;
	text-decoration: none;
	box-sizing: border-box;
	border-radius: var(--gs-radius-sm);
	transition: color var(--gs-transition-fast), background-color var(--gs-transition-fast);
	line-height: 1.4;
}

.gs-dropdown-item:hover {
	background: var(--gs-gray-50);
	color: var(--gs-navy);
}

/* ============================================================================
   Dropdown separator
   ========================================================================== */
.gs-dropdown-separator {
	border: none;
	border-top: 1px solid var(--gs-gray-200);
	margin: 4px 8px;
}

/* ============================================================================
   Dropdown right-aligned (for items near right edge of viewport)
   ========================================================================== */
.gs-dropdown-right {
	left: auto;
	right: 0;
}

/* ============================================================================
   Submenu — flyout positioned to the right of parent (or left if flipped)
   ========================================================================== */
.gs-submenu {
	position: absolute;
	left: 100%;
	top: 0;
	background: #fff;
	border: 1px solid var(--gs-gray-200);
	border-radius: var(--gs-radius);
	box-shadow: var(--gs-shadow-lg);
	z-index: 19001;
	min-width: 220px;
	padding: 6px;
	animation: gs-dropdown-in 0.12s ease-out;
}

/* Submenu flipped to open leftward — no gap so mouse can reach it */
.gs-submenu-left {
	left: auto;
	right: 100%;
}

/* ============================================================================
   Submenu trigger — arrow indicator
   ========================================================================== */
.gs-dropdown-item-has-submenu {
	position: relative;
	padding-right: 28px;
}

.gs-dropdown-item-has-submenu::after {
	content: '\203A';
	font-size: 16px;
	font-weight: 300;
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--gs-gray-400);
	transition: color var(--gs-transition-fast), transform var(--gs-transition-fast);
}

.gs-dropdown-item-has-submenu:hover::after {
	color: var(--gs-teal);
	transform: translateY(-50%) translateX(2px);
}

/* ============================================================================
   Responsive — collapse nav on small screens
   ========================================================================== */
@media (max-width: 768px) {
	.gs-main-toolbar {
		flex-wrap: wrap;
		max-width: 100%;
		gap: 0;
	}
	.gs-nav-btn {
		padding: 8px 10px;
		font-size: 12px;
	}
	.gs-nav-btn-signin {
		padding: 7px 16px;
	}
}
