/* Progress.tz v2.9.9 — Shorts Media Fit + Active Engagement */

.progress-shorts-social{
  --ps-card:#ffffff;
  --ps-surface:#f7f9fc;
  --ps-surface-2:#eef3f8;
  --ps-text:#172033;
  --ps-copy:#344054;
  --ps-muted:#667085;
  --ps-line:#dfe6ee;
  --ps-blue:#17345e;
  --ps-blue-bright:#6ea0ef;
  --ps-blue-soft:#eaf2ff;
  --ps-green:#86c93a;
  --ps-green-soft:#eff8e5;
  --ps-white:#fff;
}

html[data-theme="dark"] .progress-shorts-social,
body[data-theme="dark"] .progress-shorts-social,
html.dark .progress-shorts-social,
body.dark .progress-shorts-social,
.dark-mode .progress-shorts-social,
[data-bs-theme="dark"] .progress-shorts-social{
  --ps-card:#0d1b2a;
  --ps-surface:#112338;
  --ps-surface-2:#162b43;
  --ps-text:#f7f9fc;
  --ps-copy:#d7e1ec;
  --ps-muted:#9fb0c3;
  --ps-line:#294056;
  --ps-blue:#6fa5f4;
  --ps-blue-bright:#7bb0ff;
  --ps-blue-soft:#173353;
  --ps-green:#91d33e;
  --ps-green-soft:#203818;
}

/* Remove publisher header entirely */
.progress-shorts-social [data-ps-post="1"] > .ps-post-header,
.progress-shorts-social .ps-post-header{
  display:none!important;
}

/* Force canonical card order */
.progress-shorts-social [data-ps-post="1"]{
  display:flex!important;
  flex-direction:column!important;
  background:var(--ps-card)!important;
  color:var(--ps-text)!important;
  border-color:var(--ps-line)!important;
}

/* Media first and fitted */
.progress-shorts-social [data-ps-post="1"] > .ps-media{
  order:1!important;
}

.progress-shorts-social .ps-media{
  width:100%!important;
  aspect-ratio:auto!important;
  min-height:0!important;
  max-height:none!important;
  background:var(--ps-surface)!important;
  overflow:hidden!important;
  border-bottom:1px solid var(--ps-line)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}

.progress-shorts-social .ps-media img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:680px!important;
  object-fit:contain!important;
  object-position:center!important;
  background:var(--ps-surface)!important;
}

.progress-shorts-social .ps-media video,
.progress-shorts-social .ps-media iframe{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:680px!important;
  aspect-ratio:16/9!important;
  object-fit:contain!important;
  object-position:center!important;
  background:#000!important;
}

/* Body */
.progress-shorts-social [data-ps-post="1"] > .ps-body{order:2!important}

.progress-shorts-social .ps-body{
  background:var(--ps-card)!important;
  padding:16px 18px 12px!important;
}

.progress-shorts-social .ps-title{
  margin:0 0 8px!important;
  font-size:19px!important;
  line-height:1.35!important;
  font-weight:800!important;
}

.progress-shorts-social .ps-title a{
  color:var(--ps-text)!important;
  text-decoration:none!important;
}

.progress-shorts-social .ps-title a:hover,
.progress-shorts-social .ps-title a:focus-visible{
  color:var(--ps-blue)!important;
  text-decoration:underline!important;
  text-underline-offset:3px!important;
}

.progress-shorts-social .ps-story-text{
  color:var(--ps-copy)!important;
  font-size:14.5px!important;
  line-height:1.55!important;
  -webkit-line-clamp:4!important;
  max-height:6.2em!important;
}

.progress-shorts-social .ps-caption{
  color:var(--ps-muted)!important;
}

/* Metric rail */
.progress-shorts-social [data-ps-post="1"] > .ps-engagement{order:3!important}

.progress-shorts-social .ps-engagement{
  padding:10px 16px!important;
  background:var(--ps-card)!important;
  border-top:1px solid var(--ps-line)!important;
}

.progress-shorts-social .ps-metrics{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}

.progress-shorts-social .ps-metric{
  border:1px solid transparent!important;
  transition:transform .15s ease,filter .15s ease!important;
}

.progress-shorts-social .ps-metric--views,
.progress-shorts-social .ps-metric--share{
  color:var(--ps-blue-bright)!important;
  background:var(--ps-blue-soft)!important;
  border-color:color-mix(in srgb,var(--ps-blue-bright) 22%, transparent)!important;
}

.progress-shorts-social .ps-metric--likes,
.progress-shorts-social .ps-metric--comments{
  color:var(--ps-green)!important;
  background:var(--ps-green-soft)!important;
  border-color:color-mix(in srgb,var(--ps-green) 22%, transparent)!important;
}

/* Action rail */
.progress-shorts-social [data-ps-post="1"] > .ps-actions{order:4!important}

.progress-shorts-social .ps-actions{
  background:var(--ps-card)!important;
  border-top:1px solid var(--ps-line)!important;
  border-bottom:1px solid var(--ps-line)!important;
}

.progress-shorts-social .ps-action{
  color:var(--ps-muted)!important;
  cursor:pointer!important;
}

.progress-shorts-social .ps-action:hover,
.progress-shorts-social .ps-action:focus-visible{
  background:var(--ps-surface-2)!important;
}

.progress-shorts-social .ps-action[data-action="like"].is-active{
  color:var(--ps-green)!important;
}

/* Comments */
.progress-shorts-social [data-ps-post="1"] > .ps-comments{order:5!important}

.progress-shorts-social .ps-comments{
  background:var(--ps-card)!important;
}

.progress-shorts-social .ps-comments.is-collapsed .ps-comment-list,
.progress-shorts-social .ps-comments.is-collapsed .ps-comment-compose{
  display:none!important;
}

.progress-shorts-social .ps-comment-bubble,
.progress-shorts-social .ps-comment-compose input{
  background:var(--ps-surface-2)!important;
  color:var(--ps-copy)!important;
  border-color:var(--ps-line)!important;
}

/* Read full story stays last */
.progress-shorts-social [data-ps-post="1"] > .ps-read-more-footer{order:6!important}

.progress-shorts-social .ps-read-more-footer{
  background:var(--ps-card)!important;
  padding:10px 18px 16px!important;
}

.progress-shorts-social .ps-read-more-footer a{
  background:var(--ps-blue-bright)!important;
  color:#fff!important;
}

@media(max-width:560px){
  .progress-shorts-social .ps-media img,
  .progress-shorts-social .ps-media video,
  .progress-shorts-social .ps-media iframe{
    max-height:520px!important;
  }

  .progress-shorts-social .ps-title{
    font-size:17px!important;
  }
}