/* Shared BananaNL Chrome Extension Unified Banner (Hero + Scroll Sticky Bar)
 * Strict-CSP compliant external stylesheet (no inline <style> injection).
 * Independent high-contrast Banana Yellow x Deep Forest palette for both light & dark themes.
 */

.bx-nlb-wrap {
  box-sizing: border-box;
  width: min(1160px, calc(100% - 32px));
  max-width: 100%;
  margin: 18px auto 22px;
  font-family: 'Inter', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans TC', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  color: #1f3326;
  text-align: left;
}

.bx-nlb-wrap--contained {
  width: 100%;
  margin: 18px 0 22px;
}

.bx-nlb-wrap *,
.bx-nlb-wrap *::before,
.bx-nlb-wrap *::after,
.bx-nlb-sticky *,
.bx-nlb-sticky *::before,
.bx-nlb-sticky *::after {
  box-sizing: border-box;
}

.bx-nlb-wrap[hidden],
.bx-nlb-hero[hidden],
.bx-nlb-sticky[hidden] {
  display: none !important;
}

/* ---------- Hero Banner (Desktop Primary) ---------- */

.bx-nlb-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 20px 52px 20px 22px;
  border-radius: 14px;
  border: 1.5px solid #dec04f;
  border-top: 5px solid #d4a617;
  background: linear-gradient(135deg, #fff9db 0%, #ffefab 100%) !important;
  color: #1f3326 !important;
  box-shadow: 0 10px 28px rgba(18, 34, 24, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.bx-nlb-hero-main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  flex: 1 1 auto;
}

.bx-nlb-emblem {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #1f3a2c !important;
  color: #ffe36e !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(24, 48, 35, 0.22);
  margin-top: 2px;
}

.bx-nlb-emblem svg {
  width: 26px;
  height: 26px;
  display: block;
}

.bx-nlb-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.bx-nlb-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.bx-nlb-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #1d3527 !important;
}

.bx-nlb-new-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #1f3a2c !important;
  color: #fff6cc !important;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
  max-width: 100%;
}

.bx-nlb-new-tag {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  background: #ffd84d !important;
  color: #182b20 !important;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bx-nlb-pc-note {
  display: none;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(31, 58, 44, 0.1) !important;
  color: #2c4a39 !important;
  font-size: 10.5px;
  font-weight: 700;
}

aside.bx-nlb-hero h2.bx-nlb-title,
.bx-nlb-title {
  margin: 0 0 5px;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.38;
  letter-spacing: -0.015em;
  color: #16291e !important;
  overflow-wrap: anywhere;
}

aside.bx-nlb-hero p.bx-nlb-sub,
.bx-nlb-sub {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
  color: #3d5142 !important;
  overflow-wrap: anywhere;
}

.bx-nlb-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  flex: 0 0 auto;
  min-width: 224px;
}

.bx-nlb-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 9px;
  background: #1f3a2c;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(24, 48, 35, 0.22);
  transition: background-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.bx-nlb-btn-primary:hover {
  background: #2b503d;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(24, 48, 35, 0.28);
}

.bx-nlb-btn-primary:active {
  transform: translateY(0);
}

.bx-nlb-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 28px;
  padding: 3px 8px;
  border-radius: 6px;
  color: #244030 !important;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.bx-nlb-btn-secondary:hover {
  background: rgba(31, 58, 44, 0.08);
  color: #13251b !important;
}

.bx-nlb-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #465c4b !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.bx-nlb-close:hover {
  background: rgba(31, 58, 44, 0.12);
  color: #16291e !important;
}

.bx-nlb-close svg {
  width: 18px;
  height: 18px;
  display: block;
}

.bx-nlb-hero a:focus-visible,
.bx-nlb-hero button:focus-visible,
.bx-nlb-sticky a:focus-visible,
.bx-nlb-sticky button:focus-visible {
  outline: 3px solid #2b6b4f;
  outline-offset: 2px;
}

/* ---------- Bottom Compact Sticky Bar (Desktop Scroll Only) ---------- */

.bx-nlb-sticky {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 950;
  width: min(980px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 46px 10px 16px;
  border-radius: 13px;
  border: 1.5px solid #e6c64d;
  background: #1b3326 !important;
  color: #f8f7ee !important;
  font-family: 'Inter', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans TC', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: 0 12px 32px rgba(10, 22, 15, 0.34);
  transform: translate(-50%, 130%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, visibility 0.2s ease;
}

.bx-nlb-sticky.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.bx-nlb-sticky[data-bx-site="infographic-evaluation"] {
  width: min(820px, calc(100vw - 320px));
}

.bx-nlb-sticky[data-bx-site="infographic-evaluation"] .bx-nlb-sticky-badge {
  display: none;
}

.bx-nlb-sticky-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1 1 auto;
}

.bx-nlb-sticky-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #ffe36e;
  color: #192f22;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bx-nlb-sticky-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.bx-nlb-sticky-text {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.35;
}

