/* Parallel Terminal — focused visual refinements.
   This layer intentionally leaves the existing application behaviour intact. */

:root {
  --pt-sui-blue: #5db7ff;
  --pt-panel: #0b121c;
  --pt-panel-solid: #08111c;
  --pt-line: rgba(118, 145, 178, 0.22);
}

html[data-theme="light"] {
  --pt-sui-blue: #1479e5;
  --pt-panel: #f4f7fb;
  --pt-panel-solid: #ffffff;
  --pt-line: rgba(86, 108, 134, 0.22);
}

/* Keep the primary navigation dense and make the selected surface hug its label. */
.pt-refined-nav-group {
  display: flex !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 3px !important;
}

.pt-refined-nav {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding-inline: 11px !important;
  border-radius: 3px !important;
  transform-origin: center !important;
}

.pt-refined-nav.active,
.pt-refined-nav[aria-current="page"],
.pt-refined-nav[data-active="true"] {
  width: auto !important;
  background-clip: padding-box !important;
}

/* Search shortcut: exact square, with a centered slash. */
.pt-search-keycap {
  box-sizing: border-box !important;
  display: inline-flex !important;
  flex: 0 0 25px !important;
  width: 25px !important;
  min-width: 25px !important;
  height: 25px !important;
  padding: 0 !important;
  margin: 0 3px 0 6px !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  text-align: center !important;
  text-indent: 0 !important;
  font-family: var(--twk-everett-page) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}

/* Compact preset control; it should read as a control, not a full-width status bar. */
.pt-preset-parent {
  display: flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  align-items: center !important;
}

.pt-preset-button {
  box-sizing: border-box !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 86px !important;
  max-width: max-content !important;
  height: 25px !important;
  min-height: 25px !important;
  padding: 0 10px !important;
  margin: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  line-height: 1 !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
}

/* Token identity spacing and unobstructed SUI network badge. */
.pt-token-card {
  position: relative !important;
  isolation: isolate;
  overflow: visible !important;
}

.pt-token-card .token-card-top,
.pt-token-card .token-identity {
  overflow: visible !important;
}

.pt-token-card .token-identity {
  column-gap: 10px !important;
  padding-left: 2px !important;
}

.pt-token-card .token-avatar {
  position: relative !important;
  flex: 0 0 auto !important;
  overflow: visible !important;
  margin-right: 1px !important;
}

.pt-token-card .token-avatar::after {
  box-sizing: border-box !important;
  right: -5px !important;
  bottom: -5px !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  z-index: 8 !important;
  opacity: 1 !important;
  visibility: visible !important;
  border-radius: 50% !important;
}

.pt-token-card .pt-avatar-badge,
.pt-token-card .token-avatar [class*="sui" i][class*="badge" i],
.pt-token-card .token-avatar [class*="network" i][class*="badge" i] {
  box-sizing: border-box !important;
  position: absolute !important;
  right: -5px !important;
  bottom: -5px !important;
  display: inline-flex !important;
  width: 15px !important;
  min-width: 15px !important;
  height: 15px !important;
  min-height: 15px !important;
  padding: 2px !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 8 !important;
  border: 1px solid var(--pt-sui-blue) !important;
  border-radius: 50% !important;
  background: #08111c !important;
  color: var(--pt-sui-blue) !important;
}

.pt-token-card .pt-avatar-badge :is(svg, img),
.pt-token-card .token-avatar [class*="sui" i][class*="badge" i] :is(svg, img),
.pt-token-card .token-avatar [class*="network" i][class*="badge" i] :is(svg, img) {
  display: block !important;
  width: 9px !important;
  height: 9px !important;
  object-fit: contain !important;
}

/* Desktop-only cursor-following blue bloom. */
@media (hover: hover) and (pointer: fine) {
  .pt-token-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
      240px circle at var(--pt-cursor-x, 50%) var(--pt-cursor-y, 50%),
      rgba(75, 161, 255, 0.13) 0%,
      rgba(39, 105, 180, 0.065) 34%,
      rgba(8, 17, 28, 0) 72%
    );
    transition: opacity 150ms ease;
  }

  .pt-token-card > * {
    position: relative;
    z-index: 1;
  }

  .pt-token-card:hover::after {
    opacity: 1;
  }
}

/* Preserve the live application under analysis views. */
.pt-modal-layer {
  background: rgba(1, 5, 11, 0.62) !important;
  -webkit-backdrop-filter: blur(3px) !important;
  backdrop-filter: blur(3px) !important;
}

.pt-scan-modal {
  background: var(--pt-panel-solid) !important;
  opacity: 1 !important;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.48) !important;
}

/* Bottom controls share one compact alignment rhythm. */
.pt-bottom-action {
  box-sizing: border-box !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  height: 25px !important;
  padding-inline: 9px !important;
  margin: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  border-radius: 4px !important;
}

.pt-bottom-action.active,
.pt-bottom-action[aria-pressed="true"] {
  width: auto !important;
  background-clip: padding-box !important;
}

/* Price-preview header: reuse the same SUI mark as the top-bar selector. */
.pt-sui-price-popup-header {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
}

.pt-sui-price-popup-header .pt-canonical-sui-icon,
.pt-sui-price-popup-header > :is(svg, img):first-child {
  display: block !important;
  flex: 0 0 20px !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  object-fit: contain !important;
  object-position: center !important;
}

@media (max-width: 767px), (hover: none), (pointer: coarse) {
  .pt-token-card::after {
    display: none !important;
  }
}
