/* =========================================================
   BDO Premium Image + Footer Cards
   Works in:
   - Frontend: #pvContent (postview)
   - Editor: .mce-content-body (TinyMCE)
========================================================= */

:where(#pvContent, .pv-content, .mce-content-body){
  --bdo-ink:#0f172a;
  --bdo-muted:#475569;
  --bdo-border: rgba(2,6,23,0.10);
  --bdo-shadow: 0 18px 60px rgba(2,6,23,0.12);
  --bdo-shadow2: 0 10px 28px rgba(2,6,23,0.10);
}

/* Card */
:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard{
  margin: 18px auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--bdo-border);
  background: #fff;
  box-shadow: var(--bdo-shadow);
  max-width: 860px;
}

/* Media */
:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__media{
  position: relative;
  background: #f3f4f6;
}

:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__img{
  width: 100%;
  height: min(520px, 52vw);
  object-fit: cover;
  display: block;
  border-radius: 0;
}

@media (max-width: 600px){
  :where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__img{ height: 280px; }
}

:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__shade{
  position:absolute;
  inset:0;
  background:
    radial-gradient(700px circle at 12% 14%, color-mix(in srgb, var(--bdo-accent, #4F46E5) 22%, transparent), transparent 60%),
    linear-gradient(180deg, rgba(2,6,23,0) 45%, rgba(2,6,23,.58) 100%);
  pointer-events:none;
}

/* Badge + Source */
:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__badge{
  position:absolute;
  left: 14px;
  top: 14px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 1000;
  color: #fff;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bdo-accent, #4F46E5) 92%, #000), var(--bdo-accent, #4F46E5));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 16px 40px rgba(2,6,23,.24);
  max-width: calc(100% - 28px);
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__source{
  position:absolute;
  left: 14px;
  bottom: 14px;
  display:inline-flex;
  align-items:center;
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(255,255,255,.92);
  background: rgba(2,6,23,.55);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  text-decoration: none;
}
:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__source:hover{
  text-decoration: underline;
}

/* Caption / Footer */
:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__cap{
  padding: 14px 14px 16px;
  background:
    radial-gradient(900px circle at 10% 0%, rgba(79,70,229,.08), transparent 55%),
    radial-gradient(900px circle at 100% 0%, rgba(14,165,233,.07), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
  border-top: 1px solid rgba(2,6,23,0.10);
}

/* Title row */
:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__top{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
}

:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__title{
  font-weight: 1000;
  font-size: 18px;
  line-height: 1.2;
  color: var(--bdo-ink);
  min-width: 0;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__rating,
:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__price{
  flex: 0 0 auto;
  font-weight: 1000;
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(2,6,23,0.10);
  background: rgba(255,255,255,.75);
  box-shadow: 0 10px 24px rgba(2,6,23,.08);
  color: rgba(15,23,42,.86);
  white-space: nowrap;
}

/* Meta line */
:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__meta{
  margin-top: 10px;
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items:center;
  color: rgba(15,23,42,.72);
  font-size: 13px;
  font-weight: 900;
}
:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__dot{
  opacity: .55;
}
:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__metaItem{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

/* Description */
:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__desc{
  margin-top: 10px;
  color: var(--bdo-muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

/* Actions */
:where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__actions{
  margin-top: 12px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items:center;
  justify-content: flex-end;
}

:where(#pvContent, .pv-content, .mce-content-body) .bdo-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 1000;
  font-size: 12px;
  text-decoration: none !important;
  border: 1px solid rgba(2,6,23,0.12);
  box-shadow: var(--bdo-shadow2);
  white-space: nowrap;
}

:where(#pvContent, .pv-content, .mce-content-body) .bdo-btn--ghost{
  background: rgba(255,255,255,.88);
  color: rgba(15,23,42,.92) !important;
}
:where(#pvContent, .pv-content, .mce-content-body) .bdo-btn--ghost:hover{
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--bdo-accent, #4F46E5) 35%, rgba(2,6,23,0.12));
}

:where(#pvContent, .pv-content, .mce-content-body) .bdo-btn--solid{
  border: 1px solid rgba(255,255,255,.10);
  color: #fff !important;
  background: linear-gradient(90deg, var(--bdo-cta1, #0f766e), var(--bdo-cta2, #0ea5a4));
  box-shadow: 0 18px 44px rgba(15,118,110,.18);
}
:where(#pvContent, .pv-content, .mce-content-body) .bdo-btn--solid:hover{
  transform: translateY(-1px);
  box-shadow: 0 22px 56px rgba(15,118,110,.22);
}

@media (max-width: 560px){
  :where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__title{
    white-space: normal;
  }
  :where(#pvContent, .pv-content, .mce-content-body) .bdo-footcard__actions{
    justify-content: stretch;
  }
  :where(#pvContent, .pv-content, .mce-content-body) .bdo-btn{
    width: 100%;
  }
}

/* Optional: dark theme support (if your site uses data-theme="dark") */
html[data-theme="dark"] :where(#pvContent, .pv-content) .bdo-footcard{
  background: rgba(2,6,23,.55);
  border-color: rgba(255,255,255,.12);
}
html[data-theme="dark"] :where(#pvContent, .pv-content) .bdo-footcard__cap{
  background: linear-gradient(180deg, rgba(2,6,23,.70), rgba(2,6,23,.58));
  border-top-color: rgba(255,255,255,.10);
}
html[data-theme="dark"] :where(#pvContent, .pv-content) .bdo-footcard__title{ color: rgba(255,255,255,.92); }
html[data-theme="dark"] :where(#pvContent, .pv-content) .bdo-footcard__meta{ color: rgba(255,255,255,.72); }
html[data-theme="dark"] :where(#pvContent, .pv-content) .bdo-footcard__desc{ color: rgba(255,255,255,.70); }
html[data-theme="dark"] :where(#pvContent, .pv-content) .bdo-btn--ghost{
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.92) !important;
  border-color: rgba(255,255,255,.14);
}