/* Local-only El Pulso interior; Botiga retains the header and container geometry. */
.dlm-pulse-ribbon {
  --dlm-pulse-font: "articulat-cf", var(--dlm-font-ui, Arial, sans-serif);
  font-family: var(--dlm-pulse-font);
  font-size: 13px;
  line-height: 1.4;
  color: #555e6c;
  background: transparent;
  margin-block-start: 8px;
}
body.dlm-approved-header-local .dlm-pulse-ribbon :is(a, button) { font-family: var(--dlm-pulse-font); }
/* Match the existing Español control through its shared UI font token. */
body.dlm-approved-header-local .dlm-pulse-ribbon a.dlm-pulse-ribbon__chip { font-family: var(--dlm-font-ui, "greycliff-cf", Arial, sans-serif); }
.dlm-pulse-ribbon__inner {
  position: relative;
  box-sizing: border-box;
  width: min(var(--dlm-container-max, 1360px), calc(100% - 2 * var(--dlm-container-edge, 40px)));
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 52px;
  gap: 14px;
  padding: 4px 16px;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  background: linear-gradient(115deg, #fff7f9 0%, #fff 43%, #f1f6ff 100%);
  box-shadow: 0 8px 24px #11182708;
}
.dlm-pulse-ribbon__presence { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.dlm-pulse-ribbon__dot { position: relative; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: #16803c; margin-inline-end: 3px; }
.dlm-pulse-ribbon__dot::after { content: ""; position: absolute; inset: -4px; border: 1px solid #16803c55; border-radius: inherit; opacity: 0; }
.dlm-pulse-ribbon strong { color: #202630; font-size: 22px; font-weight: 700; line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.dlm-pulse-ribbon__metric-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; font-size: 11px; line-height: 1.2; color: #555e6c; }
.dlm-pulse-ribbon__demo { display: inline-block; padding: 2px 5px; border-radius: 4px; background: #eef1f5; color: #606b7c; font-size: 9px; letter-spacing: .07em; }
.dlm-pulse-ribbon__suggestions { display: flex; align-items: center; gap: 10px; min-width: 0; padding-inline: 17px; border-inline: 1px solid #dce1e8; }
.dlm-pulse-ribbon__search-icon { position: relative; flex: 0 0 16px; width: 16px; height: 16px; color: #64748b; }
.dlm-pulse-ribbon__search-icon::before { content: ""; position: absolute; width: 10px; height: 10px; border: 1.5px solid currentColor; border-radius: 50%; inset: 1px auto auto 1px; }
.dlm-pulse-ribbon__search-icon::after { content: ""; position: absolute; width: 6px; height: 1.5px; background: currentColor; transform: rotate(45deg); inset: 12px auto auto 10px; }
.dlm-pulse-ribbon__viewport { flex: 1; min-width: 0; overflow-x: auto; mask-image: none; }
.dlm-pulse-ribbon__track { display: flex; width: max-content; }
.dlm-pulse-ribbon__terms { list-style: none; display: flex; align-items: center; flex: 0 0 auto; gap: 8px; margin: 0; padding: 5px 8px 5px 0; }
.dlm-pulse-ribbon__terms li { flex-shrink: 0; margin: 0; padding: 0; }
.dlm-pulse-ribbon__chip { --chip-edge: #f1becd; --chip-fill: #fde4eb; --chip-text: #9f1e41; display: inline-flex; align-items: center; min-height: 32px; padding: 6px 14px; border: 1px solid var(--chip-edge); border-radius: 999px; background: var(--chip-fill); color: var(--chip-text); font-size: 13px; font-weight: 700; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: border-color .15s ease, background .15s ease; }
.dlm-pulse-ribbon__chip[data-dlm-query-language="en"] { --chip-edge: #bfd0f4; --chip-fill: #e5edff; --chip-text: #264da6; }
.dlm-pulse-ribbon__chip:hover { color: var(--chip-text); border-color: var(--chip-edge); background: var(--chip-fill); filter: brightness(.94); }
.dlm-pulse-ribbon__pause { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 32px; min-height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #606b7c; font-size: 14px; line-height: 1; }
.dlm-pulse-ribbon__pause:hover { color: #202630; background: #e9edf3; }
.dlm-pulse-ribbon__freshness { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.dlm-pulse-ribbon__new { display: flex; align-items: center; gap: 9px; min-height: 32px; color: #555e6c; text-decoration: none; white-space: nowrap; }
.dlm-pulse-ribbon__new:hover { color: #202630; text-decoration: none; }
.dlm-pulse-ribbon__new .dlm-pulse-ribbon__metric-copy { gap: 2px; }
.dlm-pulse-ribbon__arrow { color: #64748b; margin-inline-start: 3px; font-size: 18px; }
.dlm-pulse-ribbon__status { max-width: 220px; color: #555e6c; font-size: 11px; }
.dlm-pulse-ribbon :is(a, button):focus-visible { outline: 2px solid #175cd3; outline-offset: 3px; }
.dlm-pulse-ribbon[data-dlm-pulse-ready="true"] .dlm-pulse-ribbon__viewport { overflow: hidden; mask-image: none; }
.dlm-pulse-ribbon[data-dlm-pulse-ready="true"] .dlm-pulse-ribbon__track { animation: dlm-pulse-search-scroll 30s linear infinite; }
.dlm-pulse-ribbon[data-dlm-pulse-ready="true"] .dlm-pulse-ribbon__dot { animation: dlm-pulse-dot-blink 1.8s ease-in-out infinite; }
.dlm-pulse-ribbon[data-dlm-pulse-ready="true"] .dlm-pulse-ribbon__dot::after { animation: dlm-pulse-dot-ring 1.8s ease-out infinite; }
.dlm-pulse-ribbon__suggestions:hover .dlm-pulse-ribbon__track,
.dlm-pulse-ribbon__suggestions[data-dlm-pulse-paused="true"] .dlm-pulse-ribbon__track { animation-play-state: paused; }
.dlm-pulse-ribbon[data-dlm-pulse-ready="true"] .dlm-pulse-ribbon__viewport:focus-within { overflow-x: auto; mask-image: none; }
.dlm-pulse-ribbon[data-dlm-pulse-ready="true"] .dlm-pulse-ribbon__viewport:focus-within .dlm-pulse-ribbon__track { animation: none; transform: none; }
.dlm-pulse-ribbon__viewport:focus-within [data-dlm-pulse-copy] { display: none; }
.dlm-pulse-ribbon[data-dlm-pulse-paused="true"] .dlm-pulse-ribbon__dot,
.dlm-pulse-ribbon[data-dlm-pulse-paused="true"] .dlm-pulse-ribbon__dot::after { animation-play-state: paused; }
.dlm-pulse-ribbon:not([data-dlm-pulse-ready="true"]) [data-dlm-pulse-copy],
.dlm-pulse-ribbon:not([data-dlm-pulse-ready="true"]) .dlm-pulse-ribbon__pause { display: none; }
@keyframes dlm-pulse-search-scroll { to { transform: translateX(calc(-100% / 3)); } }
@keyframes dlm-pulse-dot-blink { 50% { opacity: .35; } }
@keyframes dlm-pulse-dot-ring { from { opacity: .7; transform: scale(.65); } to { opacity: 0; transform: scale(1.6); } }
@media (max-width: 767px) {
  .dlm-pulse-ribbon__inner { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 9px 12px; }
  .dlm-pulse-ribbon__suggestions { grid-column: 1 / -1; grid-row: 2; border-inline: 0; border-top: 1px solid #dce1e8; padding: 6px 0 0; }
  .dlm-pulse-ribbon__freshness { grid-column: 2; grid-row: 1; }
}
@media (max-width: 400px) {
  .dlm-pulse-ribbon__inner { padding: 8px 10px; gap: 7px; }
  .dlm-pulse-ribbon__presence, .dlm-pulse-ribbon__new { white-space: normal; }
  .dlm-pulse-ribbon__metric-copy { max-width: 58px; }
  .dlm-pulse-ribbon strong { font-size: 22px; }
  .dlm-pulse-ribbon__arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dlm-pulse-ribbon[data-dlm-pulse-ready="true"] .dlm-pulse-ribbon__track { animation: none; transform: none; }
  .dlm-pulse-ribbon[data-dlm-pulse-ready="true"] .dlm-pulse-ribbon__dot,
  .dlm-pulse-ribbon[data-dlm-pulse-ready="true"] .dlm-pulse-ribbon__dot::after { animation: none; }
  .dlm-pulse-ribbon[data-dlm-pulse-ready="true"] .dlm-pulse-ribbon__viewport { overflow-x: auto; mask-image: none; }
  .dlm-pulse-ribbon [data-dlm-pulse-copy], .dlm-pulse-ribbon__pause { display: none; }
  .dlm-pulse-ribbon__chip { transition: none; }
}
/* Retain the already-verified 24px marketplace intro gap, scoped to this ribbon. */
body.dlm-approved-header-local .dlm-pulse-ribbon + .content-wrapper:has(.dlm-shop-intro) { margin-top: 12px !important; }
body.dlm-approved-header-local .dlm-pulse-ribbon + .content-wrapper .dlm-shop-intro { padding-top: 12px; }


/* DLM-HERO-002: retain the resource link without the repeated corner arrow. */
body.dlm-approved-header-local .dlm-pulse-ribbon__arrow { display: none; }
body.dlm-approved-header-local .dlm-pulse-ribbon__new:is(:hover, :focus-visible) .dlm-pulse-ribbon__metric-copy {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}


/* DLM-RIBBON-002: metrics use the native Botiga top row; pills own the strip. */
body.dlm-approved-header-local .bhfb-above_header_row:has(.dlm-pulse-metrics) > :is(.container, .container-fluid) {
  box-sizing: border-box;
  max-width: var(--dlm-showcase-max, 1360px);
  width: calc(100% - var(--dlm-showcase-edge, 40px) - var(--dlm-showcase-edge, 40px));
  padding-inline: 0;
}
.dlm-pulse-metrics {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-family: var(--dlm-font-ui, "greycliff-cf", Arial, sans-serif);
  font-size: 12px;
  color: #555e6c;
  line-height: 1.25;
}
.dlm-pulse-metrics .dlm-pulse-ribbon__presence,
.dlm-pulse-metrics .dlm-pulse-ribbon__new { gap: 6px; }
.dlm-pulse-metrics .dlm-pulse-ribbon__new { min-height: 28px; font-family: inherit; }
.dlm-pulse-metrics strong { color: #202630; font-size: 15px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.dlm-pulse-metrics .dlm-pulse-ribbon__metric-copy { flex-direction: row; align-items: center; gap: 4px; font-size: 12px; max-width: none; }
.dlm-pulse-metrics .dlm-pulse-ribbon__demo { font-size: 8px; }
.dlm-pulse-metrics .dlm-pulse-ribbon__arrow { display: none; }
.dlm-pulse-metrics .dlm-pulse-ribbon__new:is(:hover, :focus-visible) .dlm-pulse-ribbon__metric-copy { text-decoration: underline; text-underline-offset: 3px; }
.dlm-pulse-metrics[data-dlm-pulse-ready="true"] .dlm-pulse-ribbon__dot { animation: dlm-pulse-dot-blink 1.8s ease-in-out infinite; }
.dlm-pulse-metrics[data-dlm-pulse-ready="true"] .dlm-pulse-ribbon__dot::after { animation: dlm-pulse-dot-ring 1.8s ease-out infinite; }
.dlm-pulse-metrics[data-dlm-pulse-paused="true"] .dlm-pulse-ribbon__dot,
.dlm-pulse-metrics[data-dlm-pulse-paused="true"] .dlm-pulse-ribbon__dot::after { animation-play-state: paused; }
.dlm-pulse-ribbon .dlm-pulse-ribbon__inner { display: block; padding: 4px 16px; }
.dlm-pulse-ribbon .dlm-pulse-ribbon__suggestions { width: 100%; box-sizing: border-box; padding: 0; border: 0; }
@media (max-width: 767px) {
  .dlm-pulse-metrics { gap: 4px 14px; }
  .dlm-pulse-metrics .dlm-pulse-ribbon__metric-copy { flex-direction: column; align-items: flex-start; gap: 1px; font-size: 11px; }
  .dlm-pulse-ribbon .dlm-pulse-ribbon__inner { min-height: 48px; padding: 2px 12px; }
  .dlm-pulse-ribbon .dlm-pulse-ribbon__suggestions { grid-row: auto; grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .dlm-pulse-metrics[data-dlm-pulse-ready="true"] .dlm-pulse-ribbon__dot,
  .dlm-pulse-metrics[data-dlm-pulse-ready="true"] .dlm-pulse-ribbon__dot::after { animation: none; }
}

/* Apply the configured native slot dimensions even while Botiga serves its existing CSS cache. */
body.dlm-approved-header-local .bhfb-above_header_row:has(.dlm-pulse-metrics) { min-height: 32px; }
body.dlm-approved-header-local .bhfb-above_header_row:has(.dlm-pulse-metrics) .bhfb-component-html {
  margin-inline-start: auto;
  max-width: 100%;
}
@media (max-width: 1024px) {
  body.dlm-approved-header-local .bhfb-above_header_row:has(.dlm-pulse-metrics) { min-height: 40px; }
}

/* DLM-RIBBON-003: demo presence beside Request Resource, in the existing native menu. */
body.dlm-approved-header-local .bhfb-desktop #mega-menu-primary > .dlm-pulse-presence-menu-item {
  display: flex;
  align-items: center;
  align-self: center;
  margin-inline-start: 0 !important;
  padding: 0;
}
body.dlm-approved-header-local .dlm-presence-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-height: 42px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid #cfd1d7;
  border-radius: 999px;
  background: #f2f3f5;
  box-shadow: inset 0 1px 1px rgb(17 17 17 / 6%);
  color: #111;
  font-family: var(--dlm-font-ui, "greycliff-cf", Arial, sans-serif);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.dlm-presence-pill .dlm-presence-pill__label { display: inline-flex; align-items: center; gap: 4px; }
.dlm-presence-pill strong { font-size: inherit; font-weight: 700; line-height: inherit; }
.dlm-presence-pill__demo { padding-left: 6px; border-left: 1px solid #d4d7dc; color: #59616e; font-size: 10px; font-weight: 700; line-height: 1; }
.dlm-presence-pill .dlm-pulse-ribbon__dot { width: 8px; height: 8px; flex-basis: 8px; margin-inline-end: 0; background: #39ff14; box-shadow: 0 0 0 1px #2b8e20; }
.dlm-presence-pill .dlm-pulse-ribbon__dot::after { border-color: #39ff1499; }
@media (min-width: 1025px) and (max-width: 1279px) {
  body.dlm-approved-header-local .bhfb-desktop #mega-menu-primary:has(> .dlm-pulse-presence-menu-item) { gap: 4px; }
  body.dlm-approved-header-local .bhfb-desktop #mega-menu-wrap-primary #mega-menu-primary:has(> .dlm-pulse-presence-menu-item) > li.mega-menu-item > a.mega-menu-link { padding-inline: 8px !important; }
  body.dlm-approved-header-local .bhfb-desktop .dlm-presence-pill { min-height: 42px; padding-inline: 9px; gap: 6px; font-size: 13px; }
  .bhfb-desktop .dlm-presence-pill__local { display: none; }
}
body.dlm-approved-header-local #site-navigation-mobile .dlm-pulse-presence-menu-item,
body.dlm-approved-header-local #site-navigation-mobile .dlm-request-resource-menu-item:has(+ .dlm-pulse-presence-menu-item) {
  display: inline-flex;
  width: auto;
  margin-inline: 0;
}
body.dlm-approved-header-local #site-navigation-mobile .dlm-pulse-presence-menu-item { margin-block: 12px; margin-inline-start: 8px; }

/* DLM-RIBBON-004: weekly discovery count occupies the space beside the language switch. */
body.dlm-approved-header-local .dlm-marketplace-filters .dlm-language-block:has(> .dlm-pulse-metrics) {
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap;
  gap: 8px;
}
body.dlm-approved-header-local .dlm-marketplace-filters .dlm-language-block > .dlm-pulse-metrics {
  flex: 0 0 auto;
  max-width: 82px;
  margin-inline-start: auto;
  text-align: center;
}
body.dlm-approved-header-local .dlm-marketplace-filters .dlm-pulse-ribbon__freshness {
  flex-direction: column;
  gap: 4px;
}
body.dlm-approved-header-local .dlm-marketplace-filters .dlm-pulse-ribbon__new {
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  gap: 2px;
  font-weight: 700;
}
body.dlm-approved-header-local .dlm-marketplace-filters .dlm-pulse-metrics strong {
  font-size: 20px;
  line-height: 1;
}
body.dlm-approved-header-local .dlm-marketplace-filters .dlm-pulse-ribbon__metric-copy {
  flex-direction: column;
  align-items: center;
  gap: 0;
  font-size: 10px;
  line-height: 1.1;
}
body.dlm-approved-header-local .dlm-marketplace-filters .dlm-pulse-ribbon__status {
  max-width: 82px;
  white-space: normal;
}
body.dlm-approved-header-local .dlm-marketplace-filters .dlm-pulse-ribbon__new:focus-visible {
  outline: 2px solid #175cd3;
  outline-offset: 3px;
  border-radius: 4px;
}

/* DLM-DISCOVERY-006: native resource-stack icon with the actual weekly count as its accent. */
body.dlm-approved-header-local .dlm-marketplace-filters .dlm-pulse-ribbon__new--icon {
  position: relative;
  display: inline-flex;
  flex-direction: row;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 9px;
  background-color: transparent;
}
body.dlm-approved-header-local .dlm-marketplace-filters .dlm-pulse-ribbon__new--icon:hover {
  background-color: #f2f3f5;
}
body.dlm-approved-header-local .dlm-marketplace-filters .dlm-pulse-resource-icon {
  position: absolute;
  left: 4px;
  bottom: 4px;
  width: 26px;
  height: 26px;
  color: #5b6573;
}
body.dlm-approved-header-local .dlm-marketplace-filters .dlm-pulse-ribbon__new--icon > strong {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 22px;
  height: 20px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--dlm-showcase-accent, #e8173d);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* DLM-HERO-006: disclosure remains outside the presentation it controls. */
.dlm-bento-toggle { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #737c8b; cursor: pointer; box-shadow: none; }
.dlm-bento-toggle[hidden] { display: none !important; }
.dlm-bento-toggle svg { display: block; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.dlm-bento-toggle[aria-expanded="true"] { color: #a71a3d; background: #fff; }
.dlm-bento-toggle[aria-expanded="true"] svg rect { fill: #f9e3eb; }
.dlm-bento-toggle:hover { background: #fff; box-shadow: 0 1px 5px #36445d0b; }
.dlm-bento-toggle:focus-visible { outline: 3px solid #175cd3; outline-offset: 2px; }
.dlm-pulse-ribbon:focus-within .dlm-pulse-ribbon__track { animation-play-state: paused; }
.dlm-pulse-ribbon .dlm-pulse-ribbon__inner { padding-inline-end: 6px; }
html[data-dlm-language="en"] .dlm-bento-toggle[aria-expanded="true"] { color: #264da6; }
html[data-dlm-language="en"] .dlm-bento-toggle[aria-expanded="true"] svg rect { fill: #e2eaff; }
@media (max-width: 767px) {
  .dlm-pulse-ribbon .dlm-pulse-ribbon__inner { padding-inline-end: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .dlm-bento-toggle { transition: none; }
}
