/**
 * WP Top Bar — frontend styles.
 * Every selector is scoped to #wptb-bar; the ID's specificity is enough to
 * win over typical theme rules (element/class selectors) without !important,
 * which keeps the bar overridable by site owners and plain inline styles.
 */

#wptb-bar,
#wptb-bar * {
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
}

#wptb-bar {
	all: unset;
	display: block;
	position: relative;
	top: auto;
	left: 0;
	right: 0;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	min-height: var(--wptb-height, 44px);
	background-color: var(--wptb-bg, #0a0a0a);
	color: var(--wptb-color, #fff);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	text-align: left;
	direction: inherit;
	z-index: 100;
	float: none;
	clear: both;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
	list-style: none;
}

#wptb-bar.wptb-sticky {
	position: -webkit-sticky;
	position: sticky;
	top: 0;
}

body.admin-bar #wptb-bar.wptb-sticky {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar #wptb-bar.wptb-sticky {
		top: 46px;
	}
}

#wptb-bar .wptb-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 1200px;
	min-height: var(--wptb-height, 44px);
	margin: 0 auto;
	padding: 8px 44px 8px 16px;
	gap: 16px;
	position: relative;
}

#wptb-bar .wptb-content {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px 14px;
	margin: 0;
	padding: 0;
	flex: 1 1 auto;
	min-width: 0;
	text-align: center;
}

#wptb-bar .wptb-image,
#wptb-bar .wptb-image-link img {
	display: inline-block;
	width: auto;
	height: calc(var(--wptb-height, 44px) - 16px);
	max-height: 32px;
	object-fit: contain;
	border-radius: 0;
	margin: 0;
	padding: 0;
	vertical-align: middle;
}

/* Image-based bar mode: the image fills the entire bar. */
#wptb-bar.wptb-image-mode {
	padding: 0;
	overflow: hidden;
	line-height: 0;
	font-size: 0;
}

/*
 * The admin live preview keeps both the content row and the full-image link
 * in the DOM at all times and switches modes via the .wptb-image-mode class,
 * so both display states are scoped to that class.
 */
#wptb-bar.wptb-image-mode .wptb-inner {
	display: none;
}

#wptb-bar .wptb-full-image-link {
	display: none;
	width: 100%;
	height: var(--wptb-height, 44px);
	margin: 0;
	padding: 0;
	border: 0;
}

#wptb-bar.wptb-image-mode .wptb-full-image-link {
	display: block;
}

#wptb-bar .wptb-full-image {
	display: block;
	width: 100%;
	max-width: none;
	height: var(--wptb-height, 44px);
	object-fit: cover;
	object-position: center;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	vertical-align: top;
}

#wptb-bar.wptb-image-mode .wptb-close {
	background-color: rgba(0, 0, 0, 0.35);
	color: #fff;
	opacity: 1;
}

#wptb-bar.wptb-image-mode .wptb-close:hover,
#wptb-bar.wptb-image-mode .wptb-close:focus {
	background-color: rgba(0, 0, 0, 0.55);
}

#wptb-bar .wptb-text {
	display: inline;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
	font-weight: 400;
	margin: 0;
	padding: 0;
	background: none;
}

#wptb-bar .wptb-text a {
	color: inherit;
	text-decoration: underline;
	font: inherit;
}

#wptb-bar .wptb-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	white-space: nowrap;
	background-color: var(--wptb-btn-bg, #fff);
	color: var(--wptb-btn-color, #0a0a0a);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	padding: 7px 14px;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	transition: opacity 0.15s ease;
}

#wptb-bar .wptb-button:hover,
#wptb-bar .wptb-button:focus {
	opacity: 0.85;
	color: var(--wptb-btn-color, #0a0a0a);
	text-decoration: none;
}

#wptb-bar .wptb-close {
	all: unset;
	position: absolute;
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	color: inherit;
	opacity: 0.7;
	cursor: pointer;
	border-radius: 4px;
	transition: opacity 0.15s ease, background-color 0.15s ease;
}

#wptb-bar .wptb-close:hover,
#wptb-bar .wptb-close:focus {
	opacity: 1;
	background-color: rgba(127, 127, 127, 0.2);
	outline: none;
}

#wptb-bar .wptb-close svg {
	display: block;
	width: 12px;
	height: 12px;
}

@media screen and (max-width: 600px) {
	#wptb-bar .wptb-inner {
		padding: 10px 40px 10px 12px;
	}

	#wptb-bar .wptb-content {
		text-align: center;
	}
}
