/* style the announcement banner */
.phpbb_announcement {
	font-size: 0.85rem;
	position: relative;
	z-index: 0;
	margin: 10px 0;
	padding: 12px 16px;
	border-radius: 0.75rem;
	border: 1px solid #e5e7eb;
	border-left: 4px solid rgba(var(--color-primary, 15 23 42), 1);
	background-color: #fff; /* default color (overridden below if ACP sets a custom one) */
	color: #1f2937;
}

/* dark mode: ignore the admin-picked background colour (a single hex value can't
   know about both themes) and force a legible dark surface instead */
:is(.dark .phpbb_announcement) {
	border-color: rgb(2 6 23 / 0.2);
	border-left-color: rgba(var(--color-primary-dark, 15 23 42), 1);
	background-color: #0f172a !important;
	color: #e5e7eb !important;
}

/* zero out any text margins and scroll any overflow */
.phpbb_announcement div {
	font-size: 0.75rem;
	line-height: 1.25rem;
	overflow: auto hidden;
	margin: 0;
	color: inherit;
}

/* links / call-to-action inside the announcement (e.g. "S'inscrire", "Se connecter") */
.phpbb_announcement a {
	color: rgba(var(--color-primary, 15 23 42), 1);
	font-weight: 600;
}

:is(.dark .phpbb_announcement) a {
	color: rgba(var(--color-primary-dark, 96 165 250), 1);
}

/* make posted images responsive */
.phpbb_announcement .postimage {
	-moz-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
	max-width: 100%;
}

/* style the close button */
.phpbb_announcement .close {
	opacity: 0.6;
	position: absolute;
	z-index: 1;
	top: 4px;
	right: 4px;
	left: auto;
	color: inherit;
}

/* reposition close button for right-to-left languages */
.rtl .phpbb_announcement .close {
	right: auto;
	left: 4px;
}

/* hide close button on desktops by default */
.notouch .phpbb_announcement .close {
	opacity: 0;
	transition: opacity 0.5s;
}

/* display the close button on mouse-over of the banner */
.notouch .phpbb_announcement:hover .close {
	opacity: 0.6;
}

/* fix for lists, force them to display inside containing div */
.phpbb_announcement ul,
.phpbb_announcement ol {
	margin-left: 20px;
}

.rtl .phpbb_announcement ul,
.rtl .phpbb_announcement ol {
	margin-right: 20px;
	margin-left: 0;
}
