/* DSM overlay: same chrome as DSH settings (SettingsRoot.module.css). */

.dsm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
}

.dsm-overlay.is-open,
body.dsm-standalone > .dsm-overlay {
  display: flex;
}

.dsm-overlay[hidden] {
  display: none !important;
}

.dsm-mask {
  position: absolute;
  inset: 0;
  background: var(--dsw-alias-bg-mask-1);
  backdrop-filter: var(--dsw-mask-blur, blur(8px));
}

.dsm-panel {
  position: relative;
  z-index: 1;
  display: flex;
  width: 800px;
  height: min(800px, calc(100vh - 48px));
  max-width: calc(100vw - 48px);
  border-radius: 24px;
  overflow: hidden;
  background: var(--dsw-alias-bg-layer-2);
  box-shadow: var(--dsw-shadow-lv3, 0 24px 80px rgba(0, 0, 0, 0.24));
  --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);
  --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);
}

.dsm-panel[data-dsm-kind="admin"] {
  width: 1080px;
}

.dsm-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

body.dsm-standalone {
  margin: 0;
  min-height: 100vh;
  background: var(--dsw-alias-bg-base);
  color: var(--dsw-alias-label-primary);
}

html.dsm-embed,
body.dsm-embed {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body.dsm-embed .dsm-panel {
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: 0;
  box-shadow: none;
}

.dsm-nav {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 188px;
  padding: 22px 12px 0;
  box-sizing: border-box;
  border-right: 1px solid var(--dsw-alias-border-l3);
}

.dsm-nav-title {
  padding: 0 12px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: var(--dsw-alias-label-primary);
}

.dsm-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dsm-nav-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 9px 16px 9px 12px;
  box-sizing: border-box;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  line-height: 22px;
  font-weight: 400;
  color: var(--dsw-alias-label-primary);
  text-align: left;
}

.dsm-nav-cell:hover {
  background: var(--dsw-specific-sidebar-nav-item-hover);
}

.dsm-nav-cell.active {
  background: var(--dsw-specific-sidebar-nav-item-active);
}

.dsm-nav-icon {
  flex: none;
}

.dsm-nav-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dsm-nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dsm-nav-sub {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 0 0 4px 12px;
}

.dsm-nav-group.is-open > .dsm-nav-sub {
  display: flex;
}

.dsm-nav-subcell {
  height: 34px;
  padding: 6px 12px 6px 20px;
  font-size: 13px;
}

.dsm-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dsm-header {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 54px;
  padding: 20px 14px 8px 10px;
  box-sizing: border-box;
}

.dsm-status {
  min-width: 0;
  flex: 1;
  margin: 0;
  color: var(--dsw-alias-label-secondary);
  font-size: 13px;
  line-height: 22px;
}

.dsm-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dsm-actions a {
  border: 1px solid var(--dsw-alias-border-l3);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--dsw-alias-label-secondary);
  background: transparent;
  font-size: 12px;
  line-height: 20px;
  text-decoration: none;
}

.dsm-actions a:hover {
  background: var(--dsw-alias-interactive-bg-hover);
  color: var(--dsw-alias-label-primary);
}

.dsm-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 28px;
  background: transparent;
  cursor: pointer;
  color: var(--dsw-alias-label-primary);
}

.dsm-close:hover {
  background: var(--dsw-alias-interactive-bg-hover);
}

.dsm-options {
  flex: 1;
  min-height: 0;
  padding: 0 24px 24px;
  overflow-y: auto;
}

.dsm-section {
  display: none;
}

.dsm-section.active {
  display: block;
}

.dsm-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
