/* Temporary static-export hotfixes until the real Next.js source is recovered. */
html[data-ds-route="chat"] .status-bar {
  display: none !important;
}

.nav-rail.expanded {
  width: clamp(168px, 16vw, 232px) !important;
  min-width: 168px !important;
  max-width: 320px !important;
  resize: horizontal;
  overflow: auto;
}

.nav-rail.expanded .nav-rail-item {
  min-height: 42px;
  flex-direction: row !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 9px 12px !important;
}

.nav-rail.expanded .nav-rail-item span,
.nav-rail.expanded .nav-rail-item div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-divider {
  width: 10px !important;
}

.panel-divider::after {
  left: 4px !important;
}

.panel-divider:hover,
.panel-divider.dragging {
  opacity: 0.45 !important;
}

html[data-ds-route="chat"] .chat-sidebar {
  min-width: 0;
}

html[data-ds-route="chat"] .chat-sidebar:not(.w-0) {
  min-width: min(320px, 86vw);
  resize: horizontal;
  overflow: auto;
  max-width: min(520px, 92vw);
}

html[data-ds-route="chat"] .chat-messages {
  padding-bottom: 2px;
}

.ds-hotfix-hidden {
  display: none !important;
}

.ds-public-chat-note,
.ds-wallet-auth-bar,
.ds-soma-power-compact {
  border: 1px solid var(--ds-border-subtle);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ds-text-1);
  border-radius: 8px;
  box-shadow: none;
}

.ds-public-chat-note {
  margin: 12px auto;
  max-width: 720px;
  padding: 12px 14px;
}

.ds-wallet-auth-bar,
.ds-soma-power-compact {
  margin: 6px auto;
  max-width: 960px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ds-wallet-auth-copy,
.ds-soma-power-copy {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.ds-wallet-auth-copy strong,
.ds-soma-power-copy strong,
.ds-public-chat-note strong {
  font-size: 13px;
  white-space: nowrap;
}

.ds-wallet-auth-copy span,
.ds-soma-power-copy span,
.ds-public-chat-note p {
  margin: 0;
  color: var(--ds-text-2);
  font-size: 10.5px;
  line-height: 1.3;
}

.ds-wallet-auth-message[data-tone="ok"] {
  color: #059669;
}

.ds-wallet-auth-message[data-tone="warn"] {
  color: var(--ds-error, #b91c1c);
}

.ds-wallet-auth-actions,
.ds-soma-power-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
}

.ds-wallet-auth-actions button,
.ds-soma-power-actions button,
.ds-soma-power-actions a {
  border: 1px solid var(--ds-border-subtle);
  background: var(--ds-bg-elevated);
  color: var(--ds-text-1);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 10.5px;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.ds-wallet-auth-actions .primary,
.ds-wallet-auth-modal .primary {
  background: var(--ds-gradient);
  color: white;
  border-color: transparent;
}

html[data-ds-route="wallet"] .ds-wallet-auth-required {
  outline: 1px dashed rgba(124, 58, 237, 0.35);
  outline-offset: 2px;
}

.ds-wallet-auth-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(3px);
}

.ds-wallet-auth-modal {
  position: fixed;
  z-index: 81;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--ds-border-subtle);
  background: var(--ds-bg-surface);
  color: var(--ds-text-1);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.22);
}

.ds-wallet-auth-modal h2 {
  margin: 0;
  font-size: 14px;
}

.ds-wallet-auth-modal p {
  margin: 6px 0 14px;
  color: var(--ds-text-2);
  font-size: 12px;
  line-height: 1.45;
}

.ds-wallet-auth-modal form {
  display: grid;
  gap: 10px;
}

.ds-wallet-auth-modal label {
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: var(--ds-text-2);
}

.ds-wallet-auth-modal input {
  border: 1px solid var(--ds-border-subtle);
  background: var(--ds-bg-elevated);
  color: var(--ds-text-1);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 12px;
  outline: none;
}

.ds-wallet-auth-modal input:focus {
  border-color: rgba(124, 58, 237, 0.65);
}

.ds-wallet-auth-modal button {
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 12px;
  cursor: pointer;
}

.ds-wallet-auth-modal .link {
  margin-top: 10px;
  border: 0;
  background: transparent;
  color: #6d5dfc;
  padding: 0;
}

.ds-wallet-auth-close {
  position: absolute;
  right: 10px;
  top: 10px;
  border: 0;
  background: transparent;
  color: var(--ds-text-2);
  padding: 2px 6px !important;
}

.ds-wallet-auth-error {
  min-height: 16px;
  color: var(--ds-error, #b91c1c);
  font-size: 11px;
}

html[data-ds-route="wallet"] button[disabled] {
  cursor: pointer !important;
}

.ds-public-wallet-lock,
.ds-soma-power-panel {
  display: none !important;
}

html[data-ds-route="wallet"] .ds-public-wallet-disabled {
  cursor: pointer !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.ds-public-wallet-lock-reason {
  margin-top: 8px !important;
  color: var(--ds-error, #b91c1c) !important;
}

.ds-hotfix-nav-item span:first-child {
  width: 20px;
  text-align: center;
  font-weight: 700;
  font-size: 10px;
}

.nav-rail:not(.expanded) .ds-hotfix-nav-item {
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2px !important;
  padding-inline: 0 !important;
  overflow: hidden;
}

.nav-rail:not(.expanded) .ds-hotfix-nav-item span:first-child {
  width: auto;
  font-size: 10px;
  line-height: 1;
}

.nav-rail:not(.expanded) .ds-hotfix-nav-item span:last-child {
  max-width: 52px;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.1;
}

@media (max-width: 900px) {
  .nav-rail.expanded {
    width: 180px !important;
    min-width: 180px !important;
  }

  html[data-ds-route="chat"] .chat-sidebar:not(.w-0) {
    min-width: min(300px, 88vw);
  }

  .ds-wallet-auth-bar,
  .ds-soma-power-compact {
    align-items: stretch;
    flex-direction: column;
  }

  .ds-wallet-auth-actions,
  .ds-soma-power-actions {
    justify-content: flex-start;
  }
}
