/* ==== [SHORTCODE: via_spatt] ==== */

/* Nút mở bảng thông số */
.via-spatt__show-btn {
  cursor: pointer;
  width: fit-content;
  background: transparent;
  color: var(--via-primary-hover);
  border: none;
  border-radius: 6px;
  font: inherit;
  padding: 0;
}
.via-spatt__show-btn:hover {
  text-decoration: underline;
}

/* Lớp phủ overlay */
.via-spatt__overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  z-index: 999;

  /* trạng thái ẩn */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Nội dung popup */
.via-spatt__content {
  position: relative;
  background: #fff;
  width: 60vw;
  max-width: 900px;
  max-height: 70vh;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(200, 200, 200, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;

  opacity: 0;
  transform: translateY(-15px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Khi overlay bật */
.via-spatt__overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.via-spatt__overlay.active .via-spatt__content {
  opacity: 1;
  transform: translateY(0);
}

/* Thanh tiêu đề + nút đóng */
.via-spatt__title-bar {
  background-color: #f8f8f8;
  padding: 12px 16px;
  border-bottom: 1px solid var(--via-border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.via-spatt__title-bar strong {
  font-size: 16px;
}
.via-spatt__close-btn {
  background: var(--via-primary-color);
  color: #fff !important;
  border-radius: 6px;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
}
.via-spatt__close-btn:hover {
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

/* Nội dung cuộn */
.via-spatt__scroll {
  padding: 16px;
  overflow-y: auto;
  flex-grow: 1;
}

/* Khóa scroll body khi popup mở */
body.no-scroll {
  overflow: hidden;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .via-spatt__content {
    width: 95vw;
    max-height: 80vh;
  }
}