/* Fintech Wave header logo system (scoped + reusable) */
.fwx-header-logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  top: 1px; /* whole mark + globe: 1px down */
  font-family: 'Exo 2', sans-serif;
  font-size: 20px;
  font-weight: 700;
  font-style: italic;
  color: #00c2ff;
  letter-spacing: normal;
}

.fwx-header-logo__icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: inline-block;
  flex-shrink: 0;
}

.fwx-header-logo__wordmark {
  position: relative;
  top: -1px;
  color: #fff;
}

.fwx-header-logo__tm {
  position: relative;
  top: -3px;
  left: -2px;
  display: inline-block;
  font-family: Arial, sans-serif !important;
  font-weight: 700;
  font-style: normal !important;
  color: #b9b9b9;
  transform: scale(0.5);
  transform-origin: left center;
  letter-spacing: 0 !important;
}

/* Nudge the full Fintech Wave - AI Agent header right for centering */
.ai-agent-header-offset {
  margin-left: 36px; /* 1px left of prior 37px */
}

/*
  Mobile header fit:
  Keep globe/logo + "Fintech Wave" wordmark, the Base Wallet capsule, and Home button
  on the same top line. Achieved by shrinking the mark, tightening nav padding,
  and preventing nav-right from wrapping while truncating pills.
*/
@media (max-width: 520px) {
  .ai-agent-header-offset {
    margin-left: 14px;
  }

  /* Override .agentic-tl-page .fwx-header-logo { font-size: 30px } from agentic-trustline.css */
  .agentic-tl-page .fwx-header-logo {
    font-size: 9px !important;
    white-space: nowrap;
    flex-wrap: nowrap;
    gap: 2px;
    line-height: 1;
    max-width: none;
    height: auto;
    top: 0;
  }

  .agentic-tl-page .fwx-header-logo__wordmark {
    white-space: nowrap;
    display: inline-block;
    top: 0;
  }

  .fwx-header-logo__icon {
    width: 18px;
    height: 18px;
    margin-left: -25px;
  }

  .fwx-header-logo__tm {
    transform: scale(0.46);
    left: -1px;
  }

  /* Override Trustline nav defaults to keep everything on one line */
  .agentic-tl-nav {
    padding: 0.6rem 0.85rem;
    gap: 0.5rem;
  }

  .agentic-tl-nav .nav-right {
    flex-wrap: nowrap;
    gap: 0.35rem;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
  }

  .agentic-tl-nav .nav-pill {
    /* 60% of prior mobile capsule sizing */
    font-size: calc(0.312rem * 1.5) !important;
    padding: calc(0.12rem * 1.5) calc(0.33rem * 1.5) !important;
    white-space: nowrap;
    max-width: 45vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Hide only Base Wallet capsule on mobile */
  .agentic-tl-nav .agentic-tl-nav-base-pill {
    display: none !important;
  }

  .agentic-tl-nav .logout-btn {
    font-size: calc(0.52rem * 1.5) !important;
    padding: calc(0.20rem * 1.5) calc(0.45rem * 1.5) !important;
    white-space: nowrap;
    flex-shrink: 0;
  }
}
