/* Reserve the host scrollbar across loading, purchase and embedded pages. */
html[data-eazyai-recharge-enabled="true"] {
  scrollbar-gutter: stable;
}

/* Only the retired user route is hidden. Admin code management stays visible. */
html[data-eazyai-recharge-enabled="true"] nav a[href="/redeem"],
html[data-eazyai-recharge-enabled="true"] nav a[href="/redeem/"] {
  display: none !important;
}

.eazyai-configuration-entry {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: none;
  white-space: nowrap;
}
.eazyai-configuration-entry .eazyai-configuration-icon { width: 16px; height: 16px; flex: 0 0 auto; }
.eazyai-configuration-entry:hover { background: #f3f4f6; color: #111827; }
.eazyai-configuration-entry:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }
html.dark .eazyai-configuration-entry { color: #9ca3af; }
html.dark .eazyai-configuration-entry:hover { background: #1f2937; color: #fff; }
@media (max-width: 639px) {
  .eazyai-configuration-entry { padding: 6px; font-size: 12px; }
}

/* Native purchase page only. Do not reparent Vue-managed payment controls. */
main [data-eazyai-purchase-layout="true"] {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
main [data-eazyai-purchase-layout] > [data-eazyai-purchase-item]:not([hidden]) {
  min-width: 0;
  margin-top: 0;
  margin-bottom: 0;
  /* Native cards/buttons use transition: all. Keep paint/interaction effects,
     while the replacement spacing and help padding take effect immediately. */
  transition-property: background-color, border-color, color, box-shadow, opacity, transform;
}
main [data-eazyai-purchase-help="true"] {
  order: -1;
  padding: 14px 20px;
}
main [data-eazyai-purchase-layout] > [data-eazyai-purchase-tabs="true"] {
  display: none;
}
main [data-eazyai-purchase-help] .markdown-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 20px;
  row-gap: 4px;
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
main [data-eazyai-purchase-help] .markdown-body > p {
  margin: 0;
}
main [data-eazyai-purchase-help] .markdown-body a {
  /* Its inherited font size also changes when the inline notes are applied. */
  transition-property: color, text-decoration-color;
}

aside .sidebar-section[data-eazyai-recharge-menu="true"] {
  display: flex;
  flex-direction: column;
}
aside .sidebar-section[data-eazyai-recharge-menu="true"] > [data-eazyai-menu-order="true"] {
  order: var(--eazyai-menu-order);
}
