/* Fix for Buy Me a Coffee widget on mobile */
.bmc-container, .bmc-container-fixed {
  position: fixed !important;
  max-width: 95vw !important;
  max-height: 95vh !important;
  overflow: auto !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  z-index: 999999 !important;
  pointer-events: auto !important;
  display: none !important; /* Hide until explicitly shown */
}

/* Only show the container when it's active */
.bmc-container.active, .bmc-container-fixed.active {
  display: block !important;
}

/* Fix for the Buy Me a Coffee button */
#bmc-wbtn {
  z-index: 9999 !important;
  pointer-events: auto !important;
  position: fixed !important;
}

/* Remove any invisible barriers */
body > div:not(#root):not([class]):not([id]) {
  display: none !important;
}

/* Ensure the iframe is responsive */
iframe#bmc-iframe {
  max-width: 100% !important;
  max-height: 80vh !important;
  transform: scale(0.95) !important;
}

/* Make sure the widget container doesn't overflow */
.bmc-container > div, .bmc-container-fixed > div {
  max-width: 100% !important;
  max-height: 100% !important;
  overflow: auto !important;
}

/* Fix for mobile screens */
@media (max-width: 768px) {
  .bmc-container, .bmc-container-fixed {
    width: 90vw !important;
    height: auto !important;
  }
  
  iframe#bmc-iframe {
    width: 100% !important;
    height: auto !important;
    min-height: 400px !important;
    transform: scale(0.9) !important;
  }
}
