/* Faszination Berg — tarteaucitron site-fit overrides.
   Loaded after tarteaucitron's stock CSS. */

/* Site fonts everywhere inside the consent UI. */
#tarteaucitronRoot,
#tarteaucitronRoot * {
    font-family: 'Brandon Grotesque', 'OpenSans', sans-serif;
}

#tarteaucitronRoot p,
#tarteaucitronRoot span,
#tarteaucitronRoot li,
#tarteaucitronRoot button,
#tarteaucitronRoot div.tarteaucitronDetails,
#tarteaucitronRoot .tarteaucitronMainText {
    font-family: 'OpenSans', 'Brandon Grotesque', sans-serif !important;
}

/* Header ("Cookies management panel") — was very large. */
#tarteaucitronRoot #tarteaucitron .tarteaucitronH1,
#tarteaucitronRoot #tarteaucitronRootH1,
#tarteaucitronRoot #tarteaucitronTitle {
    font-family: 'Brandon Grotesque', sans-serif !important;
    font-size: 1.4rem !important;
    line-height: 1.5 !important;
    font-weight: 500 !important;
    letter-spacing: 0.05rem;
    text-transform: uppercase;
    margin: 0 0 12px !important;
}

/* Subheader / disclaimer paragraph in the management panel — hidden entirely.
   This also removes the top/bottom hairline borders set on #tarteaucitronInfo
   in the stock theme (they were the "hr" lines above and below the text). */
#tarteaucitronRoot #tarteaucitron #tarteaucitronInfo,
#tarteaucitronRoot div#tarteaucitronInfo {
    display: none !important;
}

/* Small-banner / alert disclaimer (used by tarteaucitronAlertBig). */
#tarteaucitronRoot #tarteaucitron .tarteaucitronMainText,
#tarteaucitronRoot #tarteaucitron #tarteaucitronDisclaimerAlert {
    font-size: 0.95rem !important;
    line-height: 1.45 !important;
    font-weight: 400 !important;
    letter-spacing: normal !important;
}

/* Hide the "Einstellungen für alle Dienste / Preference for all services /
   Preferenze per tutti i servizi" subheadline that sits in the top strip. */
#tarteaucitronRoot #tarteaucitronMainLineOffset .tarteaucitronName,
#tarteaucitronRoot #tarteaucitronMainLineOffset .tarteaucitronH2 {
    display: none !important;
}

/* "+" indicator next to category titles — hidden. */
#tarteaucitronRoot .tarteaucitronPlus,
#tarteaucitronRoot .tarteaucitronTitle button .tarteaucitronPlus {
    display: none !important;
}

/* Category title row: render as plain heading, never as a button.
   Add left padding so titles don't sit flush against the panel edge. */
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronTitle {
    cursor: default !important;
    padding: 14px 20px 8px !important;
}
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronTitle button,
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronTitle .catToggleBtn,
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronTitle .asCatToggleBtn {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: default !important;
    pointer-events: none !important;
    text-decoration: none !important;
    text-transform: uppercase;
    font-family: 'Brandon Grotesque', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04rem;
    color: inherit !important;
}

/* ROOT CAUSE FIX: tarteaucitron's stock CSS applies `font: inherit` to
   every <div>/<span>/<li>/etc. inside #tarteaucitronRoot. That means font
   size cascades from <body>. MUI's CssBaseline puts font-size: 1.8rem on
   <body>, which gets inherited by .tarteaucitronName as 32.4px — and as
   an inline-block, .tarteaucitronName establishes its own line-box of
   font-size × line-height (45px), splitting wrapped text into huge gaps.
   Pin the font-size on #tarteaucitron so descendants inherit a sane size. */
html body #tarteaucitronRoot #tarteaucitron {
    font-size: 14px !important;
}

/* Brute-force line-height for the entire consent surface. */
html body #tarteaucitronRoot #tarteaucitron,
html body #tarteaucitronRoot #tarteaucitron * {
    line-height: 1.4 !important;
}

/* Mandatory cookies description: stock theme + the renderer's trailing
   <br> + empty .tarteaucitronListCookies span produce huge vertical gaps.
   Use html body prefix to win against any later-injected <style> blocks
   (tarteaucitron.js appends its own at runtime). */
