
#activity-wrap {

    & .pty-composer {

        padding: var(--padding);
        background-color: var(--header-bg);
        border-radius: var(--border-radius);
        border: 1px solid var(--border);
        box-shadow: var(--box-shadow);
        margin-bottom: var(--gap);
    }
    
    display:        flex;
    flex-direction: column;
    gap:            0;

    #activity-feed {

        display: flex;
        flex-direction: column;
        gap: var(--gap);

        & .card.activity-item {
            display: flex;
            flex-direction: column;
            gap: 0;
            padding: 0;
            /*overflow: hidden;*/
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: var(--border-radius);

            & > div { width: 100%; }

            & .card-header {
                padding: var(--padding);
                aspect-ratio: unset;
                display: flex;
                overflow: unset;

                & .avatar-meta {
                    display: flex;

                    & .avatar {
                        margin-right: var(--padding);

                        & .activity-avatar {
                            width:         var(--input-size);
                            height:        var(--input-size);
                            border-radius: var(--border-radius);
                            object-fit:    cover;
                            flex-shrink:   0;
                        }
                    }

                    & .meta {
                        margin-right: var(--padding);
                    }
                }

                & .actions {

                    & button {

                    }

                    & .dropdown-menu {

                        overflow: hidden;

                    }
                }
            }

            & .card-body {

                padding-bottom: 0px;
                /*padding: var(--gap);*/
                margin: 0px;
                display: flex;
                    align-items: center;
                    justify-content: center;

                    color: var(--header-bg);

                font-size: 24px;
                font-weight: bold;
                position: relative; /* Fixed: Allows the ::after overlay to stay inside the image area */
                background-color: var(--box-border);
                aspect-ratio: 16 / 9;
                background-size: cover;
                background-position: center;
                border-radius: 0px;

                &::after {
                    content: '';
                    background: var(--color-01);
                    position: absolute;
                    top: 0; right: 0; bottom: 0; left: 0;
                    z-index: 2;
                    opacity: .3;
                    transform: scale(.999);
                    pointer-events: none; /* Recommended: ensures clicks pass through to the image if needed */
                }

                &.avatar_updated {
                    aspect-ratio: 1 / 1;
                }

                .card[data-type="status"] & {
                    
                    padding: var(--gap);
                    aspect-ratio: unset;
                    background-color: var(--cta);

                    & * { color: var(--header-bg); }

                    &::after {
                        content: none;
                    }
                }

                .card[data-type="image"] & {
                    
                    background-color: var(--cta);

                    & * { color: var(--header-bg); }

                    &::after {
                        content: none;
                    }
                }

                .card[data-type="file"] & {
                    
                    background-color: var(--cta);

                    & * { color: var(--header-bg); }

                    &::after {
                        content: none;
                    }
                }

                .card[data-type="audio"] & {
                    
                    padding: var(--gap);
                    aspect-ratio: unset;
                    background-color: var(--cta);

                    & * { color: var(--header-bg); }

                    &::after {
                        content: none;
                    }
                }

                & .activity-content {
                    text-align: center;
                }

            }

            & .card-footer {
                padding: var(--padding);
                background-color: var(--header-bg);

                & .actions-reactions {
                    display: flex;
                    align-items: center;
                    justify-content: space-between;

                    & .actions,
                    & .reactions {
                        & button {
                            background-color: transparent;
                        }
                    }

                    & .actions {
                        display: flex;
                        gap: var(--padding);

                        & button {
                            padding: 0px var(--gap);
                            width: var(--input-size);
                            height: var(--input-size);
                            gap: 10px;
                        }
                    }

                    & .reactions {
                        position: relative; /* Fixed: Anchors the absolute tooltip to the reaction area */

                        & .reaction-who-tooltip {
                            display: none;
                            position: absolute;
                            bottom: calc(100% + 6px);
                            left: 50%;
                            transform: translateX(-50%);
                            background: var(--card-bg);
                            border: 1px solid var(--box-border);
                            border-radius: var(--border-radius);
                            box-shadow: var(--shadow);
                            padding: 4px 8px;
                            font-size: 11px;
                            white-space: nowrap;
                            z-index: 100;
                            pointer-events: none;
                        }

                        &:hover .reaction-who-tooltip {
                            display: block;
                        }
                    }
                }
            }
        }
    }
}






