/* =========================================================
   DESMOS CALCULATOR PANEL
   ========================================================= */

.bb-desmos-panel[hidden] {
  display: none !important;
}

.bb-desmos-panel {
  position: absolute;
  top: 122px;
  left: 14px;
  width: 420px;
  height: 760px;
  z-index: 6500;

  display: flex;
  flex-direction: column;

  background: #ffffff;
  border: 1px solid #9c9c9c;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.bb-desmos-panel.is-expanded {
  width: 449px;
  height: 760px;
}

.bb-desmos-panel-head {
  position: relative;
  height: 50px;
  flex: 0 0 50px;

  display: flex;
  align-items: center;

  padding: 0 12px;
  box-sizing: border-box;

  background: #171717;
  color: #ffffff;
}


/* =========================================================
   DESMOS TOP TABS: Graphing | Scientific
   ========================================================= */

.bb-desmos-panel-tabs {
  display: inline-flex;
  align-items: stretch;
  justify-content: flex-start;

  height: 32px;
  border: 1px solid #ffffff;
  border-radius: 6px;  /*zakrivljenost uglova taba*/
  overflow: hidden;

  background: #111111;
  box-sizing: border-box;
}

.bb-desmos-tab {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  outline: 0;
  background: #111111;
  color: #ffffff;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 52px;
  padding: 0 4px;
  height: 100%;
  gap: 3px;

  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;

  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}

/* tanka podela između Graphing i Scientific */
.bb-desmos-tab + .bb-desmos-tab {
  border-left: 1px solid #2d2d2d;
}

/* aktivan tab */
.bb-desmos-tab.is-active {
  background: #ffffff;
  color: #111111;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* hover preko  taba */
.bb-desmos-tab:hover {
  background: #253b97;
  color: #ffffff;
  border: 2px solid #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.bb-desmos-tab:first-child:hover {
  border-radius: 6px 0 0 6px;
}

.bb-desmos-tab:last-child:hover {
  border-radius: 0 6px 6px 0;
}

.bb-desmos-tab:hover .bb-desmos-tab-icon {
  filter: brightness(0) invert(1);
}

.bb-desmos-tab-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;

  filter: brightness(0) invert(1);
  transition: filter 0.18s ease;
}

.bb-desmos-tab.is-active .bb-desmos-tab-icon {
  filter: none;
}

.bb-desmos-tab:not(.is-active):hover .bb-desmos-tab-icon {
  filter: brightness(0) invert(1);
}

.bb-desmos-tab-label {
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
}

.bb-desmos-panel-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bb-desmos-drag-handle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);

  display: grid;
  grid-template-columns: repeat(3, 4px);
  grid-template-rows: repeat(2, 4px);
  gap: 4px;

  border: 0;
  background: transparent;
  padding: 0;
  cursor: move;
}

.bb-desmos-drag-handle span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
  display: block;
}

.bb-desmos-panel-actions {
  margin-left: auto;
  margin-right: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}


.bb-desmos-panel-expand {
  width: 32px;
  height: 32px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 3px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;

  transition:
    background-color 0.18s ease,
    border-color 0.18s ease;
}

.bb-desmos-panel-expand:hover {
  background: #5b5b5b;
}

.bb-desmos-panel-expand.is-active {
  border-color: #ffffff;
  background: transparent;
}

.bb-desmos-panel-expand-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.bb-desmos-panel-close {
  width: 32px;
  height: 32px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  box-sizing: border-box;
}

.bb-desmos-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  background: #ffffff;
  position: relative;
}

.bb-desmos-surface {
  width: 100%;
  height: 100%;
}

.bb-desmos-surface[hidden] {
  display: none !important;
}

.bb-desmos-panel.is-scientific {
  height: 410px;
}

/* otvoren kalkulator: pitanje se pomera udesno, ali širina ostaje ista */
.bb-app.bb-desmos-open .bb-screen.bb-no-passage.is-active > .bb-question {
  transform: translateX(175px);
}
