/* Smart Also Read – Pro (v2.5)
   Premium + simple + mobile friendly (inline)
   CSS vars: --sarp-accent, --sarp-bg, --sarp-text
*/

/* New premium list design (v2.5.2 compact patch)
   Supports thumbnails + separate blocks per paragraph
   Goal: slimmer box / not too tall
*/

.sarp-box{
  margin: 14px 0;
  padding: 12px;
  background: var(--sarp-bg, transparent);
  border: 1px solid rgba(17,24,39,0.03);
  border-radius: 12px;
  box-shadow: none;
  color: var(--sarp-text, #111827);
}

.sarp-box__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.sarp-box__label{
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .2px;
  color: var(--sarp-text, #111827);
}

.sarp-box__items{
  display: grid;
  gap: 8px;
}

/* Desktop: show 2 columns when possible */
@media (min-width: 860px){
  .sarp-box__items{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

.sarp-box__item{
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 10px;
  border-radius: 10px;
  transition: background .15s ease, transform .05s ease;
}

.sarp-box__item:hover{
  background: rgba(17,24,39,0.008);
}

/* Slight highlight for the first external item (optional) */
.sarp-box__item--featured{
  background: rgba(67,56,202,0.03);
  border: 1px solid rgba(67,56,202,0.10);
}

.sarp-box__item:active{
  transform: translateY(0.5px);
}

.sarp-box__item:focus{
  outline: 2px solid rgba(67,56,202,0.22);
  outline-offset: 2px;
}

.sarp-box__thumb{
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(17,24,39,0.03);
}

.sarp-box__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sarp-box__body{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sarp-box__title{
  color: var(--sarp-accent, #4338ca);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sarp-box__excerpt{
  color: rgba(17,24,39,0.58);
  font-size: 13px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Source badge removed in v2.6+ */

@media (max-width: 520px){
  .sarp-box{ padding: 10px; margin: 12px 0; }
  .sarp-box__thumb{ width: 44px; height: 44px; flex-basis: 44px; }
  .sarp-box__item{ padding: 8px; }
  .sarp-box__title{ font-size: 14px; }
}

/* Inline style (one-line) */
.sarp-inline{
  margin: 12px 0;
  padding: 8px 0;
  border-top: 1px solid rgba(17,24,39,0.05);
  border-bottom: 1px solid rgba(17,24,39,0.05);
  background: var(--sarp-bg, transparent);
  color: var(--sarp-text, #111827);
}

.sarp-inline__label{
  font-weight: 600;
  letter-spacing: .2px;
  margin-right: 6px;
  color: var(--sarp-text, #111827);
}

.sarp-inline__list{
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.sarp-inline__item{
  position: relative;
  padding-left: 10px;
}

.sarp-inline__item:first-child{
  padding-left: 0;
}

.sarp-inline__item:not(:first-child)::before{
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: rgba(17,24,39,0.35);
}

.sarp-inline__link{
  color: var(--sarp-accent, #4338ca);
  text-decoration: none;
  font-weight: 500;
}

.sarp-inline__link:hover{
  text-decoration: underline;
}

/* Mobile: keep it in one line with smooth horizontal scroll */
@media (max-width: 520px){
  .sarp-inline{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .sarp-inline__list{
    flex-wrap: nowrap;
  }
  .sarp-inline__item{
    white-space: nowrap;
  }
  .sarp-inline::-webkit-scrollbar{
    display:none;
  }
}
