:host {
  display: block;
}

.example-card {
  background: #ffffff;
  border: 1px solid #dbe4ef;
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(28, 48, 74, 0.05);
  min-width: 0;
  padding: 14px;
}

.example-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.example-title p {
  color: #566f86;
  font-size: 13px;
  margin: 4px 0 0;
}

.preview {
  border: 1px solid #d8e1eb;
  border-radius: 6px;
  min-width: 0;
  overflow: hidden;
}

.status-pill {
  background: #edf7ed;
  border: 1px solid #b7dfb7;
  border-radius: 999px;
  color: #1f6f35;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 9px;
}

.event-log {
  align-items: start;
  background: #f6f9fc;
  border: 1px solid #dbe4ef;
  border-radius: 6px;
  color: #334e68;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 12px;
  padding: 10px;
}

.event-log h3 {
  font-size: 13px;
  margin-bottom: 4px;
}

.event-log p {
  color: #56718a;
  font-size: 12px;
  margin: 0;
}

.event-log button {
  background: #ffffff;
  border: 1px solid #d4dfeb;
  border-radius: 4px;
  color: #25445f;
  cursor: pointer;
  font-size: 13px;
  padding: 6px 10px;
}

.event-log pre {
  grid-column: 1 / -1;
  max-height: 120px;
  min-height: 64px;
}

.code-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.code-panel {
  min-width: 0;
}

.code-panel h3 {
  color: #486178;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

pre {
  background: #102033;
  border-radius: 4px;
  color: #dcecff;
  font-family: Consolas, Monaco, monospace;
  font-size: 11px;
  line-height: 1.45;
  margin: 0;
  max-height: 240px;
  min-height: 126px;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 900px) {
  .example-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .code-grid {
    grid-template-columns: 1fr;
  }
}
