/**
 * B2B Restposten Marktplatz - Global Navigation Account Dropdown & Notification Bell Styles
 *
 * Loaded globally across the site when the top menu account dropdown or floating notification bell is active.
 */

.b2b-nav-menu-item.b2b-menu-logged-in a {
	color: #16a34a !important;
}
.b2b-nav-menu-item.b2b-menu-logged-in a:hover {
	color: #15803d !important;
}

/* ==========================================================================
   B2B Notification Bell & Alerts
   ========================================================================== */
@keyframes b2b-bell-ring {
	0% { transform: rotate(0); }
	15% { transform: rotate(14deg); }
	30% { transform: rotate(-12deg); }
	45% { transform: rotate(10deg); }
	60% { transform: rotate(-8deg); }
	75% { transform: rotate(4deg); }
	100% { transform: rotate(0); }
}

@keyframes b2b-badge-pulse {
	0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
	70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
	100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes b2b-toast-slide-in {
	0% { transform: translateY(20px) scale(0.92); opacity: 0; }
	100% { transform: translateY(0) scale(1); opacity: 1; }
}

.b2b-bell-ringing .b2b-bell-icon {
	display: inline-block;
	animation: b2b-bell-ring 0.8s ease infinite;
	transform-origin: top center;
}

.b2b-bell-badge.has-unread,
.b2b-nav-bell-badge.has-unread {
	animation: b2b-badge-pulse 2s infinite;
}

.b2b-bell-wrapper {
	position: relative;
	display: inline-block;
}

.b2b-bell-trigger-btn {
	position: relative;
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 18px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #334155;
	transition: all 0.2s ease;
	line-height: 1;
}
.b2b-bell-trigger-btn:hover {
	background: #f1f5f9;
	border-color: #94a3b8;
	color: #0f172a;
}

.b2b-bell-badge {
	position: absolute;
	top: -6px;
	right: -6px;
	background: #ef4444;
	color: #ffffff;
	font-size: 11px;
	font-weight: 800;
	padding: 2px 6px;
	border-radius: 10px;
	line-height: 1;
	border: 2px solid #ffffff;
	box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.b2b-nav-bell-badge {
	background: #ef4444;
	color: #ffffff;
	font-size: 10.5px;
	font-weight: 800;
	padding: 2px 6px;
	border-radius: 10px;
	line-height: 1;
	vertical-align: middle;
	margin-left: 2px;
}

.b2b-bell-dropdown {
	display: none;
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	width: 340px;
	max-width: 90vw;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 15px 30px -5px rgba(0,0,0,0.15);
	z-index: 99999;
	overflow: hidden;
	text-align: left;
}

/* Floating Bottom Notification Bell */
.b2b-floating-bell-wrap {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 100000;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	transition: bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Keep floating bell above OceanWP sticky bottom order panel */
body:has(.owp-floating-bar.show) .b2b-floating-bell-wrap,
body.b2b-floating-bar-active .b2b-floating-bell-wrap {
	bottom: 84px !important;
}

@media screen and (max-width: 900px) {
	body:has(.owp-floating-bar.show) .b2b-floating-bell-wrap,
	body.b2b-floating-bar-active .b2b-floating-bell-wrap {
		bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
	}
}

/* Coordinate OceanWP #scroll-top button above the floating bell */
body:has(#b2b-global-notification-bell) #scroll-top {
	bottom: 90px !important;
	transition: bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body:has(#b2b-global-notification-bell):has(.owp-floating-bar.show) #scroll-top,
body.b2b-floating-bar-active:has(#b2b-global-notification-bell) #scroll-top,
body.b2b-floating-bar-active.logged-in #scroll-top {
	bottom: 150px !important;
}
.b2b-floating-bell-btn {
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: #2563eb;
	color: #ffffff;
	border: none;
	box-shadow: 0 10px 25px -3px rgba(37, 99, 235, 0.45), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 24px;
	position: relative;
	transition: all 0.2s ease;
}
.b2b-floating-bell-btn:hover {
	transform: scale(1.06);
	background: #1d4ed8;
}
.b2b-floating-bell-btn .b2b-bell-badge {
	top: -3px;
	right: -3px;
	font-size: 11.5px;
	padding: 3px 6px;
}
.b2b-floating-popover {
	display: none;
	position: absolute;
	bottom: calc(100% + 12px);
	right: 0;
	width: 350px;
	max-width: calc(100vw - 32px);
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	box-shadow: 0 20px 30px -5px rgba(0,0,0,0.2);
	overflow: hidden;
}

.b2b-notification-item {
	display: flex;
	gap: 10px;
	padding: 11px 14px;
	border-bottom: 1px solid #f1f5f9;
	text-decoration: none !important;
	color: inherit !important;
	transition: background 0.15s ease;
	align-items: center;
}
.b2b-notification-item:hover {
	background: #f8fafc !important;
}
.b2b-notification-item.unread {
	background: #eff6ff !important;
}
.b2b-notification-item.unread:hover {
	background: #dbeafe !important;
}

/* Toast alert */
.b2b-notification-toast {
	position: fixed;
	bottom: 90px;
	right: 24px;
	z-index: 100001;
	background: #0f172a;
	color: #ffffff;
	border-radius: 10px;
	padding: 12px 18px;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
	font-size: 13.5px;
	display: flex;
	align-items: center;
	gap: 10px;
	animation: b2b-toast-slide-in 0.3s ease;
	transition: bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	cursor: pointer;
	max-width: 340px;
}

body:has(.owp-floating-bar.show) .b2b-notification-toast,
body.b2b-floating-bar-active .b2b-notification-toast {
	bottom: 150px;
}

/* ==========================================================================
   Unified "Mein Konto" Navigation Item & Modern Hover Dropdown Styles
   ========================================================================== */
.b2b-nav-account-item,
.b2b-nav-bell-item {
	position: relative !important;
	list-style: none !important;
}

/* Hide duplicate theme arrows on our account item */
.b2b-nav-account-item > a > .nav-arrow,
.b2b-nav-account-item > a > .dropdown-toggle,
.b2b-nav-account-item > a > i.fa-angle-down {
	display: none !important;
}

.b2b-nav-account-item .b2b-nav-account-link {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	text-decoration: none !important;
	transition: color 0.15s ease !important;
	font-weight: 700 !important;
	cursor: pointer !important;
}

.b2b-nav-caret {
	font-size: 9px !important;
	opacity: 0.6;
	transition: transform 0.2s ease !important;
	display: inline-block !important;
	line-height: 1 !important;
}

.b2b-nav-account-item:hover .b2b-nav-caret {
	transform: rotate(180deg) !important;
}

/* Notification Bell */
.b2b-nav-bell-link {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	position: relative !important;
	text-decoration: none !important;
	padding: 0 8px !important;
	transition: transform 0.2s ease !important;
}

.b2b-nav-bell-link:hover {
	transform: scale(1.1) !important;
}

.b2b-nav-bell-badge {
	position: absolute !important;
	top: 2px !important;
	right: 0 !important;
	background: #ef4444 !important;
	color: #ffffff !important;
	font-size: 10px !important;
	font-weight: 800 !important;
	line-height: 1 !important;
	padding: 2.5px 5.5px !important;
	border-radius: 10px !important;
	box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4) !important;
	border: 2px solid #ffffff !important;
}

/* Dropdown Container */
.b2b-account-nav-dropdown {
	display: block !important;
	position: absolute !important;
	top: calc(100% + 10px) !important;
	right: 0 !important;
	left: auto !important;
	width: 320px !important;
	min-width: 320px !important;
	max-width: calc(100vw - 20px) !important;
	background: #ffffff !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 14px !important;
	box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
	z-index: 99999999 !important;
	overflow: visible !important;
	text-align: left !important;
	padding: 0 !important;
	margin: 0 !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	line-height: 1.4 !important;
	box-sizing: border-box !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
	transform: translateY(8px) scale(0.98) !important;
	transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s !important;
}

/* Dropdown Top Arrow */
.b2b-account-nav-dropdown::after {
	content: "" !important;
	position: absolute !important;
	top: -6px !important;
	right: 28px !important;
	width: 12px !important;
	height: 12px !important;
	background: #f8fafc !important;
	border-left: 1px solid #e2e8f0 !important;
	border-top: 1px solid #e2e8f0 !important;
	transform: rotate(45deg) !important;
	z-index: 2 !important;
}

/* Invisible hover bridge */
.b2b-account-nav-dropdown::before {
	content: "" !important;
	position: absolute !important;
	top: -16px !important;
	left: 0 !important;
	width: 100% !important;
	height: 16px !important;
	display: block !important;
	background: transparent !important;
	z-index: 1 !important;
}

/* Show dropdown on hover or focus */
.b2b-nav-account-item:hover .b2b-account-nav-dropdown,
.b2b-nav-account-item:focus-within .b2b-account-nav-dropdown,
.b2b-account-nav-dropdown:hover {
	opacity: 1 !important;
	visibility: visible !important;
	pointer-events: auto !important;
	transform: translateY(0) scale(1) !important;
}

.b2b-dropdown-header {
	position: relative !important;
	z-index: 3 !important;
	padding: 14px 18px !important;
	background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
	border-bottom: 1px solid #e2e8f0 !important;
	border-radius: 13px 13px 0 0 !important;
	box-sizing: border-box !important;
}

.b2b-dropdown-userinfo {
	display: flex !important;
	flex-direction: column !important;
	gap: 4px !important;
}

.b2b-dropdown-name {
	font-weight: 800 !important;
	font-size: 14.5px !important;
	color: #0f172a !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	line-height: 1.2 !important;
}

.b2b-dropdown-badge {
	display: inline-flex !important;
	align-items: center !important;
	gap: 4px !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	padding: 2px 8px !important;
	border-radius: 12px !important;
	line-height: 1.3 !important;
	width: fit-content !important;
}

.b2b-badge-seller {
	background: #dcfce7 !important;
	color: #15803d !important;
	border: 1px solid #86efac !important;
}

.b2b-badge-customer {
	background: #eff6ff !important;
	color: #1d4ed8 !important;
	border: 1px solid #bfdbfe !important;
}

.b2b-dropdown-body {
	padding: 6px 0 !important;
	box-sizing: border-box !important;
	background: #ffffff !important;
	border-radius: 0 0 13px 13px !important;
}

.b2b-dropdown-cta-btn {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
	color: #ffffff !important;
	font-weight: 700 !important;
	font-size: 13.5px !important;
	padding: 10px 16px !important;
	border-radius: 8px !important;
	text-decoration: none !important;
	box-shadow: 0 4px 10px -2px rgba(37, 99, 235, 0.35) !important;
	transition: all 0.15s ease !important;
	box-sizing: border-box !important;
}

.b2b-dropdown-cta-btn:hover {
	transform: translateY(-1px) !important;
	box-shadow: 0 6px 14px -2px rgba(37, 99, 235, 0.45) !important;
	color: #ffffff !important;
	filter: brightness(1.06) !important;
}

.b2b-dropdown-heading {
	padding: 8px 18px 4px 18px !important;
	font-size: 11px !important;
	font-weight: 800 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
	color: #94a3b8 !important;
	box-sizing: border-box !important;
}

/* Strict resets for dropdown item links against theme styles */
#site-navigation-wrap .b2b-account-nav-dropdown a,
#site-navigation .b2b-account-nav-dropdown a,
.navbar .b2b-account-nav-dropdown a,
.b2b-account-nav-dropdown a {
	height: auto !important;
	min-height: 0 !important;
	line-height: 1.4 !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	margin: 0 !important;
	box-sizing: border-box !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif !important;
}

.b2b-dropdown-item {
	display: flex !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 10px !important;
	padding: 9px 18px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #334155 !important;
	text-decoration: none !important;
	line-height: 1.4 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	transition: all 0.15s ease !important;
	border: none !important;
	background: transparent !important;
	box-sizing: border-box !important;
}

.b2b-dropdown-item:hover {
	background: #f1f5f9 !important;
	color: #2563eb !important;
	padding-left: 21px !important;
}

.b2b-item-icon {
	font-size: 15px !important;
	width: 18px !important;
	text-align: center !important;
	flex-shrink: 0 !important;
	line-height: 1 !important;
}

.b2b-item-text {
	flex: 1 !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
}

.b2b-dropdown-sep {
	height: 1px !important;
	background: #f1f5f9 !important;
	margin: 6px 0 !important;
}

.b2b-item-badge {
	background: #ef4444 !important;
	color: #ffffff !important;
	font-size: 10.5px !important;
	font-weight: 800 !important;
	padding: 2px 7px !important;
	border-radius: 10px !important;
	line-height: 1.2 !important;
	margin-left: auto !important;
}

.b2b-item-highlight {
	font-weight: 700 !important;
	color: #2563eb !important;
}

.b2b-item-logout {
	color: #dc2626 !important;
}

.b2b-item-logout:hover {
	background: #fef2f2 !important;
	color: #b91c1c !important;
}

.b2b-dropdown-upgrade-card {
	margin: 8px 12px !important;
	padding: 12px 14px !important;
	background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
	border: 1px solid #bfdbfe !important;
	border-radius: 10px !important;
	box-sizing: border-box !important;
}

.b2b-dropdown-upgrade-card .b2b-upgrade-header {
	font-weight: 800 !important;
	font-size: 13px !important;
	color: #1e40af !important;
	display: flex !important;
	align-items: center !important;
	gap: 6px !important;
	margin-bottom: 3px !important;
}

.b2b-dropdown-upgrade-card p {
	font-size: 11.5px !important;
	color: #475569 !important;
	margin: 0 0 8px 0 !important;
	line-height: 1.4 !important;
}

.b2b-dropdown-upgrade-card .b2b-upgrade-btn {
	display: block !important;
	text-align: center !important;
	background: #2563eb !important;
	color: #ffffff !important;
	padding: 7px 12px !important;
	border-radius: 6px !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	text-decoration: none !important;
	transition: background 0.15s ease !important;
	box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2) !important;
}

.b2b-dropdown-upgrade-card .b2b-upgrade-btn:hover {
	background: #1d4ed8 !important;
	color: #ffffff !important;
}
