/* ==========================================================================
   Lernapp-Profile auf /apps/lernapps/ (AppProfile.tsx)

   Pro App ein Kapitel: Screenshot, Beschreibungstext, Merkmalsliste und
   darunter das redaktionelle Testurteil mit Note. Die Farbtoken sind dieselben
   wie in .kl-verdict (ninja-tables.css), damit Pro- und Contra-Spalten überall
   auf der Seite gleich aussehen.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Wertungszeile auf den Karten der Übersichtsliste (AppsFilter.tsx)
   -------------------------------------------------------------------------- */

.app-card-rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0.35rem 0 0.6rem;
}

/* Sterne kommen aus Stars.tsx im Site-Reviews-Markup:
   Sowohl in der Kartenliste (.headerbox) als auch im Urteilskasten (.app-verdict)
   und in den Store-Ratings (.app-storeratings) greift die saubere SVG-Darstellung
   aus site-reviews.css ohne alte Kachel-Hintergründe oder Pseudo-Elemente. */
.headerbox .app-card-rating .glsr-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.headerbox .app-card-rating .glsr-star {
  width: 18px;
  height: 18px;
  margin-right: 1px;
  background-size: 18px 18px;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

.headerbox .app-card-rating .glsr-star::before {
  content: none !important;
}

.app-verdict-score .glsr-star-rating {
  --glsr-review-star: 21px;
  --glsr-summary-star: 21px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.app-verdict-score .glsr-star {
  width: 21px;
  height: 21px;
  background-size: 21px 21px;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

.app-verdict-score .glsr-star::before {
  content: none !important;
}

.app-card-score {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dunkelblau, #2c5669);
}

.app-card-scorelabel {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

/* Nutzerbewertungen stehen bewusst hinter dem Testurteil und kleiner: sie sind
   der Gegenpol zur Redaktionsnote, nicht deren Ersatz. */
.app-card-users {
  flex-basis: 100%;
  font-size: 0.82rem;
  color: #64748b;
}

.app-card-jump {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Die importierten WordPress-Regeln verteilen Bild, Text und Fußzeile sehr
   großzügig. Auf der Vergleichsübersicht werden daraus kompakte Karten mit
   stabiler Logo-Spalte und einer sauber am unteren Rand sitzenden Aktionszeile. */
.term-lernapps.tax-apps .facetwp-template .headerbox {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 1.25rem;
  min-height: 0;
  padding: 1.25rem;
  border: 1px solid #dce8ef;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(25, 51, 63, 0.07);
}
.term-lernapps.tax-apps .headerbox > a {
  align-self: start;
}
.term-lernapps.tax-apps .headerbox .imgfilter {
  display: grid;
  place-items: center;
  width: 96px;
  min-width: 96px;
  max-width: 96px;
  height: 96px;
  margin: 0;
  padding: 10px;
  border: 1px solid #e5edf2;
  border-radius: 8px;
  background: #fff;
}
.term-lernapps.tax-apps .headerbox .imgfilter img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.term-lernapps.tax-apps .headerbox .teasermid {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.term-lernapps.tax-apps .headerbox .teasermid h2 {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
}
.term-lernapps.tax-apps .headerbox .teasermid p.excerptcourse {
  margin: 0.3rem 0 1rem;
  line-height: 1.55;
}
.term-lernapps.tax-apps .headerbox .bottomteaser,
.tax-apps .headerbox .bottomteaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  width: 100%;
}
.term-lernapps.tax-apps .headerbox .catterm,
.term-lernapps.tax-apps .headerbox .catdesign,
.tax-apps .headerbox .catterm,
.tax-apps .headerbox .catdesign {
  position: static;
  right: auto;
  left: auto;
  top: auto;
  bottom: auto;
  margin: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  line-height: normal;
}
.term-lernapps.tax-apps .headerbox .app-card-jump,
.tax-apps .headerbox .app-card-jump {
  margin-left: auto;
}
@media only screen and (max-width: 560px) {
  .term-lernapps.tax-apps .facetwp-template .headerbox {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 0.85rem;
    padding: 1rem;
  }
  .term-lernapps.tax-apps .headerbox .imgfilter {
    width: 64px;
    min-width: 64px;
    max-width: 64px;
    height: 64px;
    padding: 7px;
  }
  .term-lernapps.tax-apps .headerbox .bottomteaser,
  .tax-apps .headerbox .bottomteaser {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
  }
  .term-lernapps.tax-apps .headerbox .app-card-jump,
  .tax-apps .headerbox .app-card-jump { margin-left: 0; }
}

/* Kategorietext unter den Profilen: dieselbe Lesebreite wie die Profile davor. */
.app-category-text {
  padding-top: 2.2rem;
  border-top: 1px solid #e3e9f0;
}

.app-category-text h2 {
  scroll-margin-top: 120px;
}

/* Tabelle im Kategorietext (z. B. Preisvergleich): ohne eigene Regel läuft eine
   Tabelle mit Browser-Defaults breiter als die Spalte und sprengt die Seite nach
   rechts. Gleicher Kniff wie bei .entry-content-html in blog-post.css: die
   Tabelle scrollt in sich, statt das Grid zu sprengen. */
.app-category-text table {
  display: block;
  width: 100%;
  margin: 1.8em 0 2em;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.app-category-text th,
.app-category-text td {
  padding: 12px 16px;
  border-bottom: 1px solid #e3e9f0;
  text-align: left;
  vertical-align: top;
}
.app-category-text thead th {
  background: #f7fafc;
  border-bottom: 2px solid #ffb424;
  color: #19333f;
  font-weight: 700;
  white-space: nowrap;
}
.app-category-text tbody tr:last-child td {
  border-bottom: 0;
}

.app-profile {
  --app-ink: #19333f;
  --app-text: #333f4d;
  --app-rule: #e3e9f0;
  --app-pro: #1c7a4d;
  --app-con: #a4552a;
  padding-top: 2.2rem;
  margin-bottom: 2.6rem;
  border-top: 1px solid var(--app-rule);
  color: var(--app-text);
}

/* Erstes Kapitel schließt direkt an die Einleitung an; die Trennlinie darüber
   wirkte dort wie ein zweiter Seitenanfang. */
.app-profile:first-child {
  padding-top: 0;
  border-top: 0;
}

/* Sprungziel sitzt am <article>. Ohne Versatz verschwindet die Überschrift
   hinter dem fixierten Kopfbereich der Seite. */
.app-profile {
  scroll-margin-top: 120px;
}

.app-profile-title {
  margin: 0 0 0.9rem;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  line-height: 1.25;
  color: var(--app-ink);
}

.app-profile-shot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 480px;
  max-height: 260px;
  width: 100%;
  margin: 0 0 1.4rem;
  padding: 1.2rem;
  border: 1px solid var(--app-rule);
  border-radius: 14px;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}

.app-profile-shot img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.app-profile-subtitle {
  margin: 1.4rem 0 0.7rem;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--app-ink);
}

.app-profile-text p {
  margin: 0 0 1em;
  font-size: 1rem;
  line-height: 1.7;
}

.app-profile-text p:last-child {
  margin-bottom: 0;
}

.app-profile-features {
  margin: 1.4rem 0 0;
  padding: 16px 20px;
  border: 1px solid var(--app-rule);
  border-radius: 12px;
  background: var(--hellblau, #edf5ff);
}

.app-profile-features h3 {
  margin: 0 0 0.7em;
  font-size: 1rem;
  font-weight: 700;
  color: var(--dunkelblau, #2c5669);
}

.app-profile-features ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-profile-features li {
  position: relative;
  margin: 0 0 0.55em;
  padding-left: 26px;
  font-size: 0.96rem;
  line-height: 1.6;
}

.app-profile-features li:last-child {
  margin-bottom: 0;
}

/* Häkchen als Maske statt als Bilddatei: die Farbe kommt aus dem Token und es
   entsteht keine zweite Anfrage. */
.app-profile-features li::before {
  content: "";
  position: absolute;
  top: 0.28em;
  left: 0;
  width: 17px;
  height: 17px;
  background-color: var(--app-pro);
  -webkit-mask: var(--app-check) center / contain no-repeat;
  mask: var(--app-check) center / contain no-repeat;
  --app-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}

.app-profile-more {
  display: flex;
  margin: 1.25rem 0 0;
}

.app-profile .app-profile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border: 1px solid #2c5669;
  border-radius: 8px;
  background: #2c5669;
  color: #fff;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.app-profile .app-profile-button:hover {
  border-color: #19333f;
  background: #19333f;
  color: #fff;
  text-decoration: none;
}

.app-profile .app-profile-button:focus-visible {
  outline: 3px solid #2c5669;
  outline-offset: 4px;
}

/* --------------------------------------------------------------------------
   Testurteil
   -------------------------------------------------------------------------- */

.app-verdict {
  --app-ink: #19333f;
  --app-text: #333f4d;
  --app-rule: #e3e9f0;
  --app-pro: #1c7a4d;
  --app-con: #a4552a;
  margin: 1.6rem 0 0;
  padding: 24px 0 0;
  border: 0;
  border-top: 3px solid var(--dunkelblau, #2c5669);
  border-radius: 0;
  background: transparent;
  color: var(--app-text);
}

.app-verdict-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 1.2rem;
}

.app-verdict-headtext {
  min-width: 0;
}

.app-verdict-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dunkelblau, #2c5669);
}

.app-verdict-headline {
  margin: 0.25em 0 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--app-ink);
}

.app-verdict-score {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: #edf5ff;
  flex-shrink: 0;
}

.app-verdict-value {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  color: var(--dunkelblau, #2c5669);
}

.app-verdict-scale {
  font-size: 0.85rem;
  color: #64748b;
}

.app-verdict-text p {
  margin: 0 0 0.9em;
  font-size: 0.98rem;
  line-height: 1.7;
}

.app-verdict-text p:last-child {
  margin-bottom: 0;
}

.app-verdict-for {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 1em 0 0;
  padding: 10px 14px;
  border-left: 3px solid var(--dunkelblau, #2c5669);
  border-radius: 0 6px 6px 0;
  background: #f1f6fb;
  font-size: 0.96rem;
  line-height: 1.6;
}

.app-verdict-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 1.35rem;
  border-top: 1px solid var(--app-rule);
  border-bottom: 1px solid var(--app-rule);
}

.app-verdict-card {
  padding: 16px 18px 17px;
  border: 0;
  border-top: 3px solid var(--app-side, var(--app-ink));
  border-radius: 0;
  background: transparent;
}

.app-verdict-card.is-pro {
  --app-side: var(--app-pro);
}

.app-verdict-card.is-con {
  --app-side: var(--app-con);
  border-left: 1px solid var(--app-rule);
}

.app-verdict-card h4 {
  margin: 0 0 0.7em;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--app-side);
}

.app-verdict-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-verdict-card li {
  position: relative;
  margin: 0 0 0.6em;
  padding-left: 18px;
  font-size: 0.92rem;
  line-height: 1.55;
}

.app-verdict-card li:last-child {
  margin-bottom: 0;
}

.app-verdict-card li::before {
  content: "";
  position: absolute;
  top: 0.6em;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--app-side, var(--app-ink));
}

.app-verdict-note {
  margin: 1.1rem 0 0;
  padding-top: 0;
  border-top: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #64748b;
}

/* --------------------------------------------------------------------------
   Externe App Bewertungen (App Store / Google Play)
   -------------------------------------------------------------------------- */

.app-storeratings {
  --app-ink: #19333f;
  --app-text: #333f4d;
  --app-rule: #e3e9f0;
  margin: 1.4rem 0 0;
  padding: 20px 22px;
  border: 1px solid var(--app-rule);
  border-radius: 14px;
  background: #fbfcfd;
  color: var(--app-text);
}

.app-storeratings-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dunkelblau, #2c5669);
}

.app-storeratings-intro {
  margin: 0.4em 0 1.1rem;
  font-size: 0.98rem;
  line-height: 1.6;
}

.app-storeratings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.app-storeratings-grid.is-single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 320px;
}

