/* Component layer — no page-specific positioning here. */

.na-button,.edd-submit,button.edd-submit,input[type=submit] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--na-control-h) !important;
  padding: 0 19px !important;
  border: 1px solid var(--na-text) !important;
  border-radius: var(--na-pill) !important;
  background: var(--na-text) !important;
  color: var(--na-bg) !important;
  box-shadow: none !important;
  font-size: 16px !important;
  font-weight: var(--na-fw-semibold) !important;
  line-height: 1 !important;
  transition: transform var(--na-fast) var(--na-ease),box-shadow var(--na-fast),background-color var(--na-fast),border-color var(--na-fast);
}

.na-button:hover,.edd-submit:hover,input[type=submit]:hover {
  transform: translateY(-2px);
  box-shadow: var(--na-shadow-1) !important;
}

.na-button:active,.edd-submit:active {
  transform: translateY(0) scale(.985);
}

.na-button--ghost {
  background: var(--na-surface) !important;
  color: var(--na-text) !important;
  border-color: var(--na-line-strong) !important;
}

.na-button--sm {
  min-height: 40px !important;
  padding-inline: 16px !important;
  font-size: 15px !important;
}

.na-icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--na-text);
  transition: transform var(--na-fast),background-color var(--na-fast),border-color var(--na-fast);
}

.na-icon-button:hover {
  transform: translateY(-2px);
  background: var(--na-surface-2);
}

.na-icon-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Theme toggle exposes one icon only; the control footprint never changes by state. */
.na-theme-toggle__moon { display: none; }
.na-theme-toggle__sun { display: block; }
html[data-na-theme="dark"] .na-theme-toggle__sun { display: none; }
html[data-na-theme="dark"] .na-theme-toggle__moon { display: block; }

.na-header-cart__icon { display: grid; place-items: center; }
.na-header-cart__icon svg { width: 20px; height: 20px; }

.na-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--na-line);
  border-radius: var(--na-pill);
  background: var(--na-surface-2);
  color: var(--na-muted);
  font-size: 13px;
  font-weight: var(--na-fw-semibold);
}

.na-card {
  position: relative;
  background: transparent;
  color: var(--na-text);
}

.na-app-card {
  min-width: 0;
}

.na-app-card__main {
  display: block;
}

.na-app-card__visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.42/1;
  border-radius: var(--na-r-md);
  background: var(--na-surface-2);
  transform: translateZ(0);
  box-shadow: inset 0 0 0 1px var(--na-line);
  transition: transform var(--na-normal) var(--na-ease),box-shadow var(--na-normal),filter var(--na-normal);
}

.na-app-card__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--na-card-x,50%) var(--na-card-y,50%),rgba(255,255,255,.22),transparent 32%);
  opacity: 0;
  transition: opacity var(--na-normal);
  pointer-events: none;
}

.na-app-card:hover .na-app-card__visual {
  transform: translateY(-5px) scale(1.012);
  box-shadow: var(--na-shadow-2);
}

.na-app-card:hover .na-app-card__visual::after {
  opacity: .7;
}

.na-app-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--na-slow) var(--na-ease),filter var(--na-normal);
}

.na-app-card:hover .na-app-card__visual img {
  transform: scale(1.035);
}

.na-app-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 2rem;
  font-weight: var(--na-fw-bold);
  color: var(--na-muted);
}

.na-app-card__arrow {
  position: absolute;
  right: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb,var(--na-line-strong) 70%,transparent);
  border-radius: 50%;
  background: color-mix(in srgb,var(--na-surface) 90%,transparent);
  color: var(--na-text);
  opacity: 0;
  transform: translateY(5px) scale(.94);
  transition: opacity var(--na-fast),transform var(--na-fast);
}

.na-app-card:hover .na-app-card__arrow {
  opacity: 1;
  transform: none;
}

.na-app-card__content {
  padding-top: 13px;
}

.na-app-card__category {
  margin-bottom: 5px;
  color: var(--na-muted);
  font-size: 13px;
  font-weight: var(--na-fw-semibold);
}

.na-app-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.na-app-card p {
  margin: 0;
  color: var(--na-muted);
  font-size: 14px;
  line-height: 1.55;
}

.na-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.na-app-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 11px;
}

.na-app-card__footer-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.na-card__price {
  font-size: 15px;
  font-weight: var(--na-fw-semibold);
}

.na-download-count {
  color: var(--na-muted);
  font-size: 13px;
}

