/* 예시 공통 레이아웃: 좌측 고정 사이드바 + 우측 컨텐츠 */
html, body {
  height: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.ex-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100%;
}

/* Collapsed state (desktop) */
.ex-shell.is-sidebar-collapsed {
  grid-template-columns: 0 1fr;
}

.ex-shell.is-sidebar-collapsed .ex-sidebar {
  width: 0;
  padding: 0;
  border-right: 0;
  overflow: hidden;
}

.ex-sidebar {
  border-right: 1px solid #e5e7eb;
  background: #fafafa;
  overflow-y: auto;
}

.ex-sidebar .ex-brand {
  padding: 16px;
  font-weight: 600;
}

.ex-sidebar nav {
  padding: 8px 0;
}

.ex-sidebar a {
  display: block;
  padding: 10px 16px;
  color: #111827;
  text-decoration: none;
}

.ex-sidebar a.active {
  background: #eef2ff;
  color: #1f2937;
  font-weight: 600;
}

.ex-content {
  overflow: auto;
}

.ex-content .ex-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.ex-content .ex-header {
  display: flex;
  align-items: center;
}

.ex-content .ex-header .ex-sidebar-toggle {
  margin-right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ex-sidebar-toggle {
  appearance: none;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}

.ex-content .ex-main {
  padding: 20px 0;


}


/* Example-only section (docs-like) */
.ex-section {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 20px;
}

.ex-section+.ex-section {
  margin-top: 20px;
}

.ex-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.ex-section-title-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ex-section-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
}

.ex-section-description {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.ex-section-content {
  padding: 16px;
}

/* 모바일: 고정 오버레이 사이드바 */
@media (max-width: 1024px) {
  .ex-shell {
    grid-template-columns: 1fr;
  }

  .ex-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 80vw;
    max-width: 320px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 1001;
  }

  .ex-shell.is-sidebar-open .ex-sidebar {
    transform: translateX(0);
  }

  .ex-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
  }

  .ex-shell.is-sidebar-open .ex-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Sidebar demo: place component sidebar inside content (absolute) */
body.ex-demo-sidebar .ex-content {
  position: relative;
}


/* Docs summary styles */
.ex-section-content.ex-docs {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.ex-section-content.ex-docs h4 {
  margin: 0 0 6px;
  font-size: 16px;
}

.ex-section-content.ex-docs p {
  margin: 0;
  color: #6b7280;
}

.ex-section-content.ex-docs pre {
  margin: 0;
  width: 100%;
}

.ex-section-content.ex-docs ul {
  margin: 0;
  padding-left: 18px;
  color: #374151;
}

/* Shared basics (moved from root index.html) */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.header h1 {
  font-size: 24px;
  margin: 0;
}

.muted {
  color: #6b7280;
  font-size: 14px;
}

/* Code blocks */
pre {
  background: #0b1020;
  color: #e5e7eb;
  padding: 16px;
  border-radius: 8px;
  overflow: auto;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}


@media (max-width: 820px) {

  .container {
    padding: 0 16px;
  }

  .ex-content .ex-header {
    padding: 12px 16px;
  }

  .ex-content .ex-main {
    padding: 16px 0;
  }
}