/* ---------------------------------------------------------------------------
 * Account page notices (login, register, password reset, resend activation).
 *
 * FluxCP prints these as <p class="red"> and <p class="message">. custom.min.css
 * carries a rule for them but no page ever links that file, so every warning
 * rendered as bare text on top of the background artwork and was effectively
 * unreadable. These rules restyle the existing markup, so no PHP had to change
 * and every account page is covered at once.
 * ------------------------------------------------------------------------- */

p.red,
p.message {
	position: relative;
	z-index: 20;
	box-sizing: border-box;
	max-width: 560px;
	margin: 22px auto;
	padding: 17px 22px 17px 62px;

	/* The theme's display face is a pixel font that is hard to read at body
	   size. Notices are the one place where legibility beats styling. */
	font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.45;
	text-align: left;
	text-shadow: none;
	letter-spacing: .2px;

	/* Theme rules set a dark colour on generic paragraphs, so this has to win
	   outright - including the webkit fill that overrides `color` on its own. */
	color: #fff !important;
	-webkit-text-fill-color: #fff;

	border-radius: 10px;
	box-shadow: 0 12px 34px rgba(0, 0, 0, .45),
	            inset 0 1px 0 rgba(255, 255, 255, .22);
	animation: fluxNoticeIn .34s cubic-bezier(.2, .9, .3, 1.25) both;
}

p.red {
	background: linear-gradient(180deg, #d8304f 0%, #a30f2c 100%);
	border: 1px solid #7d0b21;
}

p.message {
	background: linear-gradient(180deg, #1ea2c2 0%, #10708a 100%);
	border: 1px solid #0b5568;
}

/* Round badge on the left. Drawn in CSS so the notice needs no image and no
   icon font - Font Awesome loads from an external host and can be blocked. */
p.red::before,
p.message::before {
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #fff;
	font-family: "Segoe UI", Arial, sans-serif;
	font-size: 20px;
	font-weight: 800;
	line-height: 30px;
	text-align: center;
	-webkit-text-fill-color: currentColor;
}

p.red::before {
	content: "!";
	color: #a30f2c;
}

p.message::before {
	content: "i";
	color: #10708a;
}

@keyframes fluxNoticeIn {
	from { opacity: 0; transform: translateY(-12px) scale(.96); }
	to   { opacity: 1; transform: none; }
}

/* Links inside a notice (for example "resend activation") must stay visible
   against the coloured panel. */
p.red a,
p.message a {
	color: #fff !important;
	-webkit-text-fill-color: #fff;
	text-decoration: underline;
}

@media (max-width: 620px) {
	p.red,
	p.message {
		max-width: calc(100% - 24px);
		font-size: 15px;
		padding: 15px 16px 15px 56px;
	}
}
