.examples-dialog {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.examples-dialog.hidden {
  display: none;
}

.examples-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(1px);
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.18s ease;
}

.examples-dialog.open .examples-dialog-backdrop {
  opacity: 1;
}

[data-theme="dark"] .examples-dialog-backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
}

.examples-dialog-panel {
  position: relative;
  width: min(72rem, calc(100vw - 2rem));
  height: 100vh;
  display: grid;
  grid-template-rows: var(--panel-header-height) minmax(0, 1fr);
  overflow: hidden;
  border: 0;
  border-left: 1px solid #cbd5e1;
  border-radius: 0;
  background: #ffffff;
  box-shadow: -18px 0 48px rgba(15, 23, 42, 0.22);
  pointer-events: auto;
  transform: translateX(100%);
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.examples-dialog.open .examples-dialog-panel {
  transform: translateX(0);
}

.examples-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.examples-dialog-title {
  color: #334155;
  font-size: 0.84rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.examples-dialog-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
}

.examples-list {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.5rem;
}

.example-list-item {
  width: 100%;
  display: block;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  padding: 0.5rem 0.62rem;
  text-align: left;
}

.example-list-item:hover,
.example-list-item:focus-visible {
  background: #e8eef7;
  outline: none;
}

.example-list-item.active {
  border-color: #bfdbfe;
  background: #dbeafe;
}

.example-list-title {
  display: block;
  color: #1e293b;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.2;
}

.examples-content {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 0 1.2rem 1.2rem;
}

.examples-content-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 -1.2rem 1rem;
  padding: 0.9rem 1.2rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.examples-content-title {
  color: #1e293b;
  font-size: 1.08rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
}

.examples-doc {
  max-width: 48rem;
  color: #334155;
  font: 0.92rem/1.58 "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
}

.examples-doc h2,
.examples-doc h3 {
  margin: 0 0 0.7rem;
  color: #1e293b;
  letter-spacing: 0;
}

.examples-doc h2 {
  font-size: 1.24rem;
}

.examples-doc h3 {
  font-size: 1.05rem;
}

.examples-doc p {
  margin: 0 0 0.72rem;
}

.examples-doc ul,
.examples-doc ol {
  margin: 0 0 0.85rem;
  padding-left: 1.35rem;
}

.examples-doc li {
  margin: 0.28rem 0;
  padding-left: 0.1rem;
}

.examples-doc pre {
  margin: 0 0 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  overflow: auto;
  padding: 0.7rem 0.78rem;
  font: 0.78rem/1.55 "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.examples-doc pre code {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
}

.examples-doc code {
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #f8fafc;
  padding: 0.04rem 0.22rem;
  color: #1e40af;
  font-family: var(--font-mono);
  font-size: 0.78em;
}

.examples-try-button {
  flex: 0 0 auto;
  height: 2rem;
}

.examples-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

.examples-preview {
  min-width: 0;
  border: 1px solid #dbe3ed;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}

.examples-preview-title {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.45rem 0.6rem;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.examples-preview pre {
  max-height: 18rem;
  margin: 0;
  overflow: auto;
  padding: 0.65rem;
  color: #1f2933;
  font: 0.72rem/1.5 "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  white-space: pre;
}

.examples-preview:first-child pre {
  max-height: 22rem;
}
