/* Individual photos opt into branding with media.show_branding; no photo edits. */
.dl-brand-photo { position:relative; }
.dl-brand-photo > img.dl-brand-logo {
  position:absolute;
  inset-block-start:clamp(6px,1.6vw,16px);
  inset-inline-end:clamp(6px,1.6vw,16px);
  inline-size:clamp(39px,8vw,84px);
  block-size:auto;
  max-inline-size:21%;
  aspect-ratio:1;
  object-fit:contain;
  pointer-events:none;
  background:transparent;
}
.dl-brand-contact {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,110px),1fr));
  align-items:stretch;
  gap:2px 8px;
  margin-block-start:6px;
  padding:5px 7px;
  border:1px solid var(--dl-gold,#e7c57a);
  border-radius:9px;
  background:#102f22;
  color:#fffaf0;
}
.dl-brand-contact > a,
.dl-brand-contact > .dl-brand-contact-name {
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:1px;
  min-block-size:44px;
  min-inline-size:0;
  inline-size:auto;
  padding:4px 3px;
  margin:0;
  border:0;
  border-radius:4px;
  background:transparent;
  color:#fffaf0;
  font-size:clamp(.82rem,2.5vw,.95rem);
  font-weight:700;
  line-height:1.4;
  overflow-wrap:anywhere;
  text-align:center;
}
.dl-brand-contact > a { cursor:pointer; }
.dl-brand-contact > a:hover { background:#214937; }
.dl-brand-contact small { color:#f1d496; font-size:.74rem; font-weight:500; }
.dl-brand-contact > a:focus-visible { outline-color:#e7c57a; outline-offset:-1px; }

.dl-brand-generic { inline-size:fit-content; max-inline-size:100%; }

/* Keep each footer icon and its text together, wrapping whole pairs on small screens. */
.dl-brand-contact {
  display:flex;
  flex-wrap:wrap;
  justify-content:space-evenly;
  gap:2px 10px;
  background:linear-gradient(120deg,#265541 0%,#194432 40%,#102f22 75%,#173a2c 100%);
  box-shadow:inset 0 1px 0 rgb(255 250 230 / .16),0 3px 8px rgb(16 47 34 / .16);
}
.dl-brand-contact > a,
.dl-brand-contact > .dl-brand-contact-name {
  flex:0 0 auto;
  flex-direction:row;
  gap:7px;
  padding-inline:clamp(3px,1vw,10px);
  white-space:nowrap;
}
.dl-brand-contact > :is(a,.dl-brand-contact-name) > small {
  display:flex;
  flex:none;
}
.dl-brand-contact small > svg { display:block; }

/* Join the contact strip to the branded photo without overlaying the image. */
.dl-brand-contact {
  margin-block-start:0;
  border-start-start-radius:0;
  border-start-end-radius:0;
  contain:inline-size;
}
.dl-detail .dl-slide > .dl-brand-photo:has(+ .dl-brand-contact) {
  border-end-start-radius:0;
  border-end-end-radius:0;
}
.dl-detail .dl-slide > .dl-brand-photo + .dl-brand-contact {
  border-block-start-width:0;
  border-end-start-radius:12px;
  border-end-end-radius:12px;
}
.dl-brand-photo--generic > img:not(.dl-brand-logo) {
  border-end-start-radius:0;
  border-end-end-radius:0;
}
.dl-brand-generic > .dl-brand-contact {
  border-end-start-radius:10px;
  border-end-end-radius:10px;
}
