/**
 * Public-facing styles for Estland Top Bar
 *
 * @package    EstlandTopBar
 * @subpackage EstlandTopBar/public
 */

.esttb-top-bar {
	position: fixed;
	left: 0;
	right: 0;
	width: 100%;
	padding: 0;
	margin: 0;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease-in-out;
	z-index: 9999;
}

.esttb-top-bar.esttb-position-top {
	top: 0;
}

.esttb-top-bar.esttb-position-bottom {
	bottom: 0;
}

.esttb-top-bar.esttb-hidden {
	transform: translateY(-100%);
}

.esttb-top-bar.esttb-position-bottom.esttb-hidden {
	transform: translateY(100%);
}

.esttb-container {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px 20px;
	max-width: 100%;
	margin: 0 auto;
	position: relative;
}

.esttb-content {
	flex: 1;
	text-align: center;
	font-size: 14px;
	line-height: 1.5;
}

.esttb-content p {
	margin: 0;
	padding: 0;
	display: inline;
}

/* Style links within the announcement message */
.esttb-content a {
	color: inherit;
	text-decoration: underline;
	transition: opacity 0.2s ease;
}

.esttb-content a:hover {
	opacity: 0.8;
}

.esttb-link {
	text-decoration: underline;
	margin-left: 10px;
	font-weight: 600;
	transition: opacity 0.2s ease;
}

.esttb-link:hover {
	opacity: 0.8;
}

.esttb-dismiss {
	background: transparent;
	border: none;
	color: inherit;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	margin-left: 15px;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.7;
	transition: opacity 0.2s ease;
	flex-shrink: 0;
}

.esttb-dismiss:hover {
	opacity: 1;
}

.esttb-dismiss:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Enfold theme compatibility - push content down */
/* Padding will be set dynamically by JavaScript via body.esttb-top-bar-active */

/* Ensure smooth transition when bar appears/disappears */
body {
	transition: padding-top 0.3s ease-in-out, padding-bottom 0.3s ease-in-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.esttb-container {
		padding: 10px 15px;
		flex-wrap: wrap;
	}

	.esttb-content {
		font-size: 13px;
		width: 100%;
		margin-bottom: 5px;
	}

	.esttb-dismiss {
		position: absolute;
		top: 5px;
		right: 5px;
		margin: 0;
	}

	.esttb-link {
		display: block;
		margin-left: 0;
		margin-top: 5px;
	}
}
