/* =========================================================
   6. DIRECTIONS OVERLAY PANEL
   ========================================================= */

.bb-directions-panel {
  position: absolute;
  z-index: 1000;

  top: 148px;
  left: 50%;
  transform: translateX(-50%);

  width: 1140px;
  height: 620px;

  background: #fff;
  border: 1px solid #d4d4d4;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
  box-sizing: border-box;
}

.bb-directions-panel-inner {
  display: grid;
  grid-template-rows: 1fr 82px;
  height: 100%;
}

.bb-directions-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 48px 48px 24px 48px;
  box-sizing: border-box;
}

.bb-panel-inner {
  max-width: 940px;
  font-size: 20px;
  line-height: 1.55;
  color: #111;
}

.bb-panel-inner p {
  margin: 0 0 18px 0;
}

.bb-panel-inner ul {
  margin: 0 0 24px 28px;
}

.bb-panel-inner li {
  margin-bottom: 10px;
}

.bb-directions-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 46px 24px 46px;
  box-sizing: border-box;
}

.bb-directions-close {
  min-width: 124px;
  padding: 14px 28px;

  background: #f4d400;
  border: 1.5px solid #a58b00;
  border-radius: 999px;

  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

/* =========================================================
   7. DIRECTIONS CONTENT TABLES / EXAMPLES
   ========================================================= */

.bb-example-title {
  margin: 30px 0 12px 0;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
}

.bb-example-table {
  width: 80%;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: 19px;
}

.bb-example-table th,
.bb-example-table td {
  border: 1px solid #777;
  padding: 16px 18px;
  vertical-align: top;
}

.bb-example-table th {
  background: #f6f6f6;
  text-align: center;
  font-weight: 600;
}

.bb-answer {
  text-align: center;
  font-size: 24px;
}

.bb-directions-content table {
  width: 72%;
  margin: 24px auto;
  border-collapse: collapse;
  font-size: 16px;
}

.bb-directions-content th,
.bb-directions-content td {
  border: 1px solid #777;
  padding: 14px 16px;
  text-align: center;
  vertical-align: middle;
}

.bb-directions-content th {
  font-weight: 600;
}

.bb-directions-content caption {
  caption-side: top;
  text-align: center;
  font-weight: 600;
  margin-bottom: 10px;
}

.bb-directions-content h3 {
  margin: 26px 0 12px 0;
  text-align: center;
  font-size: 20px;
}

/* =========================================================
   MATH DIRECTIONS PANEL
   Font sizes and table styling
   ========================================================= */

:root {
  --bb-math-dir-text: 24px;
  --bb-math-dir-list: 24px;
  --bb-math-dir-examples: 24px;
  --bb-math-dir-table-head: 24px;
  --bb-math-dir-table-text: 19px;
  --bb-math-dir-answer: 19px;
  --bb-math-dir-chip: 19px;
}

.bb-directions-content {
  font-size: var(--bb-math-dir-text);   /* glavni tekst panela */
  line-height: 1.55;
}

.bb-math-directions-list {
  margin: 0 0 18px 22px;
  padding: 0;
  font-size: var(--bb-math-dir-list);   /* nabrajanje */
  line-height: 1.55;
}

.bb-math-directions-list li {
  margin: 0 0 10px 0;
}

.bb-math-directions-examples-title {
  text-align: center;
  font-size: var(--bb-math-dir-examples);   /* naslov "Examples" */
  font-weight: 500;
  margin: 18px 0 12px 0;
}

.bb-math-directions-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: var(--bb-math-dir-table-text);   /* osnovna veličina teksta u tabeli */
}

.bb-math-directions-table th,
.bb-math-directions-table td {
  border: 1px solid #777;
  padding: 14px 10px;
  vertical-align: middle;
  text-align: center;
}

.bb-math-directions-table th {
  font-size: var(--bb-math-dir-table-head);      /* header tabele */
  font-weight: 400;
  line-height: 1.35;
}

.bb-math-directions-table td {
  font-size: var(--bb-math-dir-table-text);   /* tekst u ćelijama */
  line-height: 1.4;
}

.bb-math-answer-main {
  font-size: var(--bb-math-dir-answer);    /* leva kolona: Answer */
  font-weight: 500;
}

.bb-math-chip-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.bb-math-chip {
  display: inline-block;
  background: #f1f1f1;
  padding: 3px 8px;
  border-radius: 2px;
  line-height: 1.2;
  font-size: var(--bb-math-dir-chip);   /* tekst unutar malih sivih polja */
  white-space: nowrap;
}
