.resource-preview-drawer__overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: hsl(0 0% 0% / 20%);
  backdrop-filter: blur(1px);
}

.resource-preview-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  display: flex;
  width: min(1120px, 96vw);
  height: 100%;
  flex-direction: column;
  border-left: 1px solid var(--ms-color-border);
  background: var(--ms-color-background);
  box-shadow: var(--ms-shadow-lg);
  transition: transform var(--ms-duration-fast) var(--ms-easing-standard);
}

.resource-preview-drawer[data-open="false"] {
  transform: translateX(100%);
}

.resource-preview-drawer[data-open="true"] {
  transform: translateX(0);
}

.resource-preview-drawer__header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--ms-color-border);
  background: color-mix(in srgb, var(--ms-color-muted) 40%, transparent);
  padding: 12px 16px;
}

.resource-preview-drawer__header-icon {
  display: flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--ms-radius-md);
  background: color-mix(in srgb, var(--ms-color-primary) 10%, transparent);
  color: var(--ms-color-primary);
}

.resource-preview-drawer__title-block {
  min-width: 0;
  flex: 1 1 auto;
}

.resource-preview-drawer__title-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.resource-preview-drawer__scope-badge,
.resource-preview-drawer__close {
  flex-shrink: 0;
}

.resource-preview-drawer__title {
  overflow: hidden;
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-body);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-preview-drawer__description {
  overflow: hidden;
  margin: 2px 0 0;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-label);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-preview-drawer__body {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
}

.resource-preview-drawer__sidebar {
  display: none;
  width: 360px;
  min-height: 0;
  flex-shrink: 0;
  flex-direction: column;
  border-right: 1px solid var(--ms-color-border);
  background: color-mix(in srgb, var(--ms-color-muted) 20%, transparent);
}

@media (min-width: 1024px) {
  .resource-preview-drawer__sidebar {
    display: flex;
  }
}

.resource-preview-drawer__sidebar-header {
  border-bottom: 1px solid var(--ms-color-border);
  padding: 16px;
}

.resource-preview-drawer__sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ms-color-foreground);
  font-size: var(--ms-text-body);
  font-weight: 600;
}

.resource-preview-drawer__sidebar-description {
  margin: 4px 0 0;
  color: var(--ms-color-muted-foreground);
  font-size: var(--ms-text-label);
  line-height: 20px;
}

.resource-preview-drawer__sidebar-content {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 12px;
}

.resource-preview-drawer__sidebar-footer {
  border-top: 1px solid var(--ms-color-border);
  padding: 12px;
}

.resource-preview-drawer__main {
  min-width: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}

.resource-preview-drawer__main-block {
  padding: 16px;
}

.resource-preview-drawer__main-block + .resource-preview-drawer__main-block {
  padding-top: 0;
}

.resource-preview-drawer__footer {
  flex-shrink: 0;
  border-top: 1px solid var(--ms-color-border);
  padding: 12px 16px;
}
