/* Page chrome that several layouts include: urgent notices (fa_urgent), the deletion and page
   notices, the cookie notice and the legal footer. Linked last in the <head> of layouts/app.html,
   base.html, entry.html, upload.html, results/page.html and results_workshop.html. */

/* --- partials/urgent.html --- */
.faUrgent {
	position: fixed; z-index: 99990; top: 72px; left: 50%; transform: translateX(-50%);
	display: flex; flex-direction: column; gap: 8px; width: min(760px, calc(100vw - 32px));
}
.faUrgentBar {
	--u-accent: var(--warning-color, #efcd1e);
	display: flex; align-items: center; gap: 12px 20px;
	padding: 9px 12px 9px 16px;
	border-left: 4px solid var(--u-accent); border-radius: 8px;
	background: var(--bgminus-color, #fff); color: var(--bgnegative-color, #111);
	box-shadow: 0 6px 24px rgba(0, 0, 0, .14), 0 0 0 1px var(--bg-color-line, rgba(0, 0, 0, .08));
	font-size: .85rem; line-height: 1.4;
	animation: faUrgentIn .25s ease-out;
}
.faUrgentBar.u-alert { --u-accent: var(--error-color, #ff5566); }
.faUrgentMain { flex: 1; min-width: 0; }
.faUrgentLine { margin: 0; display: flex; align-items: baseline; gap: 10px; }
.faUrgentTag {
	flex: none; display: inline-flex; align-items: center; gap: 6px;
	font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
	color: var(--muted-text-color, #5f5f5f);
}
.faUrgentTag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--u-accent); }
.faUrgentText { font-weight: 600; overflow-wrap: anywhere; }
.faUrgentBody {
	margin: 2px 0 0; font-size: .78rem; color: var(--muted-text-color, #5f5f5f);
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.faUrgentActions { flex: none; display: flex; align-items: center; gap: 14px; font-size: .78rem; }
.faUrgentActions form { margin: 0; }
.faUrgentActions a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.faUrgentActions button {
	padding: 5px 12px; border: 1px solid currentColor; border-radius: 99px;
	background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer;
}
.faUrgentActions button:hover { background: var(--bgnegative-color, #111); border-color: var(--bgnegative-color, #111); color: var(--bgminus-color, #fff); }
.faUrgent a:focus-visible, .faUrgent button:focus-visible { outline: 2px solid var(--highlight-color, #6020ff); outline-offset: 2px; }
.faUrgentBar.closing { opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; }
@keyframes faUrgentIn { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .faUrgentBar { animation: none; } .faUrgentBar.closing { transition: none; } }
@media (max-width: 600px) {
	.faUrgent { top: auto; bottom: 16px; }
	.faUrgentBar { flex-wrap: wrap; }
	.faUrgentLine { flex-direction: column; gap: 2px; }
	.faUrgentActions { width: 100%; justify-content: flex-end; }
}

/* --- partials/deletion_notice.html --- */
.faDeletionNotice { position: fixed; left: 0; right: 0; top: var(--faDelTop, 0px); z-index: 1001; pointer-events: none; }
.faDeletionNotice > * { pointer-events: auto; }
.faDeletionBar {
	position: relative; display: flex; align-items: center; gap: 0.7em;
	padding: 0.7em 1.2em; font-size: 0.95rem; line-height: 1.4;
	background: var(--warning-color, #efcd1e); color: #111;
	transition: max-height .45s ease, padding .45s ease, opacity .3s ease;
	max-height: 12em; overflow: hidden;
	box-shadow: 0 0.4rem 1.2rem #0002;
}
.faDeletionText { flex: 1; }
.faDeletionBar a { color: #111; text-decoration: underline; text-underline-offset: 0.15em; }
.faDeletionIco { flex: none; }
.faDeletionClose, .faNoticeClose { flex: none; font: inherit; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .03em; padding: 0.35em 0.8em; border: 1.5px solid #111; border-radius: 99px; background: transparent; color: #111; cursor: pointer; }
.faDeletionClose:hover { background: #111; color: var(--warning-color, #efcd1e); }
/* 30 s countdown line along the bottom of the bar */
.faDeletionTimer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: #111; opacity: .35; transform-origin: left; animation: faDeletionCount 30s linear forwards; }
@keyframes faDeletionCount { to { transform: scaleX(0); } }
.faDeletionNotice.isMin .faDeletionBar { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; }
.faDeletionPin {
	position: absolute; left: 1rem; top: 0.6rem;
	display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
	border: 0; background: var(--warning-color, #efcd1e); cursor: pointer;
	box-shadow: 0 0.4rem 1.2rem #0003;
}
.faDeletionPin[hidden] { display: none; }
.faDeletionPin:hover { transform: scale(1.06); }
.faDeletionPin:focus-visible, .faDeletionClose:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.faDeletionPin svg path:first-child { fill: #fff6c2; }
@keyframes faDeletionPop { from { transform: scale(.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .faDeletionBar, .faDeletionPin { transition: none; animation: none; } .faDeletionTimer { display: none; } }
@media (max-width: 720px) { .faDeletionBar { font-size: 0.85rem; padding: 0.6em 0.9em; } }

/* --- partials/page_notices.html --- */
.faNoticeStack { position: fixed; right: 16px; z-index: 1002; width: min(26rem, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.faNoticeCard {
	position: relative; overflow: hidden; pointer-events: auto;
	display: flex; align-items: flex-start; gap: 0.7em; padding: 0.8em 0.9em 0.9em 1em;
	border-radius: 0.6em; font-size: 0.95rem; line-height: 1.4; color: #111;
	background: var(--highlightminusminus-color, #e7ddff); box-shadow: 0 0.4rem 1.2rem #0003;
	animation: faNoticeIn .35s cubic-bezier(.2,.8,.2,1);
	transition: transform .3s ease, opacity .3s ease;
}
.faNoticeCard svg { flex: none; margin-top: 0.05em; }
.faNoticeCard.k-error { background: var(--error-color, #ff5566); }
.faNoticeCard.k-warning { background: var(--warning-color, #efcd1e); }
.faNoticeCard.k-success { background: var(--highlightminus-color, #ab8bfd); }
.faNoticeCard.isGone { transform: translateX(calc(100% + 24px)); opacity: 0; }
.faNoticeText { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.faNoticeClose:hover { background: #111; color: #fff; }
.faNoticeClose:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.faNoticeTimer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: #111; opacity: .35; transform-origin: left; animation: faNoticeCount 10s linear forwards; }
@keyframes faNoticeIn { from { transform: translateX(calc(100% + 24px)); opacity: 0; } }
@keyframes faNoticeCount { to { transform: scaleX(0); } }
/* dark mode: the light tints of the day theme turn dark there, so the cards use the bright colours */
@media (prefers-color-scheme: dark) { .faNoticeCard { background: var(--highlight-color, #40E0D0); } .faNoticeCard.k-success { background: var(--highlightplus-color, #82fff2); } }
@media (prefers-reduced-motion: reduce) { .faNoticeCard { animation: none; transition: none; } .faNoticeTimer { display: none; } }
@media (max-width: 720px) { .faNoticeStack { right: 8px; width: calc(100vw - 16px); } .faNoticeCard { font-size: 0.85rem; } }

/* --- partials/cookie_notice.html --- */
.faCookieNotice { position: fixed; z-index: 10000; left: 1rem; right: 1rem; bottom: 1rem; max-width: 34rem; margin-left: auto; padding: 1rem 1.25rem; font-size: 0.85rem; line-height: 1.45; color: var(--bgnegative-color, #111); background: var(--bgminus-color, #fff); border-radius: 0.6em; box-shadow: 0 0 0 2px var(--highlight-color, #6020FF), 0 0.5rem 2rem #20008822; }
.faCookieNotice[hidden] { display: none; }
.faCookieNotice p { margin: 0 0 0.75rem; }
.faCookieNotice p[hidden] { display: none; }
.faCookieNotice a { color: var(--highlight-color, #6020FF); }
.faCookieButtons { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; }
.faCookieButtons button { min-width: 6rem; padding: 0.5rem 1rem; font: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; color: var(--on-highlight-color, #fff); background: var(--highlight-color, #6020FF); border: 0; border-radius: 1.6em; cursor: pointer; }
.faCookieButtons button[hidden] { display: none; }
.faCookieButtons button:focus-visible { outline: 3px solid var(--highlightminus-color, #ab8bfd); outline-offset: 2px; }

/* --- partials/legal_footer.html --- */
.faLegalFooter { clear: both; padding: 1.5rem 1rem 2rem; font-size: 0.75rem; line-height: 1.5; text-align: center; color: var(--muted-text-color, var(--bgplus-color, #5f5f5f)); }
.faLegalFooter p { margin: 0 0 0.5rem; }
.faLegalFooter nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1rem; }
.faLegalFooter a, .faLegalFooter button { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; }
.faLegalFooter button { padding: 0; font: inherit; background: none; border: 0; cursor: pointer; }
.faLegalFooter a:hover, .faLegalFooter button:hover { color: var(--highlight-color, #6020FF); }
