/*
* demo.css
* Spacing helpers of the demo pages only. No colors here: every color comes from the JFX tokens (core.css).
******************************************************************************/

.app-brand-logo.demo {
  align-items: center;
  justify-content: center;
  display: flex;
  width: 34px;
  height: 24px;
}

.app-brand-logo.demo svg {
  width: 35px;
  height: 24px;
}

.app-brand-text.demo {
  font-size: 1.375rem;
}

/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks > * {
  display: block !important;
}

.demo-inline-spacing > * {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
/* A long button label in a spaced row (ui-dropdowns "Start-aligned but end-aligned when large") wraps on a phone
   instead of pushing the page sideways */
.demo-inline-spacing > .btn-group {
  max-width: calc(100% - 0.375rem);
}
.demo-inline-spacing > .btn-group > .btn {
  white-space: normal;
}

.demo-vertical-spacing > * {
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg > * {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-lg.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl > * {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-xl.demo-only-element > :first-child {
  margin-top: 0 !important;
}

/*
* "Salin kode" panels on the demo pages
******************************************************************************/

/* A panel is a full-width row under its example, also inside the spacing helpers above */
.demo-inline-spacing > .jfx-code,
.demo-blocks > .jfx-code {
  display: block !important;
  width: 100%;
  margin-right: 0 !important;
}

/* An example laid out as a flex row (ui-badges "Dots Style") puts its panel on a line of its own */
.d-flex:has(> .jfx-code),
.d-sm-flex:has(> .jfx-code),
.navbar:has(> .jfx-code) {
  flex-wrap: wrap;
}
.d-flex > .jfx-code,
.d-sm-flex > .jfx-code,
.navbar > .jfx-code {
  flex: 0 0 100%;
}

/* A navbar that is an example on its own (ui-navbar "Example") holds its panel on a line under the bar */
.navbar > .jfx-code {
  padding: 0 var(--bs-navbar-padding-x, 1rem);
}

/* An example that is a whole card (a card holding a table) keeps the panel inside the card's padding */
.card > .jfx-code {
  margin: 0;
  padding: 0 var(--bs-card-spacer-x) var(--bs-card-spacer-y);
}

/* The display heading samples (ui-typography) keep their real size: on a phone the word "Display" at 76px is wider
   than the card, so the card scrolls sideways inside itself instead of the page */
.card:has(> .table-borderless .display-1) {
  overflow-x: auto;
}

/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
  display: flex;
  align-items: center;
  flex-direction: column;
  margin-top: 1rem;
}
.layout-demo-placeholder img {
  width: 900px;
}
.layout-demo-info {
  text-align: center;
  margin-top: 1rem;
}
