/*
Theme Name: Sheshi Taxonomy and System Page Closure
Version: 0.32.1
Description: Aligns archive, directory, organisation, form, legal and travel surfaces with the compact portal system.
*/

/* Taxonomy pages now use the same dense, whole-row decision pattern as search. */
body.archive.sheshi-shell .sheshi-results-page {
  padding: 34px 0 64px !important;
}

body.archive.sheshi-shell .sheshi-results-page > .sheshi-wrap {
  /* Keep the global responsive inline gutter; only remove vertical surface padding. */
  padding-block: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px 24px !important;
  align-items: end !important;
  margin-bottom: 22px !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-breadcrumb {
  display: flex !important;
  grid-column: 1 / -1 !important;
  gap: 7px !important;
  align-items: center !important;
  color: var(--text-muted) !important;
  font-size: 12.5px !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-breadcrumb a {
  color: var(--accent-text) !important;
  text-decoration: none !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-head h1 {
  grid-column: 1 !important;
  margin: 0 !important;
  font-size: clamp(34px, 4vw, 46px) !important;
  letter-spacing: -.045em !important;
  line-height: 1.02 !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-head .sheshi-results-summary {
  max-width: 66ch !important;
  grid-column: 1 !important;
  margin: 0 !important;
  color: var(--text-secondary) !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-count {
  grid-column: 2 !important;
  grid-row: 2 / span 2 !important;
  margin: 0 !important;
  padding-bottom: 2px !important;
  color: var(--text-muted) !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-count strong {
  color: var(--text-primary) !important;
  font-size: 18px !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results {
  display: block !important;
  overflow: visible !important;
  margin: 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--border) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-card--directory-row {
  position: relative !important;
  display: grid !important;
  width: 100% !important;
  min-height: 96px !important;
  grid-template-columns: 40px minmax(0, 1fr) 24px !important;
  gap: 14px !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 12px 4px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-card--directory-row:hover,
body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-card--directory-row:focus-within {
  background: var(--surface-sunken) !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-card-hitarea {
  position: absolute !important;
  z-index: 2 !important;
  inset: 0 !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-card-hitarea:focus-visible {
  outline: 3px solid var(--focus) !important;
  outline-offset: -3px !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-category-icon {
  width: 40px !important;
  height: 40px !important;
  align-self: center !important;
  padding: 9px !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: var(--accent) !important;
  background: var(--surface-sunken) !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-body {
  min-width: 0 !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-title-row {
  display: block !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results h2 {
  display: inline !important;
  margin: 0 !important;
  color: var(--text-primary) !important;
  font-size: 17px !important;
  font-weight: 720 !important;
  line-height: 1.32 !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results h2 .sheshi-meta-chip {
  display: inline-flex !important;
  min-height: 20px !important;
  align-items: center !important;
  margin: 0 0 1px 6px !important;
  padding: 1px 6px !important;
  vertical-align: baseline !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-title-place {
  color: var(--text-secondary) !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-facts {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0 !important;
  margin: 4px 0 0 !important;
  color: var(--text-muted) !important;
  font-size: 12.5px !important;
  line-height: 1.35 !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-facts > span {
  display: inline-flex !important;
  align-items: baseline !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-facts > span + span::before {
  content: none !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-separator {
  margin: 0 8px !important;
  color: var(--accent) !important;
  font-weight: 800 !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-country {
  color: var(--text-secondary) !important;
  font-weight: 600 !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-description {
  display: -webkit-box !important;
  margin: 3px 0 0 !important;
  overflow: hidden !important;
  color: var(--text-secondary) !important;
  font-size: 13.5px !important;
  line-height: 1.4 !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 1 !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-row-arrow {
  color: var(--accent) !important;
  font-size: 20px !important;
  line-height: 1 !important;
  text-align: right !important;
  transition: transform 150ms ease !important;
}

body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-card--directory-row:hover .sheshi-result-row-arrow {
  transform: translateX(2px) !important;
}

body.tax-listing-category.sheshi-shell .sheshi-taxonomy-results .sheshi-result-card--directory-row.is-uniform-category {
  grid-template-columns: minmax(0, 1fr) 24px !important;
}

body.tax-listing-category.sheshi-shell .sheshi-taxonomy-results .sheshi-result-card--directory-row.is-uniform-category .sheshi-result-body {
  grid-column: 1 !important;
}

body.tax-listing-category.sheshi-shell .sheshi-taxonomy-results .sheshi-result-card--directory-row.is-uniform-category .sheshi-result-row-arrow {
  grid-column: 2 !important;
}

/* Content pages use whitespace as the frame; cards are reserved for decisions and forms. */
body.sheshi-shell .sheshi-page:not(.sheshi-results-page) {
  padding: 38px 0 64px !important;
}

body.sheshi-shell .sheshi-page:not(.sheshi-results-page) article.sheshi-content-page {
  width: 100% !important;
  max-width: 960px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.sheshi-shell .sheshi-page article.sheshi-content-page::before,
body.sheshi-shell .sheshi-page article.sheshi-content-page > .sheshi-kicker {
  display: none !important;
}

body.sheshi-shell .sheshi-page article.sheshi-content-page > h1 {
  max-width: 18ch !important;
  margin: 0 !important;
  font-size: clamp(38px, 4.4vw, 54px) !important;
  line-height: 1 !important;
}

body.sheshi-shell .sheshi-page article.sheshi-content-page .entry-content {
  max-width: 780px !important;
  margin-top: 22px !important;
}

body.sheshi-shell .sheshi-page article.sheshi-content-page .entry-content h2 {
  margin-top: 30px !important;
  font-size: 24px !important;
  line-height: 1.15 !important;
}

body.sheshi-shell .sheshi-page article.sheshi-content-page--fuer-organisationen {
  max-width: none !important;
}

body.sheshi-shell .sheshi-page article.sheshi-content-page--fuer-organisationen .entry-content {
  max-width: none !important;
}

body.sheshi-shell .sheshi-page .sheshi-offer-grid-page {
  gap: 14px !important;
  margin-top: 26px !important;
  border-top: 0 !important;
}

body.sheshi-shell .sheshi-page .sheshi-offer-grid-page .sheshi-offer-card {
  min-height: 270px !important;
  padding: 22px !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
}

body.sheshi-shell .sheshi-page .sheshi-offer-grid-page .sheshi-offer-card > p:empty {
  display: none !important;
  margin: 0 !important;
}

body.sheshi-shell .sheshi-page .sheshi-offer-grid-page .sheshi-offer-number {
  width: 34px !important;
  height: 34px !important;
  margin: 0 0 22px !important;
}

body.sheshi-shell .sheshi-page .sheshi-offer-grid-page .sheshi-offer-card > h2 {
  margin: 8px 0 10px !important;
  font-size: 26px !important;
}

body.sheshi-shell .sheshi-page .sheshi-offer-grid-page .sheshi-offer-card > .sheshi-offer-label {
  margin: 0 0 8px !important;
}

body.sheshi-shell .sheshi-page .sheshi-offer-grid-page .sheshi-offer-card > p:not(.sheshi-offer-label):not(.sheshi-offer-action) {
  margin: 0 0 18px !important;
}

body.sheshi-shell .sheshi-page .sheshi-offer-grid-page .sheshi-offer-action {
  margin-top: auto !important;
}

body.sheshi-shell .sheshi-page .sheshi-offer-grid-page .sheshi-offer-action a {
  display: flex !important;
  min-height: 44px !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 0 0 !important;
  border-top: 1px solid var(--border) !important;
}

body.sheshi-shell .sheshi-page article.sheshi-content-page--aufnahme-vorschlagen,
body.sheshi-shell .sheshi-page article.sheshi-content-page--korrektur-melden {
  max-width: 900px !important;
}

body.sheshi-shell .sheshi-page article.sheshi-content-page .sheshi-form-section {
  margin: 32px 0 0 !important;
  padding: 30px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--border) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

body.sheshi-shell .sheshi-page article.sheshi-content-page .sheshi-form-section > .sheshi-kicker {
  display: none !important;
}

body.sheshi-shell .sheshi-page article.sheshi-content-page .sheshi-beta-form {
  margin-top: 18px !important;
  background: var(--surface-sunken) !important;
}

/* Directory and travel heroes share the page axis instead of floating in panels. */
body.sheshi-shell .sheshi-directory-hero,
body.sheshi-shell .sheshi-travel-hero {
  padding: 38px 0 26px !important;
}

body.sheshi-shell .sheshi-directory-hero > .sheshi-wrap,
body.sheshi-shell .sheshi-travel-hero > .sheshi-wrap {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.sheshi-shell .sheshi-directory-hero h1,
body.sheshi-shell .sheshi-travel-hero h1 {
  margin-top: 0 !important;
}

body.sheshi-shell .sheshi-directory-hero .sheshi-search-directory {
  margin-top: 18px !important;
}

body.sheshi-shell .sheshi-directory-section,
body.sheshi-shell .sheshi-travel-section {
  padding: 38px 0 !important;
}

body.sheshi-shell .sheshi-directory-section:first-of-type {
  padding-top: 24px !important;
}

body.sheshi-shell .sheshi-directory-index > a {
  height: auto !important;
  min-height: 84px !important;
  grid-template-columns: 38px minmax(0, 1fr) auto !important;
  grid-template-rows: 1fr !important;
  align-items: center !important;
  padding: 13px 14px !important;
}

body.sheshi-shell .sheshi-directory-index > a .sheshi-category-icon {
  width: 38px !important;
  height: 38px !important;
  grid-row: 1 !important;
  padding: 8px !important;
}

body.sheshi-shell .sheshi-directory-index > a strong,
body.sheshi-shell .sheshi-directory-index > a small {
  grid-row: 1 !important;
  align-self: center !important;
}

body.sheshi-shell .sheshi-directory-index > a strong {
  grid-column: 2 !important;
  font-size: 15px !important;
  line-height: 1.3 !important;
}

body.sheshi-shell .sheshi-directory-index > a small {
  display: block !important;
  grid-column: 3 !important;
  color: var(--text-muted) !important;
  white-space: nowrap !important;
}

body.sheshi-shell .sheshi-location-column > h3 {
  margin: 0 !important;
  padding: 18px 18px 10px !important;
  font-size: 17px !important;
}

body.sheshi-shell .sheshi-location-list a:hover,
body.sheshi-shell .sheshi-location-list a:focus-visible {
  color: var(--text-primary) !important;
  background: var(--accent-bg) !important;
}

body.sheshi-shell .sheshi-location-list a:hover *,
body.sheshi-shell .sheshi-location-list a:focus-visible * {
  color: inherit !important;
}

body.sheshi-shell .sheshi-travel-context {
  margin: 0 0 10px !important;
  color: var(--text-muted) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

@media (max-width: 767px) {
  body.archive.sheshi-shell .sheshi-results-page {
    padding: 22px 0 48px !important;
  }

  body.archive.sheshi-shell .sheshi-taxonomy-head {
    display: block !important;
    margin-bottom: 16px !important;
  }

  body.archive.sheshi-shell .sheshi-taxonomy-breadcrumb {
    margin-bottom: 10px !important;
  }

  body.archive.sheshi-shell .sheshi-taxonomy-head h1 {
    font-size: 30px !important;
  }

  body.archive.sheshi-shell .sheshi-taxonomy-head .sheshi-results-summary {
    margin-top: 7px !important;
    font-size: 14px !important;
  }

  body.archive.sheshi-shell .sheshi-taxonomy-count {
    margin-top: 12px !important;
  }

  body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-card--directory-row,
  body.tax-listing-category.sheshi-shell .sheshi-taxonomy-results .sheshi-result-card--directory-row.is-uniform-category {
    min-height: 108px !important;
    grid-template-columns: minmax(0, 1fr) 20px !important;
    gap: 10px !important;
    padding: 12px 0 !important;
  }

  body.tax-location.sheshi-shell .sheshi-taxonomy-results .sheshi-result-card--directory-row {
    grid-template-columns: 36px minmax(0, 1fr) 20px !important;
    gap: 10px !important;
  }

  body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-category-icon {
    width: 36px !important;
    height: 36px !important;
    padding: 8px !important;
  }

  body.archive.sheshi-shell .sheshi-taxonomy-results h2 {
    font-size: 16px !important;
  }

  body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-description {
    -webkit-line-clamp: 2 !important;
  }

  body.sheshi-shell .sheshi-page:not(.sheshi-results-page) {
    padding: 22px 0 48px !important;
  }

  body.sheshi-shell .sheshi-page:not(.sheshi-results-page) article.sheshi-content-page {
    padding: 0 !important;
  }

  body.sheshi-shell .sheshi-page article.sheshi-content-page > h1 {
    font-size: 32px !important;
  }

  body.sheshi-shell .sheshi-page article.sheshi-content-page .entry-content {
    margin-top: 18px !important;
  }

  body.sheshi-shell .sheshi-page .sheshi-offer-grid-page .sheshi-offer-card {
    min-height: 0 !important;
    padding: 18px !important;
  }

  body.sheshi-shell .sheshi-page .sheshi-offer-grid-page .sheshi-offer-number {
    margin-bottom: 14px !important;
  }

  body.sheshi-shell .sheshi-page .sheshi-offer-grid-page .sheshi-offer-card > h2 {
    font-size: 23px !important;
  }

  body.sheshi-shell .sheshi-directory-hero,
  body.sheshi-shell .sheshi-travel-hero {
    padding: 24px 0 20px !important;
  }

  body.sheshi-shell .sheshi-directory-hero > .sheshi-wrap,
  body.sheshi-shell .sheshi-travel-hero > .sheshi-wrap {
    padding: 0 !important;
  }

  body.sheshi-shell .sheshi-directory-section,
  body.sheshi-shell .sheshi-travel-section {
    padding: 30px 0 !important;
  }

  body.sheshi-shell .sheshi-directory-section:first-of-type {
    padding-top: 18px !important;
  }

  body.sheshi-shell .sheshi-directory-index > a {
    height: auto !important;
    min-height: 64px !important;
    grid-template-columns: 38px minmax(0, 1fr) auto !important;
    grid-template-rows: minmax(38px, auto) !important;
    gap: 10px !important;
    padding: 12px 14px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.archive.sheshi-shell .sheshi-taxonomy-results .sheshi-result-row-arrow {
    transition: none !important;
  }
}
