/* Settings shell (figma 501:29904 mask context / 501:29947 panel): sidebar
   foot trigger row + centered 1080x700 modal panel. The trigger uses the
   sidebar foot's 42px row / 36px rail circle rhythm; the
   panel is a two-column layout — 188px nav rail + content column with a
   54px header and the 24px-padded options area. */

/* Trigger row: the 42px foot-row box shared with the Cordis footer action. */
.trigger {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% + 4px);
  height: 42px;
  margin: 4px -2px;
  padding: 0 10px 0 8px;
  box-sizing: border-box;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  color: var(--dsw-alias-label-primary);
  font-family: inherit;
  font-size: 14px;
  line-height: 22px;
}

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

/* Rail trigger: the same 36x36 circle box as the other rail controls. */
.trigger.rail {
  width: 36px;
  height: 36px;
  margin: 8px 0 10px;
  justify-content: center;
  gap: 0;
  padding: 0;
  border-radius: 50%;
}

.triggerLabel {
  overflow: hidden;
  white-space: nowrap;
}

/* Full-viewport layer (figma Mask 501:29946 #000@24%): mask tokens match the
   Modal primitive (--dsw-alias-bg-mask-1 + --dsw-mask-blur). */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Panel (figma Settings 501:29947): r24, white, lv3 shadow (figma effects
   match --dsw-shadow-lv3 exactly); figma's 1080x700 is shrunk to 800 wide.
   One height for every section, taken from the viewport rather than the
   content: sections differ by hundreds of pixels (a settings list against the
   composition editor), and a content-sized panel would resize under the
   pointer on every nav click. Whatever does not fit scrolls in `.options`. */
.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);
  /* Elevated surface: the scrollbar thumb takes the l2 elevation tokens.
     Declared on the panel rather than the scrolling `.options` child so the
     elevation choice sits with the surface; the custom properties inherit
     down to whichever descendant scrolls (see ui-theme
     styles/scrollbar.css for the rebinding contract). */
  --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);
  --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);
}

/* Nav rail (figma .Setting-nav 501:29958): 188 wide, pad (12,22,12,0),
   gap 18, no own fill — the panel white shows through. */
.nav {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 188px;
  padding: 22px 12px 0;
  box-sizing: border-box;
}

/* Title row (figma 501:29959): 16/500 lh24, 12px side padding. */
.navTitle {
  padding: 0 12px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: var(--dsw-alias-label-primary);
}

/* Cell stack (figma 501:29961): gap 4. */
.navList {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Nav cell (figma .Setting-nav-cell 501:29962): 164x40, r12, pad
   (12,9,16,9), gap 8; label 14/400 lh22; selected fill #EBEEF2. */
.navCell {
  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;
}

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

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

.navIcon {
  flex: none;
}

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

/* Content column (figma Content 501:29980): header + options. */
.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Header (figma .Header 501:29981): h54, pad (10,20,14,8), close right. */
.header {
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  height: 54px;
  padding: 20px 14px 8px 10px;
  box-sizing: border-box;
}

.actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

/* Close button (figma .Icon_container 501:29982): 28x28, r28, 14px glyph. */
.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);
}

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

/* Options area (figma Options 501:29983): pad (24,0,24,24), scrolls. */
.options {
  flex: 1;
  min-height: 0;
  padding: 0 24px 24px;
  overflow-y: auto;
}

/* Visually-hidden text seat (close button accessible name from slot content). */
.hiddenLabel {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
