/* hihp-Modifikation */
/*
  Knuddels look on top of the 8.0.0 templates.
  Loaded last in templates/default/header.tpl, after the forum style and the sf2 wrapper CSS.
  Kept as a file (not in the style editor's "Extra CSS") so it ships with the code.
*/

/* Breadcrumbs: 8.0.0 puts them in an <h1>, which sf2/b/default.css makes 20px bold.
   7.3.1 showed them in the normal breadcrumb size of the style (9pt). */
.breadcrumbs h1 {
	font-size: inherit;
	font-weight: normal;
	color: inherit;
}

/* Topic titles in the topic list are <h1> at Knuddels (postlist.tpl); 13px as in 7.3.1
   (sf2/f/forum/forum.css did this with 7.3.1 class names). The cell class is topicsubject,
   alt-topicsubject, new-topicsubject, ... depending on the row. */
td[class*="topicsubject"] h1 {
	font-size: 13px;
}

/* Page counter ("Seite 1 von 3 | 1 2 3 > alle"): red label and grey page cells as in 7.3.1 */
.pagination .pages {
	background: #ab030f;
	border: 1px solid #ab030f;
	color: #ffffff;
	font-size: 14px;
	font-weight: bold;
	margin: 0;
	padding: 6px 10px;
}
.pagination .page-n,
.pagination .page-cur {
	background: #ececec;
	border: 1px solid #c0c0c0;
	font-size: 14px;
	font-weight: bold;
	padding: 6px 9px;
}
.pagination .page-n {
	color: #ab030f;
}
.pagination .page-n:hover {
	background: #d9d9d9;
}
.pagination .page-cur {
	color: #000000;
}

/* Topic and forum buttons ("Antwort schreiben", "Thema Optionen", "Verwalten", "Thema bewerten",
   "Neues Thema", previous/index/next): red boxes like the 7.3.1 tdheader buttons.
   Submit buttons (input/button.form-button) keep the style's look. */
td.form-button,
div.form-button {
	background: #ab030f;
	color: #ffffff;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 15px;
	font-weight: normal;
	line-height: 20px;
	padding: 10px 12px;
	border: 0;
	border-radius: 0;
	cursor: pointer;
}
td.form-button:hover,
div.form-button:hover {
	background: #80020b;
	color: #ffffff;
}
td.form-button a:link,
td.form-button a:visited,
td.form-button a:hover,
td.form-button a:active,
div.form-button a:link,
div.form-button a:visited,
div.form-button a:hover,
div.form-button a:active {
	color: #ffffff;
	font-weight: normal;
	text-decoration: none;
}
/* buttons that contain a real link (previous/index/next): the whole box is clickable */
td.form-button > a,
div.form-button > a {
	display: block;
	margin: -10px -12px;
	padding: 10px 12px;
}

/* Phones and small tablets (same breakpoint as the 8.0.0 layout in common.css).
   The old knuddels.de wrapper (sf2) was built for a fixed 846px desktop page; without these
   rules the page never gets narrower than that and the phone shows a zoomed-out desktop page. */
@media (max-width: 759px) {
	/* sf2/b/default.css: min-width 846px (forum.css only resets width) */
	#kbody,
	#kdoc,
	body.forum #kbody,
	body.forum #kdoc {
		width: auto;
		min-width: 0;
	}
	/* empty ad slot above the header: 950px inline width in header.tpl */
	#kad1 {
		display: none;
	}
	/* second mascot in the header sits at left:388px and would widen the page */
	#khd .mascot2 {
		display: none;
	}
	/* logo sits at left:145px, 224px wide: right-align it and let it shrink on narrow phones */
	#khd .logo {
		left: auto;
		right: 16px;
		max-width: calc(100% - 175px);
		background-size: contain;
		background-position: right center;
	}
	/* the box reaches (almost) to the screen edge: the 13px shadow frame (#bd1/#bd2, part of the
	   rounded header/footer images too) is pushed 11px past the screen edge and clipped, so the
	   white box starts 2px from the edge and still lines up with the header and footer boxes */
	/* clip, not hidden: hidden would turn body into a second scroll container (two scrollbars) */
	#kbody {
		overflow-x: clip;
	}
	body {
		margin: 0;
	}
	#kdoc,
	body.forum #kdoc {
		margin: 0 -11px;
	}
	/* the knuddels.de link list below the box would be cut off by those 11px */
	#kft .ftoutside {
		padding: 0 13px;
	}
	#kmain {
		margin: 8px 2px;
	}
	/* images in posts never wider than the screen */
	.post_inner img {
		max-width: 100%;
		height: auto;
	}
	/* profile: next to the 150px avatar the career box would be very narrow -> below the avatar */
	.knuddels-career {
		clear: both;
	}
}

/* profile (showprofile.tpl): the career entries come with their own frame. As a normal block the
   frame slid under the floated avatar; flow-root keeps the box next to the avatar */
.knuddels-career {
	display: flow-root;
}

/* post editor: sf2/f/forum/forum.css fixes it to 51em (about 850px on desktop) -> full width of the
   content area on all screen sizes (was only overridden for phones) */
#kmain .forum #texteditor {
	width: 100% !important;
	box-sizing: border-box;
}
