/* German text expansion corrections.
   =================================================================
   German runs roughly 20-30% longer than the equivalent English, and
   compounds do not break at spaces: "Datenschutzerklärung" and
   "Bildgrößenänderung" are single unbreakable tokens where English has
   two or three words with break opportunities between them. Anywhere the
   layout relies on a fixed width, a nowrap, or an ellipsis, that extra
   length becomes a clipped label rather than a wrapped one.

   Loaded only when MSM_Tools_I18n::current() is 'de', so English and Urdu
   pay nothing for it. Everything here is a relaxation of an existing
   constraint -- no new colours, spacing rhythm or type scale -- which
   keeps the German pages recognisably the same design.

   Scoped on .msm-lang-de (set by MSM_Tools_I18n::body_class) rather than
   :lang(de), because the html lang attribute carries a region subtag on
   some routes and the body class is the value the plugin actually owns.
   ================================================================= */

/* Hyphenation is the single highest-value change: it lets the browser
   break inside a compound at a legal point instead of overflowing. The
   dictionary ships with the browser, so this needs no payload. */
.msm-lang-de .mega-link,
.msm-lang-de .mega-category-title,
.msm-lang-de .cat-scroll-card h4,
.msm-lang-de .cat-scroll-card p,
.msm-lang-de .tool-card h3,
.msm-lang-de .tool-card p,
.msm-lang-de .category-card h3,
.msm-lang-de .category-card p,
.msm-lang-de .home-stat-label,
.msm-lang-de .search-result-title,
.msm-lang-de .faq-question,
.msm-lang-de .btn,
.msm-lang-de .home-link {
	-webkit-hyphens: auto;
	hyphens: auto;
	overflow-wrap: break-word;
}

/* Mega menu: two lines of a wrapped compound beat one clipped line.
   The row height is free to grow because the panel is a grid of
   auto-height cells, not a fixed-height list. */
.msm-lang-de .mega-link,
.msm-lang-de .mega-category-title {
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
}

.msm-lang-de .mega-link {
	line-height: 1.35;
}

/* Category strip: "Entwicklerwerkzeuge" is 19 characters against
   "Developer" at 9, and the card is sized by its content. */
.msm-lang-de .cat-scroll-card h4 {
	white-space: normal;
	line-height: 1.3;
}

/* Header search: the placeholder and results both carry longer strings,
   and the open state is absolutely positioned so widening it does not
   move anything else in the bar. */
.msm-lang-de .nav-search-input-box {
	width: 290px;
}

.msm-lang-de .search-suggestions {
	width: 380px;
}

/* A clipped result title is worse than a slightly taller row: the
   distinguishing part of a German tool name is often the tail
   ("...konverter" against "...generator"). */
.msm-lang-de .search-result-title {
	white-space: normal;
	overflow: visible;
	text-overflow: clip;
	line-height: 1.3;
}

/* Language menu holds "Deutsch" plus its native-name column. */
.msm-lang-de .lang-menu {
	min-width: 244px;
}

/* Hero statistics: the labels are the longest strings on the front page
   relative to their column -- "Werkzeuge", "Kategorien", "Nutzende",
   "Verwendungen" -- and they sit in a four-up grid that must not drop to
   two columns on a laptop. */
.msm-lang-de .home-stat-label {
	font-size: 0.82rem;
	letter-spacing: 0;
	line-height: 1.25;
}

/* Buttons: German verbs are longer and often compound
   ("Herunterladen", "Zurücksetzen"). Let the label wrap to a second line
   rather than overflow the pill, and drop the letter-spacing that was
   tuned for shorter English words. */
.msm-lang-de .btn,
.msm-lang-de .btn-group .btn {
	white-space: normal;
	letter-spacing: 0;
	line-height: 1.25;
}

/* Tool page form labels and hints sit in a narrow column on desktop. */
.msm-lang-de .form-group label,
.msm-lang-de .field-hint {
	overflow-wrap: break-word;
	-webkit-hyphens: auto;
	hyphens: auto;
}

/* Table headers in tool results are single words in English and
   compounds in German; allow them to wrap so the column does not force
   a horizontal scrollbar on the whole table. */
.msm-lang-de .msm-table th {
	white-space: normal;
	-webkit-hyphens: auto;
	hyphens: auto;
}

/* Footer link columns: four columns of longer link text is the layout
   most likely to collide on a 1024px screen. */
@media (min-width: 901px) {
	.msm-lang-de .footer-col a {
		overflow-wrap: break-word;
		-webkit-hyphens: auto;
		hyphens: auto;
	}
}

/* Below the mega-menu breakpoint the drawer is a single column, so the
   widened desktop values would only push the panel off screen. */
@media (max-width: 900px) {
	.msm-lang-de .nav-search-input-box,
	.msm-lang-de .search-suggestions {
		width: auto;
	}
}