.app-storeratings-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--app-rule);
  border-radius: 12px;
  background: #f7f9fb;
  color: inherit;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.app-storeratings-card[href] {
  cursor: pointer;
}

.app-storeratings-card[href]:hover {
  border-color: #9eb9c9;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transform: translateY(-2px);
}

.app-storeratings-card[href]:focus-visible {
  outline: 3px solid var(--dunkelblau, #2c5669);
  outline-offset: 3px;
}

.app-storeratings-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  margin-top: 3px;
  object-fit: contain;
}

.app-storeratings-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.app-storeratings-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.app-storeratings-value {
  margin-top: 2px;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--app-ink);
}

.app-storeratings-body .glsr-star-rating {
  --glsr-review-star: 18px;
  --glsr-summary-star: 18px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 3px 0;
}

.app-storeratings-body .glsr-star {
  width: 18px;
  height: 18px;
  background-size: 18px 18px;
  background-color: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

.app-storeratings-body .glsr-star::before {
  content: none !important;
}

.app-storeratings-count {
  font-size: 0.85rem;
  color: #64748b;
}

.app-storeratings-note {
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--app-rule);
  font-size: 0.8rem;
  line-height: 1.5;
  color: #64748b;
}

@media (max-width: 767px) {
  .app-profile .app-profile-button {
    width: 100%;
  }
  .app-verdict-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    border: 0;
  }
  .app-verdict-head {
    align-items: flex-start;
  }
  .app-verdict {
    padding: 20px 0 0;
  }
  .app-verdict-card {
    padding: 14px 0 14px 14px;
  }
  .app-verdict-card.is-con {
    border-left: 0;
    border-top: 1px solid var(--app-rule);
  }
  .app-storeratings-grid {
    grid-template-columns: 1fr;
  }
  .app-storeratings {
    padding: 16px 16px;
  }
}
