/* Example Page Styles */

/* Page layout - fullscreen, no scroll on main container */
.example-page {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f5f1e8; /* Beige background */
  overflow: hidden;
}

/* Header */
.example-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: #ffffff;
  border-bottom: 1px solid #e0ddd4;
  flex-shrink: 0;
  height: 60px;
}

.example-header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
}

.example-logo-link {
  display: flex;
  align-items: center;
}

.example-logo {
  height: 36px;
  width: auto;
}

.example-gallery-link {
  font-size: 1rem;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.example-gallery-link:hover {
  color: #007acc;
}

.example-title-container {
  flex: 1;
}

.example-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.example-header-right {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.example-nav-button {
  padding: 0.5rem 1rem;
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s;
  cursor: pointer;
}

.example-nav-button:hover {
  background-color: #f5f1e8;
  border-color: #007acc;
  color: #007acc;
}

.example-nav-button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Main content area - split layout for example pages */
.example-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Tutorial content area - scrollable, full width */
.tutorial-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2rem 0;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Tutorial links to example pages */
.tutorial-link {
  color: #007acc;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.tutorial-link:hover {
  color: #005a9e;
  text-decoration: underline;
}

/* Visualization panel - left side */
.example-viz-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
  background-color: #f5f1e8; /* Beige background */
}

.example-viz {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Make SVG backgrounds white */
.example-viz svg {
  background-color: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Code panel - right side */
.example-code-panel {
  width: 50%;
  max-width: 800px;
  background-color: #ffffff;
  border-left: 1px solid #e0ddd4;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.code-panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  padding: 1.5rem 2rem 1rem 2rem;
  margin: 0;
  border-bottom: 1px solid #e0ddd4;
  flex-shrink: 0;
}

.code-block {
  flex: 1;
  margin: 0;
  padding: 1rem;
  overflow-y: auto;
  background-color: #fafaf8;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.5;
}

/* Prism code styling within code blocks */
.code-block pre {
  margin: 0;
  padding: 0;
  background: transparent;
}

.code-block pre code {
  font-size: inherit;
  line-height: inherit;
}

.code-block code {
  display: block;
  color: #333;
}

/* Code Note */
.code-note {
  padding: 0.75rem 2rem;
  margin: 0;
  font-size: 0.875rem;
  color: #666;
  background-color: #fafaf8;
  border-bottom: 1px solid #e0ddd4;
  flex-shrink: 0;
}

.code-note a {
  color: #007acc;
  text-decoration: underline;
  font-weight: 500;
}

.code-note a:hover {
  color: #005a9e;
}

/* Emmet Section */
.emmet-section {
  margin: 1.5rem 2rem;
  padding: 1.5rem;
  background: #f0fdf4;
  border-radius: 8px;
  border-left: 4px solid #22c55e;
  flex-shrink: 0;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: #333;
  letter-spacing: 0.025em;
}

.emmet-code {
  background: #ffffff;
  padding: 1rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Consolas', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  overflow-x: auto;
  border: 1px solid #bbf7d0;
  line-height: 1.6;
  margin: 0 0 0.75rem 0;
  color: #166534;
}

.emmet-code code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.emmet-note {
  margin: 0;
  font-size: 0.8125rem;
  color: #166534;
  line-height: 1.5;
}

.builder-link {
  color: #16a34a;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s;
}

.builder-link:hover {
  color: #15803d;
}

/* Responsive layout for tablets and smaller */
@media (max-width: 1024px) {
  .example-content {
    flex-direction: column;
  }

  .example-viz-panel {
    flex: 1;
    min-height: 50%;
  }

  .example-code-panel {
    width: 100%;
    max-width: 100%;
    max-height: 50%;
    border-left: none;
    border-top: 1px solid #e0ddd4;
  }
}

/* Mobile layout */
@media (max-width: 768px) {
  .example-header {
    padding: 0.75rem 1rem;
    height: auto;
    flex-wrap: wrap;
  }

  .example-header-left {
    gap: 1rem;
  }

  .example-logo {
    height: 28px;
  }

  .example-title {
    font-size: 1rem;
  }

  .example-header-right {
    width: 100%;
    justify-content: flex-end;
    margin-top: 0.5rem;
  }

  .example-nav-button {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }

  .example-viz-panel {
    padding: 1rem;
  }

  .code-panel-title {
    padding: 1rem;
    font-size: 1rem;
  }

  .code-block {
    padding: 0.75rem;
    font-size: 0.7rem;
  }
}
