/* ==========================================================================
   Grünes Herz – Abgerundete Ecken (optional)
   Template "Grünes Herz: Abgerundete Ecken (optional)" – NACH "Farben + Logo"
   (und ggf. "Typografie") einbinden.

   Radien:
     Flächen/Kacheln/Panels  --gh-radius      (Standard .75rem = 12px)
     Felder/Chips/Listen     --gh-radius-sm   (.5rem = 8px)
     Buttons/Filter          --gh-radius-pill (= --gh-radius-sm, wie Chips)
   Radius per Konstante plugin.tx_gruenesherztheme.rounded.radius
   (setzt --gh-radius-set per page.cssInline).

   Barrierefreiheit: Fokusrahmen (outline) folgen dem Radius. Kein
   overflow:hidden auf Containern mit fokussierbaren Elementen – sonst würde
   der Fokusrahmen abgeschnitten; Bilder werden einzeln gerundet.
   Vollbreite Flächen (Dunkelblau/Naturweiß über die ganze Breite) bleiben eckig.
   ========================================================================== */

:root {
	/* --gh-radius-set kommt aus der Konstante (page.cssInline), Reihenfolge egal */
	--gh-radius: var(--gh-radius-set, .75rem);
	--gh-radius-sm: calc(var(--gh-radius) * .66);
	/* Buttons wie die Chips im Slider */
	--gh-radius-pill: var(--gh-radius-sm);
}

/* --------------------------------------------------------------------------
   1. Buttons und Filter: leicht gerundet (wie Chips)
   -------------------------------------------------------------------------- */
/* Buttons gerundet wie die Chips. Die Wisch-Fläche (::before) folgt der
   Rundung, weil der Button overflow:hidden hat. */
.btn,
.onepager .btn,
.btn-primary,
.btn-secondary,
.btn-outline-primary,
.tx-t3social .button-group button.btn,
.powermail_form input[type=submit],
.powermail_form input[type=reset] {
	border-radius: var(--gh-radius-pill);
}
/* Primär-Button: grüner Strich unten als Innenschatten, damit er der
   Pillenform folgt (ein border-bottom würde an den Enden sichelförmig) */
.btn-primary,
.btn-primary:visited,
main .btn-primary:visited {
	border-bottom-width: 1px !important;
	border-bottom-color: var(--gh-btn-border) !important;
	box-shadow: inset 0 -4px 0 var(--gh-btn-stripe);
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
	box-shadow: inset 0 -8px 0 var(--gh-btn-stripe);
}
.btn-primary.disabled,
.btn-primary:disabled {
	box-shadow: none;
	border-bottom-color: var(--gh-schiefergrau) !important;
}

/* Header-Button "Suche und Menü" */
.th-nav-main-open .th-nav-item {
	border-radius: var(--gh-radius-sm);
}

/* Chips "mehr"/"zur Detailseite" */
.th-txt p a:not(.btn) {
	border-radius: var(--gh-radius-sm);
}

/* Seitenzahlen, Teilen, Werkzeuge */
.page-item .page-link,
.page-item:first-child .page-link,
.page-item:last-child .page-link {
	border-radius: var(--gh-radius-sm);
}
.pagination {
	gap: .25rem;
}
.th-sharing ul li a,
.th-social ul li a,
.th-misc ul li a,
.shariff .shariff-button a {
	border-radius: var(--gh-radius-sm);
}

/* --------------------------------------------------------------------------
   2. Formulare
   -------------------------------------------------------------------------- */
.form-control,
.form-select,
input[type=text],
input[type=email],
input[type=search],
input[type=tel],
input[type=number],
input[type=date],
input[type=url],
input[type=password],
textarea,
select {
	border-radius: var(--gh-radius-sm);
}
.form-check-input[type=checkbox] {
	border-radius: .3em;
}

/* --------------------------------------------------------------------------
   3. Flächen, Boxen, Kacheln, Hinweise
   -------------------------------------------------------------------------- */
:is(.th-look-gray, .th-look-sub, .th-look-secondary, .th-look-primary, .th-look-white):not(.th-media, .th-nav-submenu),
.th-card,
.th-card-wrapper,
.customer-post,
.th-lst-body .list-elem,
.frame-gh-note,
.gh-container-frame.frame-gh-note > :first-child,
.frame-gh-mourning,
.gh-container-frame.frame-gh-mourning > :first-child,
blockquote,
.alert,
.modal-content,
.frame-type-powermail_pi1,
.cookie-consent-container .consent-modal,
.dropdown-menu {
	border-radius: var(--gh-radius);
}
/* Hinweis/Nachruf/Zitat mit Kante links: Kante läuft in den Radius */
blockquote,
.frame-gh-note {
	border-start-start-radius: var(--gh-radius-sm);
	border-end-start-radius: var(--gh-radius-sm);
}

