/*
 * Style-neutral fallback for forum functions provided by lammeronline/itportal.
 * Keep this intentionally small: themes own their visual identity, while these
 * rules ensure every compatible phpBB 3.3 style exposes usable controls.
 */
.itportal-topic-author,
.itportal-topic-solved,
.itportal-best-answer,
.itportal-topic-solved-notice,
.itportal-pinned-post-notice {
	display: inline-flex;
	align-items: center;
	gap: .35em;
	padding: .18em .5em;
	border: 1px solid rgba(35, 117, 154, .42);
	border-radius: 3px;
	background: rgba(35, 117, 154, .08);
	color: inherit;
	font-size: .9em;
	font-weight: 700;
	line-height: 1.25;
}

.itportal-topic-author { margin-left: .45em; }
.postprofile .itportal-topic-author-profile {
	display: table;
	clear: both;
	margin: .3em 0 0;
	white-space: nowrap;
}
.postbody .author .itportal-topic-author { margin: 0 .45em 0 0; vertical-align: baseline; }
.itportal-topic-solved { margin-left: .45em; }
.itportal-best-answer,
.itportal-topic-solved-notice,
.itportal-pinned-post-notice { margin: 0 0 .7em; }

.itportal-last-post-avatar {
	display: inline-flex;
	width: 22px;
	height: 22px;
	margin-right: .35em;
	vertical-align: middle;
	border-radius: 50%;
	overflow: hidden;
}
.itportal-last-post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.header-avatar img { display: inline-block; aspect-ratio: 1; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.itportal-last-post-avatar-forum {
	float: left;
	width: 42px;
	height: 42px;
	margin: 0 .5em 0 0;
}
/* prosilver makes .lastsubject a block.  A block starts at the left edge of
 * the last-post column even when a float precedes it, so the avatar ends up
 * above the subject instead of beside all three post-detail lines. */
.lastpost .itportal-last-post-avatar-forum ~ .lastsubject { display: inline; }
.itportal-last-post-topic-icon { display: inline-block; margin-right: .3em; vertical-align: text-bottom; }
.itportal-last-post-topic-icon img { display: block; max-width: 18px; max-height: 18px; }
.itportal-team-avatar { display: inline-flex; width: 30px; height: 30px; margin-right: .45em; vertical-align: middle; border-radius: 50%; overflow: hidden; }
.itportal-team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.itportal-contact-captcha { margin: 1em 0; }

/* Advanced editor: generic presentation shared by every compatible style. */
.itportal-editor-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 0 0 7px; padding: 6px; border: 1px solid #dce5ef; border-radius: 7px; background: #f7fafc; }
#postform .itportal-editor-toolbar,
#qr_postform .itportal-editor-toolbar { clear: left; width: 80%; box-sizing: border-box; }
#postform .itportal-editor-toolbar + .message-box,
#qr_postform .itportal-editor-toolbar + .message-box { width: 80%; box-sizing: border-box; }
#postform .smiley-box,
#qr_postform .smiley-box { width: 20%; box-sizing: border-box; padding-left: 10px; }
.itportal-editor-toolbar__group { display: flex; align-items: center; gap: 3px; padding-right: 5px; border-right: 1px solid #dce5ef; }
.itportal-editor-toolbar__group:last-child { border-right: 0; padding-right: 0; }
.itportal-editor-toolbar button { min-width: 29px; height: 28px; padding: 0 7px; border: 1px solid #d4dee9; border-radius: 4px; background: #fff; color: #16496f; cursor: pointer; }
.itportal-editor-toolbar button:hover, .itportal-editor-toolbar button:focus { border-color: #32bcb0; background: #eafaf8; color: #087c75; }
.itportal-editor-toolbar select { max-width: 95px; height: 28px; border: 1px solid #d4dee9; border-radius: 4px; background: #fff; color: #16496f; font-size: 11px; }
.itportal-editor-toolbar input[type="color"] { width: 28px; height: 28px; padding: 2px; border: 1px solid #d4dee9; border-radius: 4px; background: #fff; cursor: pointer; }
.itportal-editor-toolbar__effects button { min-width: 29px; padding: 0; font-size: 12px; }
.itportal-editor-toolbar__effects label { position: relative; display: flex; align-items: center; justify-content: center; width: 29px; height: 26px; padding: 0; border: 1px solid #d4dee9; border-radius: 4px; background: #fff; color: #16496f; cursor: pointer; }
.itportal-editor-toolbar__effects label:hover { border-color: #32bcb0; background: #eafaf8; color: #087c75; }
.itportal-editor-toolbar__effects input[type="color"] { position: absolute; right: 2px; bottom: 2px; width: 9px; height: 9px; padding: 0; border: 0; border-radius: 2px; }
.itportal-editor-toolbar__sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.itportal-editor-toolbar + #message-box textarea,
#message-box textarea.itportal-editor-code { resize: vertical !important; overflow: auto !important; min-height: 9em; }
.message-box.itportal-editor-visual-host { min-width: 0; max-width: 100%; box-sizing: border-box; }
.message-box.itportal-editor-visual-host > .itportal-editor-visual { display: block; width: 100% !important; min-width: 0 !important; max-width: 100% !important; box-sizing: border-box !important; }
.itportal-editor-visual { min-height: 260px; max-height: 70vh; padding: 10px; border: 1px solid #58a9d4; border-radius: 4px; background: #fff; color: #1b2a41; line-height: 1.55; outline: none; overflow: auto; overflow-wrap: anywhere; word-break: break-word; resize: vertical; }
.itportal-editor-visual, .itportal-editor-visual * { box-sizing: border-box; }
.itportal-editor-visual > * { max-width: 100%; }
.itportal-editor-visual blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid #32bcb0; background: #f3fbfa; }
.itportal-editor-visual pre { max-width: 100%; padding: 10px; background: #0b172a; color: #e5f3ff; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.itportal-editor-visual img { max-width: 100%; height: auto; }
.itportal-editor-visual .itportal-editor-hr { height: 0; margin: 16px 0; border: 0; border-top: 1px solid #c7d7e6; }
.itportal-editor-visual .itportal-editor-float { margin: 0 10px 6px 0; }
.itportal-editor-visual .itportal-editor-glow { color: #fff; text-shadow: 0 0 8px var(--itportal-effect), 0 0 13px var(--itportal-effect); }
.itportal-editor-visual .itportal-editor-shadow { text-shadow: 2px 2px 2px #999; }
.itportal-editor-visual .itportal-editor-dropshadow { text-shadow: 1px 1px 0 #999; }
.itportal-editor-visual .itportal-editor-blur { color: transparent; text-shadow: 0 0 3px var(--itportal-effect); }
.itportal-editor-visual .itportal-editor-youtube { margin: 8px 0; padding: 10px; border: 1px solid #e1b1b1; border-radius: 4px; background: #fff4f4; color: #b91c1c; }
.itportal-editor-visual .itportal-editor-flash,
.itportal-editor-visual .itportal-editor-attachment { margin: 8px 0; padding: 10px; border: 1px solid #c7d7e6; border-radius: 4px; background: #f7fafc; color: #145a91; }
html.itportal-editor-fullscreen-active { overflow: hidden; }
.itportal-editor-fullscreen { position: fixed !important; z-index: 2147483000 !important; inset: 0 !important; box-sizing: border-box; display: flex; flex-direction: column; padding: 14px; overflow: hidden; border: 0; border-radius: 0; background-color: #f4f7fb !important; box-shadow: none; isolation: isolate; }
.itportal-editor-fullscreen > :not(.itportal-editor-toolbar):not(#message-box) { display: none !important; }
.itportal-editor-fullscreen .itportal-editor-toolbar { position: relative; z-index: 1; flex: 0 0 auto; max-height: 115px; overflow: auto; }
.itportal-editor-fullscreen .itportal-editor-toolbar + #message-box { display: block; flex: 1 1 auto; min-height: 0; width: 100%; height: calc(100vh - 145px); margin: 0; }
.itportal-editor-fullscreen #message-box > textarea,
.itportal-editor-fullscreen #message-box > .itportal-editor-visual { display: block; min-height: 0; max-height: none; width: 100%; height: 100% !important; box-sizing: border-box; resize: none; }
.itportal-editor-fullscreen #smiley-box,
.itportal-editor-fullscreen .bbcode-status { display: none !important; }

/* Custom BBCode rendered by migrations\advanced_bbcodes and the code enhancer. */
.codebox { position: relative; overflow: hidden; border: 1px solid #bfd1df; border-radius: 6px; background: #f8fbfd; box-shadow: 0 2px 6px rgba(18, 57, 90, .06); }
.codebox p { display: flex; align-items: center; min-height: 28px; margin: 0; padding: 4px 8px; border-bottom: 1px solid #d6e3ec; background: #edf5f9; color: #315b75; }
.codebox code,
.codebox code.itportal-syntax { box-sizing: border-box; display: block; min-height: 34px; margin: 0; padding: 8px 10px; background: #f8fbfd; color: #1c3446; }
.codebox .itportal-code-copy { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 24px; margin-left: auto; padding: 0; border: 0; border-radius: 3px; background: transparent; color: #087c75; cursor: pointer; }
.codebox .itportal-code-copy:hover,
.codebox .itportal-code-copy:focus { background: rgba(50, 212, 196, .16); color: #075f59; }
.codebox .itportal-code-copy.is-copied { color: #12966f; }
.itportal-code-copy-notice { position: fixed; z-index: 10002; right: 20px; bottom: 20px; padding: 10px 14px; border-radius: 4px; background: #143955; color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .18s ease, transform .18s ease; }
.itportal-code-copy-notice.is-visible { opacity: 1; transform: translateY(0); }
.itportal-syntax .itportal-syntax-command,
.itportal-syntax .itportal-syntax-path,
.itportal-syntax .itportal-syntax-keyword,
.itportal-syntax .itportal-syntax-tag { color: #006da3; }
.itportal-syntax .itportal-syntax-property,
.itportal-syntax .itportal-syntax-key { color: #8a5800; }
.itportal-syntax .itportal-syntax-string { color: #197247; }
.itportal-syntax .itportal-syntax-comment { color: #687b89; }
.itportal-syntax .itportal-syntax-number { color: #7445a7; }
.itportal-syntax .itportal-syntax-boolean { color: #a33d23; }
.itportal-syntax .itportal-syntax-variable { color: #a65000; }
.itportal-bb-spoiler { margin: 10px 0; padding: 8px 11px; border: 1px solid #c7d7e6; border-radius: 4px; background: #f7fafc; }
.itportal-bb-spoiler summary { color: #145a91; font-weight: 700; cursor: pointer; }
.itportal-bb-offtopic,
.itportal-bb-mod { margin: 10px 0; padding: 10px 12px; border-left: 4px solid #e1a11a; border-radius: 3px; background: #fff8e7; }
.itportal-bb-mod { border-left-color: #d64d4d; background: #fff0f0; }
.itportal-bb-offtopic > strong,
.itportal-bb-mod > strong { display: block; margin-bottom: 5px; }
.itportal-bb-nfo { padding: 10px; overflow: auto; border-radius: 4px; background: #0b172a; color: #d9f7ee; }
.itportal-bb-fade { animation: itportal-bb-fade 1.5s ease-in-out infinite alternate; }
@keyframes itportal-bb-fade { from { opacity: .35; } to { opacity: 1; } }

.post.has-profile .postprofile { position: relative; }
.post.online { background-image: none !important; }
/* A compact, neutral online indicator works with both left and right
 * phpBB profiles.  Styles may recolour it, but the extension owns the
 * status itself rather than an image ribbon from a particular theme. */
.post.online .postprofile::before {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 8px;
	height: 8px;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #2fbf71;
	box-shadow: 0 0 0 2px rgba(47, 191, 113, .2);
	content: "";
	pointer-events: none;
}

.post-buttons .itportal-best-answer-action form { display: inline; margin: 0; }
.post-buttons .itportal-post-number .button { min-width: 2.25em; font-weight: 700; text-decoration: none; }

.profile-age { margin-top: .35em; }
.itportal-scroll-top {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 1000;
	display: none;
	width: 38px;
	height: 38px;
	border: 1px solid rgba(35, 117, 154, .62);
	border-radius: 50%;
	background: #fff;
	color: #236f9a;
	cursor: pointer;
	box-shadow: 0 2px 9px rgba(0, 0, 0, .2);
}
.itportal-scroll-top.is-visible { display: block; }

@media (max-width: 700px) {
	.itportal-scroll-top { right: 12px; bottom: 12px; }
}