/*.activity-body {
    flex: 1;
    min-width: 0;
}

.activity-label {
    margin: 0 0 .2rem;
    font-size: .875rem;
    line-height: 1.4;
}

.activity-label a {
    color: var(--text);
    text-decoration: none;
}

.activity-label a:hover { color: var(--brand); }

.activity-date {
    font-size: .75rem;
    color: var(--text-muted);
}

.activity-item {
    
}

.activity-header {
    display:     flex;
    align-items: flex-start;
    gap:         .75rem;
    padding:     .85rem 1rem .5rem;
}

.activity-author {
    display:     flex;
    flex-shrink: 0;
    text-decoration: none;
}



.activity-meta {
    flex:      1;
    min-width: 0;
}

.activity-label {
    margin:      0 0 .15rem;
    font-size:   .875rem;
    line-height: 1.4;
}

.activity-date {
    font-size: .72rem;
    color:     var(--text-muted);
}

.activity-content {
    padding:     .1rem 1rem .6rem;
    font-size:   .9rem;
    line-height: 1.55;
    word-break:  break-word;
    white-space: pre-wrap;
}
.activity-media {
    width: 100%;
    line-height: 0;
}

.activity-media-img {
    width:      100%;
    max-height: 420px;
    object-fit: cover;
    display:    block;

    video& { max-height: 360px; background: #000; }
}

.activity-actions {
    display:      flex;
    align-items:  center;
    gap:          .1rem;
    padding:      .35rem .6rem;
    border-top:   1px solid var(--border);
}

.activity-action-btn {
    display:       inline-flex;
    align-items:   center;
    gap:           .3rem;
    background:    none;
    border:        none;
    padding:       .3rem .55rem;
    font-size:     .82rem;
    color:         var(--text-muted);
    border-radius: var(--border-radius);
    cursor:        pointer;
    transition:    color .12s, background .12s;
    line-height:   1;

    &:hover {
        color:      var(--brand, #1274E0);
        background: color-mix(in srgb, var(--brand, #1274E0) 8%, transparent);
    }

    /* Save button active state */
    &.saved {
        color: var(--brand, #1274E0);
    }
}

.activity-action-count {
    font-size:  .78rem;
    font-weight: 600;
}
.activity-react-wrap {
    position: relative;
}

.activity-reaction-picker {
    position:      absolute;

    bottom:        0px;

    left:          0;
    z-index:       500;
    display:       flex;
    gap:           .15rem;
    background:    var(--header-bg);
    border:        1px solid var(--border);
    border-radius: var(--border-radius);
    padding:       .3rem .4rem;
    box-shadow:    0 4px 16px rgba(0,0,0,.12);
    white-space:   nowrap;
}

.activity-reaction-option {
    background:    none;
    border:        none;
    font-size:     1.25rem;
    cursor:        pointer;
    padding:       .15rem .2rem;
    border-radius: var(--border-radius);
    line-height:   1;
    transition:    transform .1s;

    &:hover { transform: scale(1.35); }
}



.activity-reactions {
    display:     flex;
    flex-wrap:   wrap;
    gap:         .25rem;
    padding:     .3rem 1rem;
    min-height:  0;

    &:empty { padding: 0; }
}

