.prof-view {
    height: 100%;
    width: 100%;
    display: flex;
    gap: 8px;
}

.prof-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.posts-cont {
    background-color: var(--prof-section-background);
    border: var(--prof-border) 1px solid;
    padding: 8px;
    width: 100%;
    box-sizing: border-box;
}

.post-box {
    background-color: var(--prof-section-background);
    border: var(--prof-border) 1px solid;
    box-sizing: border-box;
    padding: 8px;
}

.bar {
    padding: 8px;
    display: flex;
    flex-direction: column;
    width: 149px;
    min-width: 149px;
    background-color: var(--prof-section-background);
    border: var(--prof-border) 1px solid;
}

.bar-cont {
    height: min-content;
    position: sticky; 
    top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.avatar-cont {
    background-color: var(--prof-section-background);
    border: var(--prof-border) 1px dotted;
    padding: 8px;
}

@media (max-width: 530px) {
    .tab-cont {
        gap: 0 !important;
        justify-content: space-between;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 100;
        border-top: #ccc solid 1px;
        background-color: #fff;
    }

    body.dark .tab-cont {
        background-color: #222;
    }

    .prof-view {
        min-height: 100vh;
        overflow-y: hidden;
    }

    .prof-main {
        scroll-snap-align: start;
    }
    
    .bar-cont {
        position: absolute;
        right: -174px;
        scroll-snap-align: end;
    }

    body {
        padding-bottom: 38px;
    }
}

.avatar {
    width: 100%;
    box-sizing: border-box;
    border: 1px #CCC solid;
    padding: 2px;
    background-clip: content-box;
    display: block;
}

.edit-mode {
    display: none;
}

#edit-toggle:checked ~ .edit-mode {
    display: block;
}

#edit-toggle:not(:checked) ~ .view-mode {
    display: inline;
}

#edit-toggle:checked ~ .view-mode {
    display: none;
}

.edit-form {
    margin-top: 10px;
}

.edit-form label {
    display: block;
    margin-bottom: 5px;
}

.edit-form input[type="text"],
.edit-form input[type="file"] {
    display: block;
    margin-bottom: 10px;
}

.edit-form button {
    display: block;
    margin-top: 10px;
}

.tab-cont {
    display: flex;
    height: 38px;
    flex-direction: row;
    gap: 3px;
    margin-top: -8px;
}

.tab {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    font-size: 16px;
    color: #000;
    transition: all 0.4s;
    text-shadow: 1px 0px 0 transparent;
}

.tab.active {
    text-shadow: 1px 0px 0 currentcolor;
    border-bottom-color: #407cac;
}

.tab-contents {
    opacity: 1;
    transition: opacity 0.1s linear;
}

.tab-contents.hidden {
    opacity: 0;
}

.posts {
    opacity: 1;
    transition: opacity 0.1s linear;
}

.posts.hidden {
    opacity: 0;
}

.info {
    word-wrap: break-word;
}

.tab-contents > div {
    border-top: none;
    padding-top: 8px;
}

.post-box {
    padding-bottom: 8px;
    width: 100%;
}

.post-box > form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-box > form > textarea {
    flex-grow: 1;
    resize: vertical;
}

.char-counter {
    font-size: 18px;
    color: #888;
    flex-grow: 1;
    border-bottom: #ccc 1px dotted;
    margin-right: 8px;
}

.media-preview img,
.media-preview video {
    max-width: 100%;
    margin-top: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.post-box-actions {
    display: flex;
    justify-content: space-between;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(22px, 22px));
    gap: 3px;
}

.profile-grid img {
    width: 22px;
    height: 22px;
    object-fit: cover;
}

.profile-grid-label {
    font-size: 13px;
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px #CCC solid;
}

.emoji-icon {
    transition: transform 0.3s ease;
    pointer-events: none;
}

.emoji-button:hover .emoji-icon {
    transform: scale(1.1);
}

#emoji-dropdown > .dropdown-cont {
    display: grid;
    grid-template-columns: repeat(5, 16px);
    grid-template-rows: repeat(2, 16px) 16px;
    gap: 4px;
}

#drop-zone {
    width: 106px;
    height: 90px;
    box-sizing: border-box;
}

#drop-zone > .dropdown-cont {
    width: 100%;
    height: 100%;
    border: #ccc 1px dashed;
    background-image: url('/img/icons/drop.png');
    background-repeat: no-repeat;
    background-position: center center;
    box-sizing: border-box;
}

.dropping-zone {
    border: #ccc 1px solid !important;
    transform: scale(1.4);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.2s linear;
}

#drop-zone[data-hold-visible]::after, #drop-zone[data-hold-visible]::before {
    transform: translateX(calc(-50% + 21px));
}

#drop-zone[data-hold-visible] {
    transform: translate(calc(-50% - 21px), 28px);
}

#emoji-dropdown img {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

#file-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    max-height: 100%;
    width: 100%;
    height: 100%;
}

#file-list::-webkit-scrollbar {
    display: none;
}


#file-list > div {
    border: #ccc 1px dashed;
    padding: 4px;
    font-size: 14px;
    min-height: 14px;
    height: 14px;
    display: flex;
    transition: opacity 0.2s linear, margin 0.15s ease;
}

#file-list > div > div {
    width: auto;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-x: hidden;
}

#file-list > div > span {
    border: none;
    background-color: transparent;
    padding: 2px;
    cursor: pointer;
    flex-grow: 1;
}

#file-list > div > span > img {
    float: right;
}

/* DARK THEME */
body.dark .tab {
    color: #FFF;
    border-bottom-color: transparent;
}

body.dark .tab.active {
    border-bottom-color: #ccc;
}

.bio {
    width: 100%;
    max-height: 245px;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.bio img {
    display: block;
    max-width: 100%;
}

.bio .br {
    flex-basis: 100%;
    height: 0;
    margin: 0;
}

.bio {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.bio::-webkit-scrollbar {
    display: none;
}

.masonry-container {
    column-count: 3;
    column-gap: 8px;
    overflow: hidden;
    transition: max-height 0.5s ease; 
    max-height: 200px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
    cursor: pointer;
}

.masonry-container-label {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
}

.masonry-container.expanded {
    transition: max-height 2s ease; 
    max-height: 5500px;
    mask-image: none;
    cursor: auto;
}

.masonry-item {
    margin-bottom: 10px;
    pointer-events: none;
}

.masonry-container.expanded .masonry-item {
    pointer-events: auto;
}

.hide-button {
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    width: 100%;
    text-align: center;
    height: 20px;
    border: #CCC 1px dotted;
    display: none;
    cursor: pointer;
}

.hide-button.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.masonry-item {
    display: inline-block;
    width: 100%;
    padding-bottom: 8px;
}