.na-empty {
  padding: 42px;
  border: 1px dashed var(--na-line-strong);
  border-radius: var(--na-r-lg);
  background: var(--na-bg-soft);
  color: var(--na-muted);
  text-align: center;
}

.na-discovery-search,.na-store-search {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  max-width: 900px;
  min-height: 64px;
  padding: 7px 8px 7px 18px;
  border: 1px solid var(--na-line-strong);
  border-radius: var(--na-pill);
  background: var(--na-surface);
  box-shadow: var(--na-shadow-1);
  transition: border-color var(--na-normal),box-shadow var(--na-normal),transform var(--na-normal);
}

.na-discovery-search:focus-within,.na-store-search:focus-within {
  border-color: color-mix(in srgb,var(--na-text) 44%,var(--na-line));
  box-shadow: var(--na-shadow-2);
  transform: translateY(-2px);
}

.na-discovery-search__icon,.na-store-search__icon {
  display: grid;
  place-items: center;
  width: 24px;
  color: var(--na-muted);
  font-size: 21px;
}

.na-discovery-search input,.na-store-search input {
  min-height: 48px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 18px !important;
}

.na-discovery-search button,.na-store-search button {
  min-width: 94px;
  height: 48px;
  border: 0;
  border-radius: var(--na-pill);
  background: var(--na-text);
  color: var(--na-bg);
  font-size: 15px;
  font-weight: var(--na-fw-semibold);
}

.na-store-discovery {
  display: grid;
  gap: 14px;
  margin: 22px 0 34px;
}

.na-store-category-tabs,.na-store-quick {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.na-store-category-tabs a,.na-store-quick a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--na-line);
  border-radius: var(--na-pill);
  background: var(--na-surface);
  color: var(--na-muted);
  font-size: 14px;
  font-weight: var(--na-fw-semibold);
  transition: transform var(--na-fast),background-color var(--na-fast),color var(--na-fast),border-color var(--na-fast);
}

.na-store-category-tabs a:hover,.na-store-quick a:hover {
  transform: translateY(-1px);
  color: var(--na-text);
  border-color: var(--na-line-strong);
}

.na-store-category-tabs a.is-active,.na-store-quick a.is-active {
  background: var(--na-text);
  border-color: var(--na-text);
  color: var(--na-bg);
}

.na-download-quickrow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.na-download-filter-divider {
  width: 1px;
  height: 26px;
  background: var(--na-line);
}

.na-filter-system {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.na-filter-system__groups {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.na-filter-menu {
  position: relative;
}

.na-filter-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--na-line-strong);
  border-radius: var(--na-pill);
  background: var(--na-surface);
  color: var(--na-text-2);
  font-size: 14px;
  font-weight: var(--na-fw-medium);
  white-space: nowrap;
  box-shadow: none;
  transition: background-color var(--na-fast),border-color var(--na-fast),color var(--na-fast),transform var(--na-fast),box-shadow var(--na-fast);
}

.na-filter-trigger:hover,.na-filter-trigger[aria-expanded="true"] {
  border-color: var(--na-text);
  color: var(--na-text);
  transform: translateY(-1px);
  box-shadow: var(--na-shadow-1);
}

.na-filter-trigger.is-active {
  background: var(--na-text);
  border-color: var(--na-text);
  color: var(--na-bg);
}

.na-filter-trigger svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--na-fast);
}

.na-filter-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.na-filter-popover {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 80;
  width: min(320px,calc(100vw - 36px));
  max-height: min(520px,calc(100vh - 140px));
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--na-line);
  border-radius: 18px;
  background: var(--na-surface);
  color: var(--na-text);
  box-shadow: var(--na-shadow-3);
}

.na-filter-popover[hidden] {
  display: none !important;
}

.na-filter-popover__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 8px 11px;
}

.na-filter-popover__head strong {
  font-size: 15px;
  font-weight: var(--na-fw-semibold);
}

.na-filter-popover__head button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--na-muted);
  font-size: 20px;
}

.na-filter-popover__head button:hover {
  background: var(--na-surface-2);
  color: var(--na-text);
}

.na-filter-options {
  display: grid;
  gap: 2px;
}

.na-filter-option {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--na-text-2);
  cursor: pointer;
  transition: background-color var(--na-fast),color var(--na-fast);
}

.na-filter-option:hover {
  background: var(--na-surface-2);
  color: var(--na-text);
}

.na-filter-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.na-filter-option span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  font-size: 14px;
}

