/*
Theme Name: Sheshi Compact Discovery Cards
Version: 0.30.2
Description: Compact fixed-height homepage cards with editorial proof, single-line meta and a quiet text-only external action.
*/

body.sheshi-home .sheshi-discovery-head {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  margin-bottom: 20px !important;
}

body.sheshi-home .sheshi-discovery-head h2 {
  margin: 0 !important;
  font-size: 28px !important;
  line-height: 1.15 !important;
  letter-spacing: -.025em !important;
}

body.sheshi-home .sheshi-discovery-head .sheshi-directory-link {
  flex: 0 0 auto;
  justify-self: auto !important;
  margin-left: auto !important;
}

body.sheshi-home .sheshi-discovery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body.sheshi-home .sheshi-discovery-grid > .sheshi-result-card--discovery {
  display: grid !important;
  width: auto !important;
  height: 160px !important;
  min-height: 160px !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  gap: 7px !important;
  padding: 14px 16px !important;
  overflow: visible !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  color: var(--text-primary) !important;
  background: #ffffff !important;
  box-shadow: none !important;
  transform: none !important;
}

body.sheshi-home .sheshi-discovery-grid > .sheshi-result-card--discovery:hover,
body.sheshi-home .sheshi-discovery-grid > .sheshi-result-card--discovery:focus-within {
  border-color: var(--border-strong) !important;
  background: #ffffff !important;
  box-shadow: none !important;
  transform: none !important;
}

body.sheshi-home .sheshi-discovery-card-head {
  display: grid;
  min-width: 0;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  align-items: start;
  gap: 10px;
}

body.sheshi-home .sheshi-discovery-card-head > .sheshi-category-icon {
  width: 36px !important;
  height: 36px !important;
  padding: 8px !important;
  border: 0 !important;
  border-radius: 9px !important;
  color: var(--accent) !important;
  background: var(--surface-muted) !important;
}

body.sheshi-home .sheshi-discovery-card-head > .sheshi-category-icon svg {
  width: 20px !important;
  height: 20px !important;
}

body.sheshi-home .sheshi-discovery-card-identity {
  min-width: 0;
}

body.sheshi-home .sheshi-discovery-card-identity h2 {
  display: flex !important;
  min-width: 0;
  align-items: center;
  gap: 5px;
  margin: 0 !important;
  color: var(--text-primary) !important;
  font-size: 16px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  letter-spacing: -.01em !important;
}

body.sheshi-home .sheshi-discovery-card-name {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.sheshi-home .sheshi-result-card--discovery:hover .sheshi-discovery-card-name,
body.sheshi-home .sheshi-result-card--discovery:focus-within .sheshi-discovery-card-name {
  color: var(--text-primary) !important;
}

body.sheshi-home .sheshi-discovery-proof {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--surface-muted);
  cursor: help;
}

body.sheshi-home .sheshi-discovery-proof svg {
  width: 12px;
  height: 12px;
}

body.sheshi-home .sheshi-discovery-proof::after {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  right: 0;
  width: max-content;
  max-width: 210px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-primary);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(23, 33, 38, .08);
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-2px);
  transition: opacity 120ms ease, transform 120ms ease;
}

body.sheshi-home .sheshi-discovery-proof:hover::after,
body.sheshi-home .sheshi-discovery-proof:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

body.sheshi-home .sheshi-discovery-card-meta {
  display: flex !important;
  min-width: 0;
  height: 22px;
  align-items: center;
  gap: 7px;
  margin: 3px 0 0 !important;
  overflow: hidden;
  color: var(--text-secondary) !important;
  font-size: 13px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.sheshi-home .sheshi-discovery-card-meta .sheshi-meta-chip {
  display: block !important;
  min-width: 0;
  max-width: 58%;
  height: 22px !important;
  min-height: 22px !important;
  flex: 0 1 auto;
  padding: 5px 7px !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 6px !important;
  color: var(--accent) !important;
  background: var(--surface-muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

body.sheshi-home .sheshi-discovery-card-location {
  display: inline-flex;
  min-width: 0;
  flex: 0 1 auto;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

body.sheshi-home .sheshi-discovery-card-location svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

body.sheshi-home .sheshi-discovery-card-location span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.sheshi-home .sheshi-discovery-chevron {
  display: inline-flex;
  width: 16px;
  height: 36px;
  align-items: center;
  justify-content: flex-end;
  color: var(--text-muted);
}

body.sheshi-home .sheshi-discovery-chevron svg {
  width: 16px;
  height: 16px;
}

body.sheshi-home .sheshi-result-card--discovery > .sheshi-result-description {
  display: -webkit-box !important;
  min-height: 39px;
  margin: 0 !important;
  overflow: hidden !important;
  color: var(--text-secondary) !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.sheshi-home .sheshi-discovery-card-foot {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 !important;
  border: 0 !important;
}

body.sheshi-home .sheshi-discovery-card-languages {
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.sheshi-home .sheshi-discovery-card-languages b {
  color: var(--text-secondary);
  font-weight: 650;
}

body.sheshi-home .sheshi-discovery-card-foot .sheshi-result-website {
  position: relative;
  z-index: 2;
  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 44px !important;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  margin: -12px 0 !important;
  padding: 12px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--accent) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  text-decoration: none !important;
}

body.sheshi-home .sheshi-discovery-card-foot .sheshi-result-website svg {
  width: 13px;
  height: 13px;
}

body.sheshi-home .sheshi-discovery-card-foot .sheshi-result-website:hover,
body.sheshi-home .sheshi-discovery-card-foot .sheshi-result-website:focus-visible {
  color: var(--accent-hover) !important;
  background: transparent !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

@media (max-width: 1023px) {
  body.sheshi-home .sheshi-discovery-grid {
    grid-template-columns: none !important;
    grid-auto-flow: column !important;
    grid-auto-columns: calc(50% - 6px) !important;
    gap: 12px !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
  }

  body.sheshi-home .sheshi-discovery-grid > .sheshi-result-card--discovery {
    height: 160px !important;
    min-height: 160px !important;
    scroll-snap-align: start;
  }
}

@media (max-width: 767px) {
  body.sheshi-home .sheshi-discovery-head {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
  }

  body.sheshi-home .sheshi-discovery-head h2 {
    font-size: 24px !important;
  }

  body.sheshi-home .sheshi-discovery-head .sheshi-directory-link {
    padding-inline: 0 !important;
    font-size: 13px !important;
  }

  body.sheshi-home .sheshi-discovery-grid {
    grid-auto-columns: 86vw !important;
    gap: 12px !important;
  }
}

@media (max-width: 359px) {
  body.sheshi-home .sheshi-discovery-head h2 {
    font-size: 22px !important;
  }

  body.sheshi-home .sheshi-discovery-head .sheshi-directory-link {
    font-size: 12px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sheshi-home .sheshi-discovery-proof::after {
    transition: none;
  }
}