.activity-reaction-chip {
    display:       inline-flex;
    align-items:   center;
    gap:           .25rem;
    background:    var(--color-30);
    border:        1px solid var(--border);
    border-radius: var(--border-radius);
    padding:       .15rem .5rem;
    font-size:     .82rem;
    cursor:        pointer;
    transition:    background .12s, border-color .12s;

    & span { font-size: .75rem; font-weight: 600; }

    &.active {
        background:   color-mix(in srgb, var(--brand, #1274E0) 10%, transparent);
        border-color: var(--brand, #1274E0);
        color:        var(--brand, #1274E0);
    }

    &:hover {
        background: color-mix(in srgb, var(--brand, #1274E0) 14%, transparent);
    }
}

.activity-comments {
    border-top:  1px solid var(--border);
    padding:     .6rem 1rem .75rem;
    display:     flex;
    flex-direction: column;
    gap:         .5rem;
    background:  var(--color-30);
}

.activity-comments-list {
    display:        flex;
    flex-direction: column;
    gap:            .6rem;
}

.activity-comment {
    display:     flex;
    align-items: flex-start;
    gap:         .6rem;

    &.is-reply {
        margin-left: 2.5rem;

        & .activity-comment-avatar {
            width:  26px;
            height: 26px;
        }
    }
}

.activity-comment-avatar {
    width:         32px;
    height:        32px;
    border-radius: var(--border-radius);
    object-fit:    cover;
    flex-shrink:   0;
}

.activity-comment-body {
    flex:       1;
    min-width:  0;
    background: var(--header-bg);
    border:     1px solid var(--border);
    border-radius: var(--border-radius);
    padding:    .4rem .65rem;
}

.activity-comment-author {
    font-weight:  600;
    font-size:    .8rem;
    margin-right: .4rem;

    & a { color: inherit; text-decoration: none; &:hover { color: var(--brand); } }
}

.activity-comment-text {
    font-size:   .85rem;
    line-height: 1.45;
    word-break:  break-word;
    white-space: pre-wrap;

    & .edited-tag {
        font-size:  .7rem;
        color:      var(--text-muted);
        font-style: italic;
        margin-left: .3rem;
    }
}

.activity-comment-meta {
    display:     flex;
    align-items: center;
    gap:         .6rem;
    margin-top:  .25rem;
}

.activity-comment-time {
    font-size: .7rem;
    color:     var(--text-muted);
}

.activity-comment-action {
    background: none;
    border:     none;
    padding:    0;
    font-size:  .72rem;
    color:      var(--text-muted);
    cursor:     pointer;
    transition: color .12s;

    &:hover       { color: var(--brand, #1274E0); }
    &.text-danger { &:hover { color: #e53935; } }
}

.activity-comment-form {
    display:     flex;
    align-items: center;
    gap:         var(--gapz);
    margin-top:  .4rem;

    & .activity-comment-avatar {
        width:  28px;
        height: 28px;
    }

    & .activity-comment-input { flex: 1; }

    & .square {
        flex-shrink: 0;
        color:       var(--text-muted);
        transition:  color .12s;

        &:hover { color: var(--brand, #1274E0); }
    }
}

.activity-comment-edit-input {
    width:        100%;
    margin-bottom: .3rem;
}*/





























@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

#user-activity-heatmap {
    display: flex;
    flex-direction: column;
    overflow-x: auto;
    max-width: 100%;
    padding: var(--padding);

    /*border: 1px solid var(--header-bg);*/
    border-radius: var(--border-radius);

    z-index: 3;

    position: absolute;
    top: var(--gap);
    right: var(--gap);

    /*background: var(--box-border);*/
    backdrop-filter: var(--backdrop-filter);
    /*opacity: 0.1;*/

    & .heatmap-days,
    & .heatmap-months {
        color: var(--header-bg) !important;
        & * { 
            color: var(--header-bg) !important;
            /*font-size: 12px;*/
        }
    }

    & .heatmap-months {
        display: flex;
        justify-content: space-between;
        height: 20px;
        margin-bottom: 5px;
        margin-left: 30px; /* Space for day labels */
        width: calc(53 * 10px + 52 * 2px); /* Match grid width: 53 cells + 52 gaps */
        
        & div { font-size: 12px; }
    }

    & .heatmap-container {
        display: flex;


        & .heatmap-days {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            margin-right: 15px;
            width: fit-content;
            height: calc(7 * 10px + 6 * 2px); /* Match grid height: 7 cells + 6 gaps */

            & div { font-size: 8px; }

        }

        & .heatmap-grid {

            display: grid;
            grid-template-columns: repeat(53, 10px); /* 53 weeks */
            grid-template-rows: repeat(7, 10px); /* 7 days */
            grid-auto-flow: column; /* Fill columns first (weeks) */
            gap: 2px;

            & .heatmap-cell {

                width: 10px;
                height: 10px;
                border-radius: 2px;
                background: var(--box-border);
                backdrop-filter: var(--backdrop-filter);
                transition: var(--transition);
                cursor: pointer;
                opacity: 0.5;

                &:hover {
                    outline: 2px solid var(--brand);
                    outline-offset: 0px;
                    transform: scale(1.1);
                    z-index: 10;
                }

                &.loading {
                    animation: pulse 1.5s ease-in-out infinite;
                    opacity: 0.7;
                }

                &.past:not(.loading) {
                    /*backdrop-filter: var(--backdrop-filter);*/
                    opacity: 0.1;
                }

                &.future:not(.loading) {
                    background-color: transparent;
                    border: 1px solid var(--box-border);
                }
            }
        }
    }
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media ( max-width: 600px ) {

    .activity-media-img {
        max-height: 260px;
    }

    .activity-comment.is-reply {
        margin-left: 1.5rem;
    }

    .activity-reaction-picker {
        left:  auto;
        right: 0;
    }
}




.pty-badges-grid {

    width: 100%;
    display: flex;
    gap: var(--padding);

    background-color: var(--header-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--border);
    box-shadow: var(--box-shadow);
    margin-bottom: var(--padding);
    padding: var(--padding);


    & .pty-badge {

        width: var(--input-size);
        height: var(--input-size);
        border-radius: var(--border-radius);
        display: flex;
        align-items: center;
        justify-content: center;
        & i {

            font-size: 24px;
        }

    }
}