.module-toolbar {
  width: min(var(--module-max-width, 1180px), 94vw);
  min-height: 66px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.8);
}

.module-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1e3a8a;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.module-back:hover {
  color: #2563eb;
}

.module-language-picker {
  min-width: 0;
}

.module-language-picker .sn-langpicker-row {
  justify-content: flex-end;
}

.loading-state,
.error-state {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  color: var(--muted, #6b7280);
}

.loading-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #dbeafe;
  border-top-color: var(--accent, #2563eb);
  border-radius: 50%;
  animation: module-spin 0.8s linear infinite;
}

.error-state strong {
  color: var(--text, #111827);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

@keyframes module-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 639px) {
  .module-toolbar {
    min-height: 58px;
    align-items: flex-start;
    padding: 10px 0;
  }

  .module-back {
    width: 44px;
    min-height: 42px;
    justify-content: center;
    font-size: 1.25rem;
  }

  .module-back [data-ui] {
    display: none;
  }

  .module-language-picker .sn-langpicker-row {
    gap: 6px;
  }

  .module-language-picker .sn-langpicker-field__label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-spinner {
    animation-duration: 1.5s;
  }
}