html body #tarteaucitronRoot #tarteaucitron #tarteaucitronServices_mandatory,
html body #tarteaucitronRoot #tarteaucitron #tarteaucitronServices_mandatory .tarteaucitronLine,
html body #tarteaucitronRoot #tarteaucitron #tarteaucitronServices_mandatory .tarteaucitronName,
html body #tarteaucitronRoot #tarteaucitron #tarteaucitronServices_mandatory .tarteaucitronName span,
html body #tarteaucitronRoot #tarteaucitron #tarteaucitronServices_mandatory .tarteaucitronH3 {
    line-height: 1.4 !important;
    margin: 0 !important;
}
html body #tarteaucitronRoot #tarteaucitron #tarteaucitronServices_mandatory .tarteaucitronH3,
html body #tarteaucitronRoot #tarteaucitron #tarteaucitronServices_mandatory .tarteaucitronName span {
    font-size: 0.85rem !important;
    font-weight: 400 !important;
    padding: 0 !important;
    display: inline !important;
}
html body #tarteaucitronRoot #tarteaucitron #tarteaucitronServices_mandatory .tarteaucitronLine {
    padding: 10px 20px !important;
}
html body #tarteaucitronRoot #tarteaucitron #tarteaucitronServices_mandatory .tarteaucitronName {
    margin-left: 0 !important;
    width: 100% !important;
    float: none !important;
}

/* Kill the trailing <br> and the empty .tarteaucitronListCookies span the
   renderer plants after the description — they add extra vertical gaps in
   the mandatory block. */
html body #tarteaucitronRoot #tarteaucitron #tarteaucitronServices_mandatory .tarteaucitronName br,
html body #tarteaucitronRoot #tarteaucitron #tarteaucitronServices_mandatory .tarteaucitronListCookies {
    display: none !important;
}

/* Make the inline details (shown when showDetailsOnClick=false) compact and
   indented to match the category header padding. */
#tarteaucitronRoot .tarteaucitronDetailsInline {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    padding: 0 20px 12px !important;
}

/* Service rows — keep "Allow / Deny" buttons readable but tighter. */
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronLine .tarteaucitronH3 {
    font-size: 0.95rem !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
}
#tarteaucitronRoot button.tarteaucitronAllow,
#tarteaucitronRoot button.tarteaucitronDeny {
    font-family: 'OpenSans', sans-serif !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.02rem;
}

/* Top "Allow all / Deny all" buttons. */
#tarteaucitronRoot button#tarteaucitronAllAllowed,
#tarteaucitronRoot button#tarteaucitronAllDenied,
#tarteaucitronRoot button.tarteaucitronCTAButton,
#tarteaucitronRoot button#tarteaucitronCloseAlert,
#tarteaucitronRoot button#tarteaucitronPersonalize2 {
    font-family: 'Brandon Grotesque', sans-serif !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.04rem;
    text-transform: uppercase;
}

/* "Save" button at the bottom. */
#tarteaucitronRoot button#tarteaucitronSaveButton {
    font-family: 'Brandon Grotesque', sans-serif !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.04rem;
    text-transform: uppercase;
}

/* Close button label. */
#tarteaucitronRoot button#tarteaucitronClosePanel {
    font-family: 'OpenSans', sans-serif !important;
    font-size: 0.75rem !important;
}

/* Flatten the entire panel to white. Stock theme paints the H1 strip and
   the Save footer dark, plus translucent grays on rows and detail boxes —
   override every container surface, then force dark text so the headings
   that were white-on-dark stay readable. Actual buttons keep their own
   green / red / gray backgrounds (they're scoped tightly below).

   NOTE: do NOT include #tarteaucitron here — it's a viewport-spanning
   wrapper; making it white would tint the whole page. We only paint
   #tarteaucitronAlertBig (the dialog) and inner surfaces. */