.na-filter-option input:checked+span {
  color: var(--na-text);
  font-weight: var(--na-fw-semibold);
}

.na-filter-option input:checked+span::after {
  content: "✓";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--na-text);
  color: var(--na-bg);
  font-size: 12px;
}

.na-filter-popover__actions {
  position: sticky;
  bottom: -10px;
  display: flex;
  justify-content: flex-end;
  margin: 8px -2px -2px;
  padding: 10px 2px 2px;
  border-top: 1px solid var(--na-line);
  background: linear-gradient(to bottom,color-mix(in srgb,var(--na-surface) 90%,transparent),var(--na-surface) 24%);
}

.na-filter-system__tail {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}

.na-filter-menu--sort .na-filter-popover {
  right: 0;
  left: auto;
}

.na-filter-trigger--sort {
  gap: 9px;
}

.na-filter-trigger__prefix {
  color: var(--na-muted);
  font-size: 12px;
  font-weight: var(--na-fw-regular);
}

.na-filter-trigger--sort.is-active .na-filter-trigger__prefix {
  color: currentColor;
  opacity: .72;
}

.na-filter-reset {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 8px;
  color: var(--na-muted);
  font-size: 13px;
  font-weight: var(--na-fw-medium);
  white-space: nowrap;
}

.na-filter-reset:hover {
  color: var(--na-text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.na-favorite-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 42px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--na-line);
  border-radius: var(--na-pill);
  background: color-mix(in srgb,var(--na-surface) 94%,transparent);
  color: var(--na-muted);
  box-shadow: var(--na-shadow-1);
  transition: transform var(--na-fast) var(--na-ease-spring),color var(--na-fast),border-color var(--na-fast),background-color var(--na-fast);
}

.na-favorite-badge:hover {
  transform: translateY(-2px) scale(1.02);
  color: var(--na-accent);
  border-color: color-mix(in srgb,var(--na-accent) 35%,var(--na-line));
}

.na-favorite-badge svg {
  width: 18px;
  height: 18px;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: fill var(--na-fast),transform var(--na-fast);
}

.na-favorite-badge.is-active {
  color: var(--na-accent);
  background: var(--na-accent-soft);
  border-color: color-mix(in srgb,var(--na-accent) 30%,var(--na-line));
}

.na-favorite-badge.is-active svg {
  fill: currentColor;
  transform: scale(1.05);
}

.na-favorite-badge--card {
  position: absolute;
  z-index: 4;
  right: 10px;
  top: 10px;
}

.na-favorite-badge--title {
  height: 40px;
  min-width: 40px;
}

.na-favorite-badge--product {
  width: 100%;
  min-height: 46px;
  border-radius: var(--na-r-sm);
  box-shadow: none;
}

.na-product-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.na-product-stat,.na-product-stats .na-favorite-badge--product {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--na-line);
  border-radius: var(--na-r-sm);
  background: var(--na-surface-2);
  color: var(--na-muted);
  font-size: 13px;
}

.na-product-stat strong {
  color: var(--na-text);
}

/* Account document modal — one implementation for receipt and license views. */
.na-document-modal-v2 {
  width: min(920px,calc(100vw - 36px));
  max-height: min(880px,calc(100vh - 36px));
  padding: 0;
  border: 0;
  border-radius: var(--na-r-xl);
  background: var(--na-surface);
  color: var(--na-text);
  box-shadow: var(--na-shadow-3);
  overflow: hidden;
}

.na-document-modal-v2::backdrop {
  background: rgba(8,8,12,.68);
  backdrop-filter: blur(8px);
}

.na-doc-v2__panel {
  display: grid;
  grid-template-rows: auto minmax(0,1fr);
  max-height: min(880px,calc(100vh - 36px));
}
.na-doc-v2__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--na-line);
  background: var(--na-surface);
}
.na-doc-v2__head>div { display: grid; gap: 2px; }
.na-doc-v2__head span { color: var(--na-muted); font-size: 11px; letter-spacing: .1em; }
.na-doc-v2__head strong { color: var(--na-text); font-size: 17px; font-weight: var(--na-fw-semibold); }
.na-doc-v2__head button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--na-line);
  border-radius: 50%;
  background: var(--na-surface-2);
  color: var(--na-text);
  font-size: 22px;
  line-height: 1;
}
.na-doc-v2__head button:hover { background: var(--na-surface-3); }
.na-doc-v2__body { min-height: 240px; overflow: auto; background: var(--na-bg-soft); }
.na-doc-v2__loading,.na-doc-v2__empty { display: grid; place-items: center; gap: 10px; min-height: 260px; padding: 28px; color: var(--na-muted); text-align: center; }
.na-doc-v2__empty strong { color: var(--na-text); }

