/* Prevent scroll on body when popup is open */
body.no-scroll {
  overflow: hidden !important;
}

/* Ensure popup layout is centered and has fixed positioning */
.profile-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  font-family: 'Poppins', sans-serif;
  overflow: hidden; /* Prevent background scroll */
}

/* Show the popup when active */
.profile-modal.active {
  display: block;
}

/* Overlay background for the popup */
.profile-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9998; /* Positioned below popup */
}

/* Popup content styling */
.profile-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 650px;
  width: 100%;
  background: linear-gradient(135deg, #111, #1a1a1a);
  border-radius: 18px;
  padding: 20px; /* Adjusted for inner content */
}

/* Allow scrolling inside the popup but prevent affecting page scroll */
.popup-content {
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;

  /* Hide scrollbar but keep scrolling functionality */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.popup-content::-webkit-scrollbar {
  display: none;
}

/* Close button positioning inside the popup */
.profile-close {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 24px;
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  z-index: 10;
}

/* Layout for the profile content */
.profile-layout {
  display: grid;
  grid-template-columns: 40% 60%;
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  padding: 20px;
  color: #ddd;
}

.profile-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  font-size: 13px;
  margin-bottom: 10px;
}

.profile-info h3 {
  font-size: 28px;
  margin: 0;
  color: #fff;
}

.profile-info h5 {
  margin: 10px 0 20px;
  color: #ffd700;
}

.profile-info p {
  font-size: 14px;
}

.profile-quote {
  margin-top: 20px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 10px;
}

.quote-icon {
  color: #ffd700;
  font-size: 28px;
}

.profile-actions {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.btn-outline {
  padding: 8px 26px;
  background: #000;
  border: 1px solid #ffd700;
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
}

.btn-primary {
  padding: 8px 26px;
  background: #ffd700;
  color: #000;
  border-radius: 10px;
  text-decoration: none;
}

/* Ensure Elementor doesn't block scroll */
.elementor,
.elementor-section,
.elementor-container,
.elementor-column,
.elementor-widget-wrap {
  overflow: visible !important;
}

/* Fix chat container overflow */
.bpWebchat {
  overflow: hidden !important;
  position: relative !important;
  z-index: 999999 !important;
}

.bpWebchat iframe {
  pointer-events: auto !important;
}

/* Ensure buttons are arranged properly */
#pum-23797 .uagb-block-466fac48 .uagb-buttons__outer-wrap {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
}

/* Prevent buttons from stretching */
#pum-23797 .uagb-block-466fac48 .uagb-button__wrapper {
  width: auto !important;
}

/* Style buttons */
#pum-23797 .uagb-block-466fac48 .uagb-buttons__outer-wrap a {
  border-radius: 20px !important;
  padding: 8px 18px !important;
}

.ast-scroll-to-top-right {
  right: 40px !important;
  bottom: 120px !important;
}