/* Offer Card visual owner.
   Consolidated from the retired ratio/calibration/refinement/cleanup layers.
   Typography lives in ui/typography.css; Discover-only overrides stay page-owned. */

.offer-card.nb-offer-card{
  --nb-offer-card-aspect:202 / 305;
  --nb-offer-visual-share:46%;
  width:202px;
  height:auto;
  max-width:100%;
  aspect-ratio:var(--nb-offer-card-aspect);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  background:#fff;
}

.nb-offer-card .nb-offer-visual{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  height:auto;
  flex:0 0 var(--nb-offer-visual-share);
  padding:17px 14px 10px;
  box-sizing:border-box;
  background:linear-gradient(145deg,#f7f9fc,#eef2f7);
  overflow:hidden;
}

.nb-offer-card .nb-main-art{
  width:min(168px,100%);
  height:auto;
  aspect-ratio:168 / 106;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:12px;
}
.nb-offer-card .nb-main-art img{
  display:block;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  filter:drop-shadow(0 13px 18px rgba(31,45,68,.15));
  transform-origin:center;
}


.nb-offer-card .nb-main-art.is-brand-logo{
  width:min(120px,72%);
  height:auto;
  aspect-ratio:120 / 86;
  border-radius:0;
}
.nb-offer-card .nb-main-art.is-brand-logo img{
  max-width:100%;
  max-height:100%;
  filter:none;
  transform:none;
}

.nb-offer-card .nb-brand-art{
  width:min(168px,100%);
  height:auto;
  aspect-ratio:168 / 101;
  border-radius:13px;
  display:grid;
  place-items:center;
  padding:18px;
  box-sizing:border-box;
  text-align:center;
  color:#183252;
  background:linear-gradient(145deg,#fff,#e8edf5);
  box-shadow:0 13px 25px rgba(31,45,68,.11);
}
.nb-offer-card .nb-brand-art.green{background:linear-gradient(145deg,#0d2a1d,#95eab0);color:white}
.nb-offer-card .nb-brand-art.purple{background:linear-gradient(145deg,#282040,#8b70c2);color:white}
.nb-offer-card .nb-brand-art.blue{background:linear-gradient(145deg,#0e5fb7,#70b7ff);color:white}
.nb-offer-card .nb-brand-art.bank{background:linear-gradient(145deg,#fff,#e4e9f1);color:#253955}

.nb-offer-card .nb-card-body{
  height:auto;
  min-height:0;
  padding:10px 12px 9px;
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
}

.nb-offer-card .nb-title-row{
  display:flex;
  align-items:flex-start;
  gap:8px;
  min-width:0;
  flex:0 0 auto;
  min-height:calc(var(--nb-callout-leading) * 2);
}

.nb-offer-card .nb-offer-name{
  min-width:0;
  flex:1 1 auto;
  white-space:normal;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  text-overflow:ellipsis;
  color:#1c2534;
}


.nb-offer-card .nb-primary-value{
  margin-top:4px;
  color:#142745;
  flex:0 0 auto;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}

.nb-offer-card .nb-card-footer{
  flex:0 0 auto;
  margin-top:auto;
  padding-top:6px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:5px;
  min-height:26px;
}

.nb-offer-card .nb-card-meta{
  min-width:0;
  display:flex;
  align-items:center;
  gap:4px;
  white-space:nowrap;
  overflow:hidden;
}

.nb-offer-card .nb-status-tag{
  flex:0 0 auto;
  border-radius:999px;
  padding:3px 6px;
  background:#fff3e5;
  color:#a65c13;
  box-shadow:none;
}
.nb-offer-card .nb-status-tag.is-unavailable{
  background:#f1f2f4;
  color:#6e6e73;
}

.nb-offer-card .nb-tag{
  flex:0 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  border:0;
  padding:0;
  background:transparent;
  color:#6e6e73;
}

.nb-offer-card .nb-meta-separator{
  flex:0 0 auto;
  color:#8e8e93;
}

.nb-offer-card .nb-provider{
  flex:0 0 auto;
  width:20px;
  height:20px;
  border:1px solid rgba(60,60,67,.08);
  border-radius:5px;
  background:rgba(118,118,128,.04);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  box-sizing:border-box;
}
.nb-offer-card .nb-provider img{
  display:block;
  width:78%;
  height:78%;
  object-fit:contain;
  border-radius:4px;
}
.nb-offer-card .nb-provider-text{
  max-width:46px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:#6e6e73;
  background:transparent;
  border:0;
  padding:0;
}

.nb-offer-card.is-unavailable{opacity:.72}

/* Product-art normalization */
.offer-card[data-id="hsbc-checking"] .nb-main-art img,
.offer-card[data-id="chase-checking"] .nb-main-art img{
  filter:none;
  transform:scale(.9);
}
.offer-card[data-id="usbank-checking"] .nb-main-art img,
.offer-card[data-id="truist-checking"] .nb-main-art img{
  filter:drop-shadow(0 10px 15px rgba(31,45,68,.12));
  transform:scale(1);
}

@media(max-width:780px){
  .offer-card.nb-offer-card{width:100%}
}
@media(max-width:520px){
  .offer-card.nb-offer-card{max-width:202px}
}

/* Discover bank offers: app icon first, one shared asset per institution. */
.nb-bank-api-card .nb-bank-logo-art{
  width:94px;
  height:94px;
  max-width:82%;
  max-height:92%;
  border-radius:21px;
  overflow:hidden;
  box-shadow:0 7px 18px rgba(31,45,68,.13);
  background:#fff;
  display:grid;
  place-items:center;
  position:relative;
}
.nb-bank-api-card .nb-bank-logo-art img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}
.nb-bank-api-card .nb-bank-logo-art.is-brand-mark{
  width:124px;
  height:88px;
  border-radius:14px;
  padding:12px;
  box-sizing:border-box;
}
.nb-bank-api-card .nb-bank-logo-fallback{display:none}
.nb-bank-api-card .nb-bank-logo-art.is-broken img{display:none}
.nb-bank-api-card .nb-bank-logo-art.is-broken .nb-bank-logo-fallback{
  display:block;
  padding:7px;
  font-size:12px;
  line-height:1.3;
  text-align:center;
  font-weight:700;
  color:#243a5a;
}
.nb-bank-api-card .nb-bank-name-fallback{
  padding:12px;
  overflow-wrap:anywhere;
}
@media(max-width:520px){
  .nb-bank-api-card .nb-bank-logo-art{width:78px;height:78px;border-radius:18px}
  .nb-bank-api-card .nb-bank-logo-art.is-brand-mark{width:105px;height:76px}
}
