/* Sticky Bar Styling */
#sticky-wrapper {
  position: fixed;
  bottom: 0;
  right: 20px;
  z-index: 1000;
  width: min(350px, 100%);
  background-color: var(--ast-global-color-0);
  color: white;
  border-radius: 10px 10px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  padding: 5px;
  box-shadow: 0 4px 8px -2px #00000030;
}

/* Sticky Bar Links */
#sticky-wrapper a {
  padding: 0.25rem;
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  line-height: 1.5;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

#sticky-wrapper a i {
  font-size: 17px;
  display: block;
}

#sticky-wrapper a:hover {
  background-color: rgba(0, 0, 0, 0.2);
}

/* Popup Box Styling */
.popup-box {
  display: none; /* Hidden by default */
  position: fixed;
  bottom: 70px;
  right: 20px;
  width: 350px;
  max-height: 100vh;
  background-color: var(--ast-global-color-7);
  border-radius: 8px;
  border: 3px solid var(--ast-global-color-0);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  padding: 20px;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  box-sizing: border-box; /* Prevent content from overflowing */
}

/* Popup Title */
.popup-box .popup-title {
  margin: 15px 0 5px 10px; /* Reduced bottom margin for closer spacing */
  font-size: 20px;
  font-weight: bold;
}

/* Popup Description */
.popup-box .popup-description {
  margin: 0 0 -40px 10px;
  font-size: 14px;
}

/* Popup Close Button */
.popup-box .close-popup-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 30px;
  cursor: pointer;
  color: #000;
  line-height: 1;
}

/* Responsive Styling */
@media (max-width: 768px) {
  /* Center Popup on Mobile */
  .popup-box {
    position: fixed !important;
    bottom: 70px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: 90% !important;
    max-width: 350px !important;
    margin: 0 !important;
  }

  /* Center Sticky Bar on Mobile */
  #sticky-wrapper {
    position: fixed !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 90% !important;
    margin: 0 !important;
  }
}

/* Animation for Popups */
.popup-box {
  animation: fadeIn 0.5s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
