/* Reset margin and padding for all elements in .com_phocagallery */
.com_phocagallery figure {
  margin: 0;
  padding: 0;
}

/* Hide elements with class .pg-hide */
.pg-hide {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  display: none;
}

/* Hide elements with class .ph-sr-only (screen reader only) */
.ph-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Clear floats */
.ph-cb {
  clear: both;
}

/* Align an element to the right */
.ph-right {
  float: right;
}

/* Align an element to the left */
.ph-left {
  float: left;
}

/* Add margins to .pg-detail-nav-box */
.pg-detail-nav-box {
  margin: 1em;
  margin-bottom: 2em;
}

/* Style for comment buttons */
.pg-comment-btn {
  text-decoration: none;
  border-radius: 2px;
  padding: 2px;
  border: 1px solid #f0f0f0;
  display: inline-block;
  min-width: 2em;
  text-align: center;
  margin: 1px;
}

/* Bold text for comment buttons with class .pg-b */
.pg-comment-btn.pg-b {
  font-weight: bold;
}

/* Italicize text for comment buttons with class .pg-i */
.pg-comment-btn.pg-i {
  font-style: italic;
}

/* Underline text for comment buttons with class .pg-u */
.pg-comment-btn.pg-u {
  text-decoration: underline;
}

/* Align top icons to the right */
.pg-top-icons {
  float: right;
}

/* Media query for small screens (max-width: 500px) */
@media only screen and (max-width: 500px) {
  /* Adjust font size for #phocagallery-ucp.pg-ucp-view */
  #phocagallery-ucp.pg-ucp-view {
    font-size: 9px;
  }
}

/* Styles for YouTube video containers */
.ph-pswp-video-wrapper,
.pg-ytb-full,
.pg-ytb-detail {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio for responsive videos */
  height: 0;
}

/* Style for embedded YouTube iframes */
.ph-pswp-video-wrapper iframe,
.pg-ytb-full iframe,
.pg-ytb-detail iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}