﻿
/* Basit JS/CSS modal stili (Bootstrap JS’e bağlı kalmıyoruz) */
#newMessageModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    align-items: center;
    justify-content: center;
}

    #newMessageModal .modal-dialog {
        background: #fff;
        border-radius: 4px;
        max-width: 500px;
        width: 90%;
        padding: 1rem;
        position: relative;
    }

    #newMessageModal .close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 1.2rem;
        cursor: pointer;
    }

.posts__item .posts__users {
    display: flex;
    align-items: center;
    flex-direction: row; /* yan yana */
    gap: 0.5rem;
    margin-left: 20px; /* inline style’ı kaldırıp buraya alabilirsin */
}

.posts__users {
    display: flex;
    align-items: center; /* dikey ortalama */
    gap: 0.5rem; /* resim ile isim arası boşluk */
    margin-left: 10px; /* istersen burayı tut veya tamamen kaldır */
}

    .posts__users img {
        margin: 0; /* ekstra margin varsa kaldır */
    }

/* 4 kolon: Kullanıcılar | Mesaj | Okuma Durumu | Aktivite */
.posts__head,
.posts__item {
    display: grid;
    grid-template-columns: 200px 1fr 120px 180px;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
}

.posts__head {
    font-weight: 600;
    border-bottom: 2px solid #eee;
}

.posts__item.unread {
    background-color: #e6f7ff;
}

.posts__users {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .posts__users .d-flex {
        align-items: center;
    }

.posts__topic h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.posts__topic a {
    text-decoration: none;
    color: inherit;
}

.posts__replies {
    text-align: center;
}

.posts__activity {
    text-align: center;
    white-space: nowrap; /* tek satırda tut */
    margin-left: 30px;
}

#chatContainer {
    position: relative;
    height: 500px;
    overflow-y: auto;
    margin-top: 15px;
}

.load-more-btn {
    display: none;
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

#chatContainer:hover .load-more-btn {
    display: block;
}

.posts__item {
    display: flex;
    align-items: flex-start;
    margin-bottom: .5rem;
    background-color: transparent;
}

    .posts__item.mine {
        flex-direction: row-reverse;
    }

.posts__topic {
    display: inline-block;
    max-width: 70%;
    padding: .5rem 1rem;
    border-radius: .5rem;
    word-break: break-word;
}

.posts__item.theirs .posts__topic {
    background: #d3d3d3;
}

.avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 .75rem 0 0;
}

.posts__item.mine .avatar-container {
    margin: 0 0 0 .75rem;
}


.posts__item.mine .posts__topic {
    background: #e7f3ff;
}

.posts__activity-avatar {
    font-size: 0.9rem;
    color: #666;
    margin-top: .25rem;
    white-space: nowrap;
}

/* Container’ı yavaşça sol‑gel yapacağız */
#userContentContainer.fade‑in {
    animation: fadeIn .35s ease‑out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Spinner kutusu */
.loading-box {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}
/* Basit border‑spinner */
.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: .45rem solid #ddd;
    border-top-color:darkgreen;
    border-radius: 50%;
    animation: spin .75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
