.page-content {
  margin-bottom: 1rem !important;
}

.visualeditor-container {
  background-color: var(--gin-bg-app);
  margin: 0px;
}

.nodehive-preview {
  margin: 0 auto;
  background-color: var(--gin-bg-app, #f0f0f0);
  text-align: center;
  display: flex;
  width:100%;
}

.nodehive-preview .visualeditor-content-sidebar {
  background-color: var(--gin-bg-layer, #fff);
  border-right: 1px solid var(--gin-border-color-secondary);
  min-width: 400px;
  max-width: 400px;
  overflow-y: auto;
  max-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
}

.nodehive-preview .visualeditor-content-sidebar > form,
.nodehive-preview .visualeditor-content-sidebar > div {
  padding: 1rem 1.25rem;
  flex: 1;
  overflow-y: auto;
}

.nodehive-preview .visualeditor-content-sidebar select {
  width: 100%;
}

.nodehive-preview iframe {
  transition: all 0.3s;
  width: 100%;
  height: calc(100vh - 330px);
  overflow: scroll;
  border: 0;
  background-color: white;
  padding: 0;
  border-radius: 0 0 8px 8px;
}

.nodehive-preview .visualeditor {
  display: flex;
  gap: 20px;
  width: 100%;
}

.nodehive-preview .visualeditor .visualeditor-preview {
  width: 100%;
  padding: 15px 15px 0 15px;
}

/* Browser chrome wrapper */
.visualeditor-browser-chrome {
  border-radius: 10px;
  overflow: hidden;
  background: #2b2b2b;
  height: 100%;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  margin: 0 auto;
  transition: max-width 0.3s;
}

/* Address bar */
.visualeditor-addressbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: #3a3a3a;
}

.visualeditor-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.visualeditor-dots span {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.visualeditor-url {
  flex: 1;
  background: #2b2b2b;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* off canvas dialog override */
.visualeditor-off-canvas .ui-dialog-titlebar {
  display: none;
}

.visualeditor-off-canvas #drupal-off-canvas-wrapper {
  background: none;
  background-color: none;
}

.visualeditor-off-canvas #drupal-off-canvas {
  padding-top: 10px;
  background: none;
  background-color: none;
}

.visualeditor-off-canvas #drupal-off-canvas hr {
  margin: 1em;
  margin-left: 0;
}

.visualeditor-off-canvas #drupal-off-canvas .field-group-tabs-wrapper {
  padding-top: 10px;
}

.visualeditor-off-canvas #drupal-off-canvas .form-item__description {
  display: none;
}

.visualeditor-off-canvas #drupal-off-canvas .layout-node-form__actions {
  display: block;
}

.visualeditor-off-canvas #drupal-off-canvas .meta-sidebar__trigger {
  display: none;
}

.visualeditor-off-canvas #drupal-off-canvas .composable-breadcrumbs {
  margin-left: 0;
  font-size: small;
}

.visualeditor-off-canvas #drupal-off-canvas .composable-breadcrumbs li {
  display: inline;
  list-style: none;
  font-size: small;
}

.visualeditor-off-canvas
  #drupal-off-canvas-wrapper
  .js-media-library-item.media-library-item.media-library-item--grid {
  width: 100%;
}


/* Toolbar */
.visualeditor-toolbar {
  background-color: var(--gin-bg-layer);
  border-bottom: 1px solid var(--gin-border-color-secondary);
  height: 56px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  gap: 1rem;
}

.visualeditor-toolbar__left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.visualeditor-toolbar__center {
  display: flex;
  align-items: center;
}

.visualeditor-toolbar__right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Sidebar toggle button */
.sidebar-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: transparent;
  color: var(--gin-color-text);
  border: 1px solid var(--gin-border-color, #d1d5db);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.15s;
}

.sidebar-toggle:hover {
  background-color: var(--gin-bg-layer2, #f3f4f6);
}

.sidebar-toggle:active {
  transform: scale(0.98);
}

.sidebar-toggle svg {
  flex-shrink: 0;
}

/* Space indicator */
.visualeditor-toolbar__space {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--gin-color-text);
}

.visualeditor-toolbar__space-label {
  color: var(--gin-color-text-light, #6b7280);
}

.visualeditor-toolbar__space-name {
  font-weight: 600;
}

/* Viewport buttons */
.viewport-buttons {
  display: flex;
  background: var(--gin-bg-layer2, #f3f4f6);
  border-radius: 6px;
  padding: 2px;
}

.resize-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: transparent;
  border: none;
  border-radius: 4px;
  color: var(--gin-color-text-light, #6b7280);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.resize-button:hover {
  background-color: var(--gin-bg-layer, #fff);
  color: var(--gin-color-primary);
}

.resize-button.is-active {
  background-color: var(--gin-bg-layer, #fff);
  color: var(--gin-color-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.resize-button svg {
  width: 18px;
  height: 18px;
}

/* Toolbar buttons */
.toolbar-button {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s;
  text-decoration: none;
}

.toolbar-button--secondary {
  background-color: transparent;
  border: 1px solid var(--gin-border-color, #d1d5db);
  color: var(--gin-color-text);
}

.toolbar-button--secondary:hover {
  background-color: var(--gin-bg-layer2, #f3f4f6);
  text-decoration: none;
}

#drupal-off-canvas {
  padding: 15px;
  padding-bottom: 90px;
}

#drupal-off-canvas .horizontal-tabs {

}

#drupal-off-canvas .horizontal-tabs ul.horizontal-tabs-list {
  padding: 18px 22px !important;
}


#drupal-off-canvas .horizontal-tabs ul.horizontal-tabs-list::after {
  border: 0;
}



#drupal-off-canvas .form-actions {
  position: absolute;
  bottom: 0;
  z-index: 1000;
  width: 100%;
  padding: 20px;
  background-color: #f9f9f9
}

#drupal-off-canvas-wrapper .ui-dialog-titlebar {
  background-color: var(--gin-offcanvas-active) !important;
}



#drupal-off-canvas2 .js-media-library-item.media-library-item.media-library-item--grid {
  width: 100%;
}

.gin-utility-margin-small {
  margin-block: var(--space-s);
  margin-inline: 0 var(--space-xs);
}

.gin-utility-margin-0 {
  margin: 0;
  margin-block: 0;
  margin-inline: 0;
}

.gin-utility-text-xs {
  font-size: var(--font-size-xs);
  line-height: calc(17rem / 16);
}

.gin-w-6 {
  width: 24px;
}
.gin-h-6 {
  height: 24px;
}

.gin-w-12 {
  width: 48px;
}
.gin-h-12 {
  height: 48px;
}

.gin-utility-flex {
  display: flex;
}

.gin-utility-gap-2 {
  gap: var(--space-xs);
}

ul.gin-utility-list-none {
  list-style: none;
  list-style-type: none;
}

/* Sidebar hidden state */
.nodehive-preview .visualeditor-content-sidebar[style*="display: none"] + .visualeditor .visualeditor-preview {
  padding-left: 1rem;
}

.sidebar-toggle.is-active {
  background-color: var(--gin-bg-layer2, #f3f4f6);
  border-color: var(--gin-color-primary, #2563eb);
  color: var(--gin-color-primary, #2563eb);
}
