/* ===== Wrapper ===== */
#tg-toc-wrapper {
  position: fixed;
  top: var(--tg-header-height, 79px);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  background: #c3d0c3;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  z-index: 9980;
  display: none;
}

#tg-toc-wrapper.active {
  display: block;
}

/* ===== Field Wrapper ===== */
.tg-toc-field {
  position: relative;
}

/* ===== Select ===== */
#tg-toc-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  width: 100%;
  padding: 12px 42px 12px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #1f2f2a;

  background: #ffffff;
  border: 1.5px solid #0f3d2e;
  border-radius: 10px;
  cursor: pointer;

  transition: all 0.25s ease;
}

/* Hover & Focus */
#tg-toc-select:hover {
  border-color: #0f3d2e;
}

#tg-toc-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 61, 46, 0.18);
}

/* ===== Arrow ===== */
.tg-arrow {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 10px;
  height: 10px;
  border-right: 2px solid #0f3d2e;
  border-bottom: 2px solid #0f3d2e;
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}

/* ===== Options ===== */
#tg-toc-select option {
  font-size: 14px;
  padding: 8px;
}

/* H3 indentation */
#tg-toc-select option.h3 {
  padding-right: 20px;
  color: #4a5f58;
  font-weight: 400;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  #tg-toc-wrapper {
    max-width: 100%;
    padding: 8px 12px;
  }

  #tg-toc-select {
    font-size: 13px;
    padding: 11px 40px 11px 12px;
  }
}

/* Offset for sticky header */
article h2,
article h3 {
  scroll-margin-top: 150px;
}




/* ===== Cookie Banner ===== */
.tg-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #0f3d2e;
  color: #fff;
  padding: 14px 20px;
  text-align: center;
  z-index: 99999;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
}

.tg-cookie-banner .tg-cookie-text {
  flex: 1 1 auto;
  min-width: 200px;
}

.tg-cookie-banner button {
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.25s;
}

.tg-cookie-banner .tg-cookie-accept {
  background: #ffffff;
  color: #0f3d2e;
}

.tg-cookie-banner .tg-cookie-accept:hover {
  background: #f2f2f2;
}

.tg-cookie-banner .tg-cookie-reject {
  background: #e74c3c;
  color: #fff;
}

.tg-cookie-banner .tg-cookie-reject:hover {
  background: #c0392b;
}

@media(max-width:768px){
  .tg-cookie-banner {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}