.bx-nlb-sticky-title {
  font-weight: 800;
  color: #ffffff !important;
}

.bx-nlb-sticky-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 227, 110, 0.16) !important;
  border: 1px solid rgba(255, 227, 110, 0.45);
  color: #ffe885 !important;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.bx-nlb-sticky-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.bx-nlb-sticky-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 15px;
  border-radius: 8px;
  background: #ffe36e;
  color: #172b1f !important;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color 0.16s ease, transform 0.16s ease;
}

.bx-nlb-sticky-btn:hover {
  background: #ffec94;
  transform: translateY(-1px);
}

.bx-nlb-sticky-link {
  color: #d9eadf !important;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.bx-nlb-sticky-link:hover {
  color: #ffffff !important;
}

.bx-nlb-sticky .bx-nlb-close {
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  color: #c5d9cc !important;
}

.bx-nlb-sticky .bx-nlb-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
}

.bx-nlb-sticky a:focus-visible,
.bx-nlb-sticky button:focus-visible {
  outline: 3px solid #ffe36e;
  outline-offset: 2px;
}

/* ---------- Tablet Adjustment ---------- */

@media (max-width: 960px) and (min-width: 768px) {
  .bx-nlb-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px 46px 18px 18px;
  }

  .bx-nlb-actions {
    flex-direction: row;
    align-items: center;
    min-width: 0;
  }

  .bx-nlb-sticky-badge {
    display: none;
  }
}

/* ---------- Mobile (<= 767px): Compact & Non-competing with Banana Keyboard CTA ---------- */

@media (max-width: 767px) {
  .bx-nlb-wrap {
    width: calc(100% - 24px);
    margin: 10px auto 14px;
  }

  .bx-nlb-wrap--contained {
    width: 100%;
    margin: 10px 0 14px;
  }

  .bx-nlb-hero {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 11px 38px 11px 13px;
    border-radius: 11px;
    border-top-width: 3px;
    box-shadow: 0 4px 12px rgba(18, 34, 24, 0.1);
  }

  .bx-nlb-emblem {
    display: none;
  }

  .bx-nlb-meta {
    gap: 6px;
    margin-bottom: 3px;
  }

  .bx-nlb-brand {
    font-size: 11.5px;
  }

  .bx-nlb-new-pill {
    display: none;
  }

  .bx-nlb-pc-note {
    display: inline-flex;
    align-items: center;
  }

  aside.bx-nlb-hero h2.bx-nlb-title,
  .bx-nlb-title {
    font-size: 13.5px;
    line-height: 1.38;
    margin-bottom: 0;
  }

  aside.bx-nlb-hero p.bx-nlb-sub,
  .bx-nlb-sub {
    display: none;
  }

  .bx-nlb-actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    min-width: 0;
  }

  .bx-nlb-btn-primary {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 12px;
    border-radius: 7px;
  }

  .bx-nlb-btn-secondary {
    min-height: 30px;
    padding: 3px 2px;
    font-size: 11px;
  }

  .bx-nlb-close {
    top: 4px;
    right: 4px;
    width: 34px;
    height: 34px;
  }

  /* Strictly hide sticky bar on mobile so Banana Keyboard CTA & mobile reading stay uncluttered */
  .bx-nlb-sticky {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bx-nlb-btn-primary,
  .bx-nlb-btn-secondary,
  .bx-nlb-close,
  .bx-nlb-sticky,
  .bx-nlb-sticky-btn {
    transition: none !important;
  }
}

/* ---------- Compact 1-Row Mojofull Sister Tools Footer Strip ---------- */

.bx-mf-tools-wrap {
  box-sizing: border-box;
  width: min(1160px, calc(100% - 32px));
  max-width: 100%;
  margin: 18px auto 0;
  padding: 0 0 84px;
  font-family: 'Inter', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans TC', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

.bx-mf-tools {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid rgba(31, 58, 44, 0.14);
  background: rgba(255, 255, 255, 0.94);
  color: #1f3326;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.bx-mf-tools__label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #465c4b;
  white-space: nowrap;
}

.bx-mf-tools__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
}

.bx-mf-tools__link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(31, 58, 44, 0.16);
  background: #f7f8f5;
  color: #172b1f !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.bx-mf-tools__link:hover {
  background: #fff4c4;
  border-color: #d4a617;
  transform: translateY(-1px);
}

.bx-mf-tools__link:focus-visible {
  outline: 3px solid #2b6b4f;
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .bx-mf-tools-wrap {
    width: calc(100% - 24px);
    margin: 14px auto 0;
    padding: 0 0 92px;
  }

  .bx-mf-tools {
    padding: 10px 12px;
    gap: 8px;
  }

  .bx-mf-tools__link {
    font-size: 11.5px;
    padding: 4px 9px;
  }
}
