html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.tree-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tree-breadcrumb-item {
  border: 1px solid #dee2e6;
  background: #f8f9fa;
  border-radius: 999px;
  padding: 0.15rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.node-level {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.node-level-empty {
  margin: 0;
}

.node-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 220px;
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  cursor: pointer;
  text-align: center;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.node-card:hover {
  border-color: #258cfb;
}

.node-card.active {
  border-color: #258cfb;
  box-shadow: 0 0 0 0.15rem rgba(37, 140, 251, 0.25);
}

.node-card.node-card-image {
  width: calc(50% - 0.5rem);
  max-width: 480px;
}

.node-card-image-wrap {
  position: relative;
  width: 100%;
}

.node-card-image img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: 0.375rem;
}

@media (max-width: 700px) {
  .node-card.node-card-image {
    width: 100%;
    max-width: 100%;
  }
}

.node-card-zoom {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.node-card-zoom:hover {
  background: rgba(0, 0, 0, 0.8);
}

.node-card-text {
  width: auto;
  min-width: 100px;
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
}

.node-card-name {
  font-size: 0.9rem;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  padding: 2rem;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 90vw;
}

#lightbox-img {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 0.25rem;
}

.lightbox-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.lightbox-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 0.375rem;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.7;
}

.lightbox-thumb:hover {
  opacity: 1;
}

.lightbox-thumb.active {
  border-color: #258cfb;
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}