.tp-demo {
  margin: 1.25rem 0 2rem;
  border: 1px solid #c9d1d9;
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
}

.tp-demo-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  border-bottom: 1px solid #c9d1d9;
  background: #eef2f6;
}

.tp-demo-tabs {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tp-demo-tabs button {
  min-height: 2.75rem;
  padding: 0.55rem 0.4rem;
  border: 0;
  border-right: 1px solid #c9d1d9;
  border-radius: 0;
  background: transparent;
  color: #3d4651;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tp-demo-tabs button:hover {
  background: #e1e7ed;
}

.tp-demo-tabs button[aria-selected="true"] {
  background: #ffffff;
  color: #0969da;
  box-shadow: inset 0 -3px #0969da;
}

.tp-demo-open,
.tp-demo-new {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 0.85rem;
  color: #0969da;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.tp-demo-open:hover,
.tp-demo-new:hover {
  text-decoration: underline;
}

.tp-demo-filebar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid #d8dee4;
}

.tp-demo-filebar label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.tp-demo-filebar span {
  color: #57606a;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
}

.tp-demo-filebar select {
  height: 2rem;
  padding: 0 1.8rem 0 0.55rem;
  border: 1px solid #afb8c1;
  border-radius: 4px;
  background: #ffffff;
  color: #24292f;
  font: inherit;
}

.tp-demo-path {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #57606a;
  font-size: 0.86rem;
}

.tp-demo-frame {
  height: min(72vh, 48rem);
  min-height: 38rem;
  background: #f6f8fa;
}

.tp-demo-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.tp-demo-note {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-top: 1px solid #d8dee4;
  color: #57606a;
  font-size: 0.82rem;
}

@media (max-width: 760px) {
  .tp-demo-toolbar {
    display: block;
  }

  .tp-demo-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tp-demo-tabs button {
    border-bottom: 1px solid #c9d1d9;
  }

  .tp-demo-open,
  .tp-demo-new {
    min-height: 2.5rem;
  }

  .tp-demo-filebar {
    display: grid;
    gap: 0.45rem;
  }

  .tp-demo-frame {
    height: 46rem;
    min-height: 0;
  }
}