/* Receipt: backdrop + receipt itself only. No second bright modal surface. */
.na-document-modal-v2.is-receipt {
  width: min(812px,calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.na-document-modal-v2.is-receipt .na-doc-v2__panel { display: block; max-height: none; }
.na-document-modal-v2.is-receipt .na-doc-v2__head { display: none; }
.na-document-modal-v2.is-receipt .na-doc-v2__body { position: relative; overflow: visible; background: transparent; }
.na-invoice-v2 {
  display: block;
  width: 100%;
  height: min(760px,calc(100vh - 28px));
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 72px rgba(8,8,12,.22);
}

.na-receipt-close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(13,12,34,.12);
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: #181820;
  box-shadow: 0 6px 24px rgba(13,12,34,.12);
  font-size: 21px;
  line-height: 1;
}
.na-receipt-close:hover { background: #fff; transform: translateY(-1px); }

/* Favorite login toast — non-blocking, shared by card/title/detail favorite actions. */

.na-login-required-toast {
  position: fixed;
  z-index: 10000;
  left: 24px;
  top: calc(var(--na-header-h) + 18px);
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(390px,calc(100vw - 32px));
  padding: 15px 14px 15px 16px;
  border: 1px solid var(--na-line-strong);
  border-radius: 12px;
  background: var(--na-surface);
  color: var(--na-text);
  box-shadow: var(--na-shadow-3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.985);
  transition: opacity var(--na-fast),visibility var(--na-fast),transform var(--na-normal) var(--na-ease);
}

.admin-bar .na-login-required-toast {
  top: calc(var(--na-header-h) + 50px);
}

.na-login-required-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.na-login-required-toast__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--na-accent-soft);
  color: var(--na-accent);
  font-size: 17px;
}

.na-login-required-toast__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.na-login-required-toast__copy strong {
  font-size: 14px;
  font-weight: var(--na-fw-semibold);
}

.na-login-required-toast__copy a {
  width: max-content;
  color: var(--na-text);
  font-size: 14px;
  font-weight: var(--na-fw-semibold);
}

.na-login-required-toast__copy a:hover {
  color: var(--na-accent);
}

.na-login-required-toast__close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--na-muted);
  font-size: 21px;
}

.na-login-required-toast__close:hover {
  background: var(--na-surface-2);
  color: var(--na-text);
}

/* Small shared utility modifiers. */

.na-button--block {
  width: 100%;
}

.na-card--content {
  padding: 24px;
  border: 1px solid var(--na-line);
  border-radius: var(--na-r-lg);
  background: var(--na-surface);
  box-shadow: var(--na-shadow-1);
}

.na-copy-toast {
  position:fixed; left:50%; bottom:28px; z-index:11000; transform:translate(-50%,10px);
  padding:11px 16px; border:1px solid var(--na-line-strong); border-radius:var(--na-pill);
  background:var(--na-text); color:var(--na-bg); box-shadow:var(--na-shadow-3);
  font-size:14px; font-weight:var(--na-fw-medium); opacity:0; visibility:hidden;
  transition:opacity var(--na-fast),transform var(--na-fast),visibility var(--na-fast);
}
.na-copy-toast.is-visible { opacity:1; visibility:visible; transform:translate(-50%,0); }

/* 2.0.29 stable: fixed two-line software summaries. */
.na-app-card__content > p{display:-webkit-box;min-height:calc(1.55em * 2);max-height:calc(1.55em * 2);overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;}

/* 2.0.31 stable: visual metadata badges replace redundant card footer. */
.na-app-card__price-badge,
.na-app-card__download-badge{
  position:absolute;
  z-index:3;
  bottom:12px;
  min-height:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid color-mix(in srgb,var(--na-line-strong) 76%,transparent);
  border-radius:var(--na-pill);
  background:color-mix(in srgb,var(--na-surface) 88%,transparent);
  color:var(--na-text);
  box-shadow:0 5px 18px rgba(0,0,0,.12);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  font-size:13px;
  font-weight:var(--na-fw-semibold);
  line-height:1;
}
.na-app-card__price-badge{left:12px;padding:0 11px;}
.na-app-card__download-badge{right:12px;gap:5px;padding:0 9px;}
.na-app-card__download-badge svg{
  width:15px;
  height:15px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
