/* Prevent zoom-in on iPhone when selecting various input elements */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    select,
    textarea,
    input {
        font-size: 16px;
    }
}

/* Fixes zoom-in issues on iPhone when pressing the "Create post" box */
#whats-new-textarea * {
    font-size: 16px;
}

a.button.bostad-share {
    color: black !important;
    font-weight: 600 !important;
}

a.button.bostad-share:hover {
    color: black !important;
    background-color: var(--bostad-brand, #4831b0) !important;
}

a.button.bostad-share:hover::before {
    color: white !important;
}

a.button.bostad-share::before {
    font-family: "bb-icons", serif;
    content: '\ee3e'; /* bb-icon-corner-right */
    color: black;
    position: relative;
    bottom: 2px; /* Lift up the icon */
    font-weight: 400; /* Important */
}

#trim-video-popup > .modal-wrapper {
    max-width: 100%;
    margin: 0;
    width: 100%;
}

#share-activity-popup header {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #d2d4d6;
    margin-bottom: 0;
}
#share-activity-popup header h3 {
    font-size: 24px;
    font-weight: 500;
}

#share-activity-popup header .bb-model-close-button {
    margin-left: auto;
    line-height: 1;
    color: #939597;
}

#share-activity-popup .activity-avatar {
    float: left;
}

#share-activity-popup .activity-avatar img {
    width: 50px;
    height: auto;
}

/* A post in a group has the picture of the author in another place */
#share-activity-popup .author-avatar img {
    width: 50px;
    height: auto;
}

#share-activity-popup .content {
    margin-top: 20px;
    margin-bottom: 20px;
}

#share-activity-popup footer {
    display: flex;
    justify-content: space-between;
    background-color: #eaeaea;
    border-top: 1px solid #eee;
    padding: 17px 30px 16px;
    margin: 0 -30px -30px;
}

#share-activity-popup footer .share-activity-submit-wrapper {
    background: var(--bostad-brand, #4831b0) !important;
    color: white !important;
    font-size: 14px;
    line-height: 1;
}

#share-activity-popup footer .share-activity-submit {
    padding: 0.3em 0.7em;
    border-color: #ccc;
    border-style: solid;
    border-width: 1px;
    text-align: center;
    text-decoration: none;
    width: auto;
}

#share-activity-popup footer .share-activity-submit:hover {
    cursor: pointer !important;
}

#share-activity-popup .activity-header-wrapper {
    display: flex;
    align-items: center;
}

/* Nested activities except the first */
.activity-item:not(.inlined) .nested-activity,
.nested-activity .nested-activity {
    border: 1px solid #e3e3e3;
    border-radius: 5px;
    box-shadow: 2px 2px 2px #e3e3e3;
    margin-bottom: 20px;
    margin-left: 10px;
    margin-right: 10px;
}

.nested-activity .nested-activity .activity-avatar img,
.activity-content .nested-activity .activity-avatar img {
    width: 40px !important;
    height: auto;
}

.nested-activity .nested-activity .activity-header {
    height: 40px;
    display: flex;
    align-items: center;
}

/* The name in a post inside a shared post stands in the middle of the
   picture, the same as the name in a post of its own. The content of the
   post has 10 pixels of padding, the header of the theme does not. */
.activity-list .activity-item .nested-activity .activity-header:not(.activity-header--group) {
    padding-top: 14px;
}

.missing-child, .hidden-post {
    margin: 20px;
    background-color: #f7f7f7;
    padding: 10px 10px 10px 20px;
    font-size: 15px;
    color: #6c6262;
}

.inlined-activity-banner {
    padding-top: 14px;
    padding-bottom: 7px;
    padding-left: 20px;
    color: gray;
    font-weight: 500;
}

.inlined-activity-banner > p {
    margin-top: 0;
    margin-bottom: 0;
}

.inlined-activity-banner > p > a:nth-child(1) {
    color: inherit !important;
    font-weight: inherit;
}

.inlined-activity-banner > p > a.activity-time-since::before {
    content: "\00b7 ";
    display: inline-block;
    margin-right: 3px;
    vertical-align: middle;
    color: #939597;
    font-weight: 500;
}

.inlined-activity-banner > p::before {
    font-family: "bb-icons", serif;
    content: '\ee3e'; /* bb-icon-corner-right */
    position: relative;
    bottom: 2px; /* Lift up the icon */
    margin-right: 4px;
    font-weight: 400; /* Important */
}

.inlined-activity-banner > p > .activity-time-since > .time-since {
    color: #939597;
    font-weight: 500;
    font-size: 13px;
}

/* Make the download link (for pictures) appear as a floating button, always on top */
.activity-content.media-activity-wrap .download-media {
    position: fixed !important; /* Default is absolute */
    left: auto !important;
    right: 10px !important;
    width: 100px !important;
    bottom: 10px !important;
    border: 2px solid #eae1e1 !important;
    border-radius: 5px;
}

/* Video buttons */
div.video-js div.vjs-control-bar button.vjs-control span.vjs-icon-placeholder {
    color: white; /* Make the video buttons white */
}

/* ------ Video trim CSS ------ */

#trim-video-popup > button.mfp-close {
    font-size: 4em;
    margin: 10px;
}

.video-trim-loading {
    display: flex;
    flex-direction: column;
    text-align: center;
    height: 100%;
    justify-content: center;
    font-size: 25px;
}

.video-trim-vue-root {
   height: 100%; /* Fill the entire screen */
}

.video-trim-error {
    display: flex;
    flex-direction: column;
    text-align: center;
    row-gap: 20px;
    height: 100%;
    justify-content: center;
}

.video-trim-error h1 {
    font-size: 25px;
}

.video-trim-error button {
    padding: 10px;
    border: 2px solid blue;
    cursor: pointer;
}

/* ------ Video trim CSS ------ */


/* Fix size for the 3rd image in activity galleries on mobile */
@media screen and (max-width: 544px) {
    html body .bb-activity-media-wrap.bb-media-length-3 .act-grid-1-1.bb-vertical-layout ~ .bb-activity-media-elem {
        position: relative; /* Originally absolute */
    }
}

/* "View more comments" link: add breathing room so it lines up with the
   comment items below, and visually move it underneath the loaded
   comments list. Done with flex order so the DOM stays untouched —
   keeps the link, click handler, and accessibility tree intact for
   BuddyBoss upgrades. Scoped so it does not override BuddyBoss's
   deliberate `display: none` for the link inside the activity modal
   and media info section.

   The left margin is the picture of the author (60px) and the step
   next to it (10px). The theme has the same two numbers, so the link
   stands where the grey box of a comment stands. */
.buddypress-wrap .activity-comments {
    display: flex;
    flex-direction: column;
}
.buddypress-wrap .activity-comments > ul {
    order: 1;
}
.buddypress-wrap .activity-comments > .view-more-comments {
    order: 2;
    align-self: flex-start;
    display: inline-block;
    padding: 10px 25px 10px 70px;
}
.buddypress-wrap .activity-comments > .ac-form {
    order: 3;
}

/* Keep BuddyBoss's design intact: the link is hidden inside the activity
   modal and media-info section. Without this rule our higher-specificity
   selector above would re-show it. */
.bb-activity-model-wrapper .view-more-comments {
    display: none !important;
}
.bb-media-info-section .activity-comments > .view-more-comments {
    display: none !important;
}