/* Boxen mit Kontur (outline folgt dem Radius) */
.th-content.th-rows .th-box[class*=th-otl-color-],
.th-content.th-rows[class*=th-def-box] .th-box:not(.th-otl-reset) {
	border-radius: var(--gh-radius);
}

/* Linklisten (Downloads, Linksammlungen) */
.th-media .th-lst-body > li > a,
.th-nav-submenu .th-lst-body > li > a {
	border-radius: var(--gh-radius-sm);
}
.th-media .th-lst-head,
.th-nav-submenu .th-lst-head,
#tsk-map-filter .th-lst-head {
	border-start-start-radius: var(--gh-radius);
	border-start-end-radius: var(--gh-radius);
}

/* --------------------------------------------------------------------------
   4. Bilder
   Einzeln gerundet (kein overflow:hidden am Container, s. o.)
   -------------------------------------------------------------------------- */
main :is(.ce-gallery, .th-gallery, figure.image, .th-lightbox-opener) img,
main .image-embed-item,
.customer-post img,
.customer-post video {
	border-radius: var(--gh-radius);
}
/* Social-Wall-Karten: Bild liegt unter der Datumszeile -> rundum klein */
.customer-post img,
.customer-post video {
	border-radius: var(--gh-radius-sm);
}
/* "vergrößerte Ansicht"-Schild unten rechts im Bild */
.th-lightbox-opener .th-marker,
.th-marker-wrapper .th-marker {
	border-start-start-radius: var(--gh-radius-sm);
	border-end-end-radius: var(--gh-radius);
}
/* Hintergrundbilder in Teasern (div.th-pic) */
main .th-pic {
	border-radius: var(--gh-radius);
}

/* Teaser-Kacheln im Slider (Bild + Text, Naturweiß/Weiß): Abstand, damit
   die Rundung sichtbar ist; Bild oben gerundet */
.th-slider.th-txt-pos1 .slick-slide,
.th-slider.th-txt-pos1 .slick-slide > div {
	border-radius: var(--gh-radius);
}
/* Slider-Pfeile */
.th-slider .slick-prev,
.th-slider .slick-next {
	border-radius: var(--gh-radius-sm);
}
.th-slider.th-txt-pos1 .slick-slide .th-pic {
	border-end-start-radius: 0;
	border-end-end-radius: 0;
}

/* Videos, Karte */
.gmm-video,
.video-js,
#tsk-map,
.leaflet-container {
	border-radius: var(--gh-radius);
}

/* --------------------------------------------------------------------------
   5. OnePager (body.onepager)
   -------------------------------------------------------------------------- */
.onepager .th-box {
	border-radius: var(--gh-radius);
}
.onepager .th-kvsl img {
	border-radius: var(--gh-radius) var(--gh-radius) 0 0;
}
@media (min-width: 880px) {
	.onepager .th-nav-main-onepager .th-lvl1-lst > li > .th-lvl1-lnk {
		border-start-start-radius: var(--gh-radius-sm);
		border-start-end-radius: var(--gh-radius-sm);
	}
}
.onepager .th-nav-tiny-onepager button {
	border-radius: var(--gh-radius-sm) var(--gh-radius-sm) 0 0;
}

/* --------------------------------------------------------------------------
   6. Ausnahmen: bleiben eckig
   Vollbreite Flächen (box-shadow-Technik) und Header/Footer-Bänder.
   -------------------------------------------------------------------------- */
.th-rows :is(.frame-gh-dark, .frame-gh-light, .gh-band-dark, .gh-band-light):not([class*="col"] *),
.th-content.gh-section-dark,
.th-content.gh-section-light,
.th-header,
.th-footer,
.th-slider:not(.th-txt-pos1):not([class*="col"] *) .slick-slide > div {
	border-radius: 0;
}
/* Bild-Teaser mit Text im Bild innerhalb einer Spalte: gerundet wie Bilder */
[class*="col"] .th-slider.th-txt-pos0 .slick-slide {
	border-radius: var(--gh-radius);
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   7. Suchfeld (Menü-Overlay, Suchseite): Feld + Button als eine Einheit,
   außen gerundet (Basis setzt 2px, Bootstrap nimmt innen die Ecken weg)
   -------------------------------------------------------------------------- */
.th-search .input-group > .form-control:first-child,
.th-search .input-group > input:first-child {
	border-start-start-radius: var(--gh-radius-sm);
	border-end-start-radius: var(--gh-radius-sm);
}
/* Button ist nicht :last-child (Solr-Suggest hängt per JS ein Element an);
   Bootstrap nimmt die rechten Ecken per sehr spezifischem Selektor weg */
.th-search .input-group > button[type=submit] {
	border-start-start-radius: 0 !important;
	border-end-start-radius: 0 !important;
	border-start-end-radius: var(--gh-radius-sm) !important;
	border-end-end-radius: var(--gh-radius-sm) !important;
}
