/* PRICEHACK_CPA_RATING_MOBILE_V22_3
   Loaded AFTER v22.1 and legacy CPA CSS. Scoped to closed CPA previews only.
   Desktop: outline thermometer matching the requested control.
   <=600px: small header image, no empty tall photo column; promo/date rows stay single-line.
*/
:is(.ph-cpa-embed,.ph-cpa-standalone) .thermometer-rating {
  position:relative;
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:104px!important;
  height:35px!important;
  min-height:35px!important;
  padding:0 7px!important;
  gap:5px!important;
  background:#fff!important;
  border:1px solid #dce0e5!important;
  border-radius:11px!important;
  box-shadow:none!important;
  overflow:visible!important;
}
:is(.ph-cpa-embed,.ph-cpa-standalone) .thermometer-rating .vote-btn {
  display:grid!important;
  place-items:center!important;
  flex:0 0 21px!important;
  width:21px!important;
  height:28px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:5px!important;
  background:transparent!important;
  cursor:pointer!important;
  transition:transform .15s ease,background .15s ease!important;
}
:is(.ph-cpa-embed,.ph-cpa-standalone) .thermometer-rating .vote-btn:hover {
  transform:scale(1.12)!important;
  background:#f1f5fa!important;
}
:is(.ph-cpa-embed,.ph-cpa-standalone) .thermometer-rating .vote-btn.active {
  background:#eaf2ff!important;
}
:is(.ph-cpa-embed,.ph-cpa-standalone) .thermometer-rating .vote-btn.plus.active {
  background:#fff0ed!important;
}
:is(.ph-cpa-embed,.ph-cpa-standalone) .thermometer-rating .vote-arrow {
  display:block!important;
  width:21px!important;
  height:21px!important;
  font-size:0!important;
  line-height:0!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:20px 20px!important;
  transform:none;
}
:is(.ph-cpa-embed,.ph-cpa-standalone) .thermometer-rating .minus .vote-arrow {
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f80ff' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v15M5 12l7 7 7-7'/%3E%3C/svg%3E")!important;
}
:is(.ph-cpa-embed,.ph-cpa-standalone) .thermometer-rating .plus .vote-arrow {
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ff5548' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21V6M5 12l7-7 7 7'/%3E%3C/svg%3E")!important;
}
:is(.ph-cpa-embed,.ph-cpa-standalone) .thermometer-rating .rating-display {
  position:static!important;
  top:auto!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:19px!important;
  gap:0!important;
  padding:0!important;
  margin:0!important;
  line-height:1!important;
  transform:none!important;
  white-space:nowrap!important;
}
:is(.ph-cpa-embed,.ph-cpa-standalone) .thermometer-rating .rating-score {
  font-family:var(--font-body,Arial,sans-serif)!important;
  font-size:14px!important;
  font-weight:900!important;
  color:#f15124!important;
  line-height:1!important;
}
:is(.ph-cpa-embed,.ph-cpa-standalone) .thermometer-rating .rating-degree {
  position:static!important;
  top:auto!important;
  margin:0!important;
  font-size:12px!important;
  font-weight:900!important;
  color:#f15124!important;
  line-height:1!important;
}
:is(.ph-cpa-embed,.ph-cpa-standalone) .thermometer-rating .rating-display.negative :is(.rating-score,.rating-degree){color:#2f80ff!important}
:is(.ph-cpa-embed,.ph-cpa-standalone) .thermometer-rating .rating-display:hover :is(.rating-score,.rating-degree){transform:scale(1.06)!important}

@media(max-width:600px) {
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon {
    position:relative!important;
    display:grid!important;
    grid-template-columns:88px minmax(0,1fr)!important;
    grid-template-rows:repeat(4,auto) auto auto!important;
    align-items:start!important;
    min-height:0!important;
    height:auto!important;
    max-width:100%!important;
    overflow:hidden!important;
  }
  /* Flatten the details box: the image occupies only the content header;
     code/button and dates span the FULL card width on separate compact rows. */
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .details {
    display:contents!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
  }
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .picture {
    position:relative!important;
    grid-column:1!important;
    grid-row:1 / 5!important;
    align-self:stretch!important;
    min-height:94px!important;
    height:100%!important;
    width:100%!important;
    padding:0!important;
    border-right:1px dashed #d8dfe8!important;
    background:#fff!important;
    overflow:hidden!important;
  }
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .picture img {
    position:absolute!important;
    inset:4px!important;
    width:calc(100% - 8px)!important;
    height:calc(100% - 8px)!important;
    display:block!important;
    padding:0!important;
    object-fit:contain!important;
    object-position:center!important;
    background:#fff!important;
  }
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .pills,
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .merchant,
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .details .title,
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .descr {
    box-sizing:border-box!important;
    min-width:0!important;
    grid-column:2!important;
    width:100%!important;
    padding-left:9px!important;
    padding-right:8px!important;
    margin:0!important;
    align-self:start!important;
  }
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .pills {
    grid-row:1!important;
    display:flex!important;
    flex-wrap:wrap!important;
    gap:3px!important;
    padding-top:8px!important;
    padding-right:113px!important;
  }
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .merchant {
    grid-row:2!important;
    font-size:10px!important;
    padding-top:3px!important;
  }
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .details .title {
    grid-row:3!important;
    display:-webkit-box!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
    line-clamp:2!important;
    overflow:hidden!important;
    font-size:12px!important;
    line-height:1.3!important;
    padding-top:3px!important;
  }
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .descr {
    grid-row:4!important;
    display:-webkit-box!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
    line-clamp:2!important;
    overflow:hidden!important;
    font-size:10.5px!important;
    line-height:1.3!important;
    padding-top:3px!important;
    padding-bottom:5px!important;
  }
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .offer-actions.cpa-row-v81 {
    position:static!important;
    grid-column:1 / -1!important;
    grid-row:5!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    justify-content:flex-end!important;
    align-items:center!important;
    gap:7px!important;
    width:100%!important;
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
    padding:6px 9px 6px!important;
    margin:0!important;
    overflow:visible!important;
  }
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .offer-actions .thermometer-rating {
    position:absolute!important;
    top:7px!important;
    right:8px!important;
    z-index:4!important;
    margin:0!important;
    width:auto!important;
    min-width:104px!important;
  }
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .offer-actions .code.cpa-row-code-v81 {
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 1 auto!important;
    min-width:0!important;
    width:auto!important;
    max-width:calc(100% - 151px)!important;
    height:34px!important;
    min-height:34px!important;
    padding:0 10px!important;
    margin:0 auto 0 0!important;
    font-size:10px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .offer-actions .promo-action.card-promo {
    display:inline-flex!important;
    flex:0 0 auto!important;
    width:auto!important;
    max-width:calc(100% - 7px)!important;
    min-width:0!important;
    height:34px!important;
    min-height:34px!important;
    margin:0 0 0 auto!important;
    padding:0!important;
    background:#ffc900!important;
    overflow:visible!important;
  }
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .offer-actions .card-promo-copy {padding:0 8px!important;flex:0 1 auto!important}
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .offer-actions .promo-label {font-size:var(--promo-badge-text-size,10px)!important;white-space:nowrap!important}
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .offer-actions .promo-cut {flex:0 0 27px!important;width:27px!important;min-width:27px!important}
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .dates {
    grid-column:1 / -1!important;
    grid-row:6!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    flex-wrap:nowrap!important;
    gap:4px!important;
    min-width:0!important;
    width:100%!important;
    padding:6px 9px 7px!important;
    margin:0!important;
    font-size:clamp(8px,2.5vw,10px)!important;
    line-height:1.2!important;
    border-top:1px solid #e7edf2!important;
    white-space:nowrap!important;
    overflow:hidden!important;
  }
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .dates .cpa-date-published {
    min-width:0!important;
    flex:0 1 auto!important;
    font-size:inherit!important;
    white-space:nowrap!important;
  }
  :is(.ph-cpa-embed,.ph-cpa-standalone) .coupon .dates .valid-until {
    flex:0 0 auto!important;
    display:inline-flex!important;
    padding:3px 5px!important;
    gap:3px!important;
    margin:0!important;
    font-size:inherit!important;
    white-space:nowrap!important;
  }
}