#tarteaucitronRoot #tarteaucitronAlertBig,
#tarteaucitronRoot #tarteaucitronServices,
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronMainLine,
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronMainLine:hover,
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronBorder,
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronTitle,
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronDetails,
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronDetailsInline,
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronInfoBox,
#tarteaucitronRoot #tarteaucitronServices ul,
#tarteaucitronRoot #tarteaucitronServices li,
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronLine,
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronLine:hover,
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronName,
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronAsk,
#tarteaucitronRoot #tarteaucitron #tarteaucitronSave,
#tarteaucitronRoot #tarteaucitron .asCatToggleBtn,
#tarteaucitronRoot #tarteaucitron .catToggleBtn {
    background: #fff !important;
}

/* Headings + body text on the now-white surface need dark text. */
#tarteaucitronRoot #tarteaucitron,
#tarteaucitronRoot #tarteaucitron .tarteaucitronH1,
#tarteaucitronRoot #tarteaucitron .tarteaucitronH2,
#tarteaucitronRoot #tarteaucitron .tarteaucitronH3,
#tarteaucitronRoot #tarteaucitron .tarteaucitronH4,
#tarteaucitronRoot #tarteaucitron .tarteaucitronTitle,
#tarteaucitronRoot #tarteaucitron .tarteaucitronTitle span,
#tarteaucitronRoot #tarteaucitron .tarteaucitronTitle button,
#tarteaucitronRoot #tarteaucitron .tarteaucitronDetails,
#tarteaucitronRoot #tarteaucitron .tarteaucitronDetailsInline,
#tarteaucitronRoot #tarteaucitron .tarteaucitronName,
#tarteaucitronRoot #tarteaucitron .tarteaucitronName span,
#tarteaucitronRoot #tarteaucitron .asCatToggleBtn,
#tarteaucitronRoot #tarteaucitron .catToggleBtn {
    color: #333 !important;
}

/* Remove the white border that the stock theme draws around the top strip
   (it framed a now-redundant block on a now-white background). */
#tarteaucitronRoot #tarteaucitronServices .tarteaucitronMainLine {
    border: 0 !important;
    margin-top: 0 !important;
}

/* Small alert banner (initial cookie prompt before save/customise).
   tarteaucitron's bundled tarteaucitron.min.css is loaded by the lib
   AFTER our overrides and ships dark-theme defaults (color: #fff on
   AlertBig). Force light theme + drop the lib's "☝ 🍪" emoji it
   injects via a runtime ::before pseudo. */
html body #tarteaucitronRoot #tarteaucitronAlertBig,
html body #tarteaucitronRoot #tarteaucitronAlertBig #tarteaucitronDisclaimerAlert,
html body #tarteaucitronRoot #tarteaucitronAlertBig #tarteaucitronDisclaimerAlert strong,
html body #tarteaucitronRoot #tarteaucitronAlertBig a {
    color: #333 !important;
    background: #fff !important;
}
html body #tarteaucitronRoot div#tarteaucitronAlertBig::before {
    content: '' !important;
    display: none !important;
}

/* Drop the 21px gap above services so the close button can sit fully
   inside the white dialog body instead of being half-covered by services. */
html body #tarteaucitronRoot div#tarteaucitronServices {
    margin-top: 0 !important;
}

/* Close button: text content is replaced with × via JS at runtime (see
   CookieConsentHead). Sit flush in the top-right of the dialog with a
   high z-index so it stays above the services panel, and use flex
   centering so the glyph is dead-centered regardless of font metrics. */
html body #tarteaucitronRoot button#tarteaucitronClosePanel {
    background: #fff !important;
    color: #333 !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    top: 0 !important;
    right: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 24px !important;
    line-height: 1 !important;
    font-family: 'OpenSans', sans-serif !important;
    font-weight: 400 !important;
    border-radius: 0 !important;
    z-index: 1 !important;
}

/* Let the dialog use available viewport. Stock theme caps at 80% and
   tarteaucitron's jsSizing pins #tarteaucitronServices to a fixed pixel
   height that ends up smaller than the content, causing internal scroll
   even when there's plenty of room. */
html body #tarteaucitronRoot #tarteaucitron {
    max-height: 92vh !important;
    top: 4vh !important;
}
html body #tarteaucitronRoot #tarteaucitronServices {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}
html body #tarteaucitronRoot #tarteaucitronServices .tarteaucitronBorder {
    overflow: visible !important;
}
