// 3. Load the rest of Bulma
@use "bulma/sass" with (
  $primary: #3257dc,
  $info: #128ddf,
  $warning: rgb(255, 183, 15),
  $success: #0d903b,
  $danger: #bf1f13,
  $pre-padding: 0.5rem,
  $control-size: 0.85rem,
  $body-line-height: 1.5,
  $navbar-breakpoint: 1px, // Disable Bulma navbar responsiveness
);

// 4. Your Prism Fix (The alignment fix)
.code-cell-wrapper {
  .token {
    display: inline !important;
    vertical-align: baseline !important;
    background: transparent !important;
    padding: 0 !important;
  }
}

pre[class*="language-"] {
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
}

// .output-zone {
//   border-top: 1px solid var(--bulma-border);
// }

.explanation-body {
  // Resets the bottom margin for all Bulma 'block' elements inside
  --bulma-block-spacing: 0;
}

[v-cloak] {
  display: none;
}

// Hide button text on narrow screens, show only icons
@media screen and (max-width: 1000px) {
  .app-toolbar .button span:not(.icon) {
    display: none !important;
  }
  .app-toolbar .button {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    justify-content: center;
  }
  .app-toolbar .button .icon {
    margin: 0 !important;
  }
}

// Explanation toolbar strip under rendered output
.explanation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
}

.explanation-toolbar .toolbar-right {
  display: flex;
  gap: 0.5rem;
}

.explanation-toolbar .toolbar-right .button {
  @media (max-width: 900px) {
    span:not(.icon) {
      display: none !important;
    }
    span.icon {
      margin: 0 !important;
    }
  } 
}

.explanation-toolbar .toolbar-left .run-button {
  @media (max-width: 900px) {
    span:not(.icon) {
      display: none !important;
    }
    span.icon {
      margin: 0 !important;
    }
  } 
}

// Muted utility for subtle buttons
.is-muted {
  opacity: 0.6;
}

/* Add scroll margin to cells so they don't hide under the navbar when scrolling */
.notebook-cell {
  scroll-margin-top: 1rem;
}

/* Insert cell button hover zone */
.cell-insert-zone {
  position: relative;
  height: 16px;
  margin: 4px 0;
}

.cell-insert-buttons {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.show-cell-insert-zone .cell-insert-buttons {
  opacity: 1;
  pointer-events: auto;
}

.cell-insert-zone:hover .cell-insert-buttons {
  opacity: 1;
  pointer-events: auto;
}

/* Style for pandas dataframes */

.dataframe {
  @extend .table, .is-narrow, .is-striped, .is-size-7;
}

.cell-label {
  font-size: 0.85rem;
  color: #777;
  padding-left: 0.5rem;
  margin-bottom: -0.2rem;
  margin-top: -0.75rem;
  user-select: none;
  position: relative;
  z-index: 1;
}

.button .bx {
  font-size: 1.05rem; /* adjust as needed */
}

.button.is-small .bx {
  font-size: 1rem; /* adjust as needed */
}
