/* Container where random-cat.php is embedded */
.cat-card {
  position: relative;
  overflow: visible; /* Ensure tooltip can extend outside this block */
}

/* Wrapper for image + tooltip */
.cat-image-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
  width: 100%;
  text-align: center;
}

/* Responsive cat image styling */
#catImage {
  width: 100%;
  height: auto;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  display: block;
  margin: 0 auto;
}

/* Tooltip that appears above the image */
.cat-tooltip {
  visibility: hidden;
  width: 280px;
  background-color: rgba(0, 0, 0, 0.85);
  color: #fff;
  text-align: left;
  padding: 8px;
  border-radius: 6px;
  position: absolute;
  z-index: 10;
  bottom: 100%; /* position above the image */
  left: 50%;
  margin-left: -140px; /* center horizontally */
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Tooltip becomes visible on hover */
.cat-image-wrapper:hover .cat-tooltip {
  visibility: visible;
  opacity: 1;
}

/* Tooltip responsiveness for small screens */
@media (max-width: 600px) {
  .cat-tooltip {
    width: 90%;
    margin-left: -45%;
    font-size: 0.8rem;
  }
}
