/* WordPress credit card Offer Detail only. Bank offers and shopping deals are unchanged. */
@media(min-width:1181px){
  /* WP cards have less narrative content than other offer detail types.
     Keep the shared overlay, but do not force the generic 800px-tall canvas. */
  .nb-offer-detail-frame:has(.nb-wp-card-detail){
    width:min(1140px,calc(100vw - 96px));
    height:min(720px,calc(100vh - 80px));
  }
  .nb-offer-detail-host .nb-wp-card-detail .v4-offer-detail-grid{
    grid-template-columns:minmax(0,44fr) minmax(0,56fr) !important;
  }
}

.nb-wp-card-detail .nb-wp-card-image-pane{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:36px;
  background:#f8f9fb;
}
.nb-wp-card-detail .nb-wp-card-photo{
  display:block;
  max-width:90%;
  max-height:55%;
  object-fit:contain;
}
.nb-wp-card-detail .nb-wp-card-fallback{
  padding:48px 20px;
  color:var(--nb-label-secondary);
  text-align:center;
}

/* Right rail interior only: shared modal frame, dimensions, column ratio,
   poster placement and card artwork intentionally stay unchanged. */
.nb-offer-detail-host .nb-wp-card-detail .nb-wp-card-info{
  display:flex !important;
  flex-direction:column;
  align-items:stretch;
  gap:0;
  padding:28px 36px 24px;
  background:#fff;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  overscroll-behavior:contain;
}
.nb-wp-card-detail .nb-wp-card-header{
  display:block;
  padding:0;
  margin:0;
  border:0;
}
.nb-wp-card-detail .nb-wp-card-kicker{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:34px;
  margin-bottom:12px;
}
.nb-wp-card-detail .nb-wp-card-provider{
  color:#748196;
  text-transform:uppercase;
}
.nb-wp-card-detail .nb-wp-card-header .nb-wp-card-name{
  display:block;
  margin:0;
  color:#172033;
  white-space:normal;
  overflow-wrap:anywhere;
  text-wrap:pretty;
}
.nb-wp-card-detail .nb-wp-card-svg{
  display:block;
  width:20px;
  height:20px;
  flex:none;
}
.nb-wp-card-detail .nb-wp-card-offer{
  display:grid;
  grid-template-columns:52px minmax(0,1fr);
  align-items:center;
  gap:16px;
  margin:24px 0 0;
  padding:18px 20px;
  border:1px solid #d9e8ff;
  border-radius:16px;
  background:linear-gradient(125deg,#f5f9ff,#eaf3ff);
  box-shadow:none;
}
.nb-wp-card-detail .nb-wp-card-offer-icon{
  display:grid;
  place-items:center;
  width:52px;
  height:52px;
  border-radius:14px;
  background:rgba(255,255,255,.55);
  color:var(--nb-system-blue);
}
.nb-wp-card-detail .nb-wp-card-offer-icon .nb-wp-card-svg{
  width:27px;
  height:27px;
}
.nb-wp-card-detail .nb-wp-card-offer-body{
  min-width:0;
  padding-left:17px;
  border-left:1px solid #bfd5f3;
}
.nb-wp-card-detail .nb-wp-card-offer .nb-current-offer-label{margin:0}
.nb-wp-card-detail .nb-wp-card-offer .nb-current-offer-value{
  margin-top:7px;
  color:#0875ef;
  white-space:normal;
  overflow-wrap:anywhere;
  text-wrap:pretty;
}
.nb-wp-card-detail .nb-wp-card-offer .nb-current-offer-requirement{
  margin:9px 0 0;
  color:#657387;
  white-space:normal;
  overflow-wrap:anywhere;
}
.nb-wp-card-detail .nb-wp-card-highlights-section{margin-top:21px}
.nb-wp-card-detail .nb-wp-card-section-title{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 12px;
  color:#263449;
}
.nb-wp-card-detail .nb-wp-card-section-icon{
  display:grid;
  place-items:center;
  width:22px;
  height:22px;
  color:#364253;
}
.nb-wp-card-detail .nb-wp-card-highlights{
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:0;
  margin:0;
}
.nb-wp-card-detail .nb-wp-card-highlights li{
  display:flex;
  align-items:center;
  gap:10px;
  flex:1 1 205px;
  min-width:0;
  min-height:44px;
  box-sizing:border-box;
  padding:11px 14px;
  border-radius:12px;
  background:#f3f4f7;
  color:#374457;
  white-space:normal;
  overflow-wrap:anywhere;
  text-wrap:pretty;
}
.nb-wp-card-detail .nb-wp-card-highlight-icon{
  display:grid;
  place-items:center;
  flex:none;
  color:#495463;
}
.nb-wp-card-detail .nb-wp-card-highlight-copy{
  display:block;
  min-width:0;
}
.nb-wp-card-detail .nb-wp-card-facts{margin-top:22px}
.nb-wp-card-detail .nb-wp-card-facts-list{
  display:grid;
  gap:10px;
}
.nb-wp-card-detail .nb-wp-card-fact{
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  align-items:center;
  gap:14px;
  padding:15px 17px;
  border:1px solid #e7ebf1;
  border-radius:14px;
  background:#f9fafc;
}
.nb-wp-card-detail .nb-wp-card-fact-icon{
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border-radius:12px;
  background:#eff1f5;
  color:#455063;
}
.nb-wp-card-detail .nb-wp-card-fact-icon .nb-wp-card-svg{
  width:24px;
  height:24px;
}
.nb-wp-card-detail .nb-wp-card-fact-content{
  min-width:0;
  padding-left:17px;
  border-left:1px solid #d7dde7;
}
.nb-wp-card-detail .nb-wp-card-fact-label{color:#2c394e}
.nb-wp-card-detail .nb-wp-card-fact-value{
  margin:8px 0 0;
  color:#566579;
  white-space:normal;
  overflow-wrap:anywhere;
  text-wrap:pretty;
}
.nb-wp-card-detail .nb-wp-card-fact-line{display:block}
.nb-wp-card-detail .nb-wp-card-fact-line+.nb-wp-card-fact-line{margin-top:8px}
.nb-wp-card-detail .nb-wp-card-actions{
  position:sticky;
  bottom:0;
  z-index:2;
  margin-top:auto;
  padding-top:20px;
  width:100%;
  background:linear-gradient(to bottom,rgba(255,255,255,0),#fff 22px);
}
.nb-wp-card-detail .nb-wp-card-apply{
  width:100%;
  min-height:52px;
  border-radius:12px;
  text-align:center;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Tablet and phone retain their existing full-page flow and mobile toolbar. */
@media(max-width:1180px){
  .nb-wp-card-detail .nb-wp-card-image-pane{
    min-height:230px !important;
    height:auto !important;
    padding:30px 20px;
  }
  .nb-wp-card-detail .nb-wp-card-photo{
    max-width:min(85%,350px);
    max-height:190px;
  }
  .nb-offer-detail-host .nb-wp-card-detail .nb-wp-card-info{
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    overflow:visible !important;
    padding:24px 20px 32px;
  }
  .nb-wp-card-detail .nb-wp-card-kicker{
    min-height:0;
    margin-bottom:10px;
  }
  .nb-wp-card-detail .nb-wp-card-offer{margin-top:20px}
  .nb-wp-card-detail .nb-wp-card-highlights-section{margin-top:20px}
  .nb-wp-card-detail .nb-wp-card-facts{margin-top:21px}
  .nb-wp-card-detail .nb-wp-card-actions{
    position:static;
    margin-top:22px;
    padding-top:0;
    background:none;
  }
}

/* Right rail mobile adjustments only; the modal and image stage are untouched. */
@media(max-width:560px){
  .nb-wp-card-detail .nb-wp-card-offer{
    grid-template-columns:42px minmax(0,1fr);
    gap:12px;
    padding:16px;
  }
  .nb-wp-card-detail .nb-wp-card-offer-icon{width:42px;height:42px}
  .nb-wp-card-detail .nb-wp-card-offer-body{padding-left:12px}
  .nb-wp-card-detail .nb-wp-card-highlights li{flex-basis:100%}
  .nb-wp-card-detail .nb-wp-card-fact{
    grid-template-columns:40px minmax(0,1fr);
    gap:12px;
    padding:14px;
  }
  .nb-wp-card-detail .nb-wp-card-fact-icon{width:40px;height:40px}
  .nb-wp-card-detail .nb-wp-card-fact-content{padding-left:12px}
}
