/*
 Theme Name: BuddyX Child
 Template: buddyx
 Author: Your Name
 Description: A child theme for BuddyX
 Version: 1.0
*/
/* Ensure video fits inside the activity post box */
/* Ensure video stays inside the activity post box */
/* Ensure activity post videos fit inside the post box */
.bp-activity-content video {
    max-width: 100% !important; /* Fits within the container */
    width: 100% !important; /* Full width */
    max-height: 350px !important; /* Adjust max height as needed */
    height: auto !important;
    display: block !important;
    margin: auto !important;
    object-fit: contain !important; /* Prevents cropping */
}

/* Ensure activity post images fit inside the post box */
.bp-activity-content img {
    max-width: 100% !important; /* Fits within the container */
    width: auto !important; /* Maintain aspect ratio */
    height: auto !important;
    display: block !important;
    margin: auto !important;
    border-radius: 8px; /* Optional: rounded corners */
}

/* Ensure the post box itself is correctly sized */
.bp-activity-content {
    max-width: 600px !important; /* Adjust based on theme */
    margin: auto !important;
    overflow: hidden !important;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
}
/* === BuddyPress Story Popup Mobile Fix === */
@media (max-width: 768px) {
  .bp-story-popup,
  .bp-story-modal,
  .bp-story-viewer {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: rgba(0, 0, 0, 0.95) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    overflow: hidden !important;
    z-index: 999999 !important;
  }

  .bp-story-popup video,
  .bp-story-modal video,
  .bp-story-viewer video {
    width: 100% !important;
    height: auto !important;
    max-height: 90vh !important;
    object-fit: contain !important;
    border-radius: 8px !important;
  }

  .bp-story-close-btn,
  .bp-story-popup .close,
  .bp-story-modal .close {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    color: #fff !important;
    font-size: 28px !important;
    background: transparent !important;
    z-index: 1000000 !important;
  }
}
/* === Force-center BuddyPress Story Popup on mobile === */
@media (max-width: 768px) {
  .bp-story-popup,
  .bp-story-modal,
  .bp-story-viewer {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.95) !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 999999 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .bp-story-popup video,
  .bp-story-modal video,
  .bp-story-viewer video {
    width: 90vw !important;
    height: auto !important;
    max-height: 90vh !important;
    object-fit: contain !important;
    border-radius: 10px !important;
  }

  .bp-story-close-btn,
  .bp-story-popup .close,
  .bp-story-modal .close {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    color: #fff !important;
    font-size: 30px !important;
    background: transparent !important;
    z-index: 1000000 !important;
  }
}
/* === FIX rtMedia Videos Not Center / Not Full Width === */

/* Fix YouTube / Facebook / iframe videos */
.bp-activity-content iframe {
    width: 100% !important;
    max-width: 100% !important;
    height: 320px !important;
    display: block !important;
    margin: 10px auto !important;
    border-radius: 8px !important;
}

/* Fix rtMedia uploaded MP4 videos */
.rtmedia-video-container,
.rtmedia-media {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: auto !important;
    display: block !important;
}

/* Fix inside the rtMedia container */
.rtmedia-video-container video,
.rtmedia-media video {
    width: 100% !important;
    height: auto !important;
    max-height: 350px !important;
    object-fit: contain !important;
    display: block !important;
    margin: auto !important;
}

/* Prevent overflow on right side */
.bp-activity-content {
    overflow: hidden !important;
}