/* Kiểu dáng nút kết bạn */
.wp-friend-request-button-container {
    margin: 10px 0;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.wp-friend-button {
    font-family: "Montserrat", serif;
    background: #C9A3E3;
    display: inline-block;
    padding: 16px 20px;
    border-radius: 10px;
    /* font-family: Montserrat; */
    font-weight: 700;
    font-size: 15px;
    line-height: 14.63px;
    letter-spacing: 0%;
    text-align: center;
    color: #000;
    font-weight: bold;
}

.wp-friend-notification-content a {
    color: #000 !important;
    display: contents !important;
}

.wp-friend-notification-content a:hover {
    color: #000 !important;
}

.wp-friend-button.send {
    background-color: #3C60A6;
    color: white;
    border: none;
    color: #000;
    /* width: 195px; */
    padding: 12px 20px;
    color: #fff !important;

}

.wp-friend-button.send:hover {
    background-color: #fcfdff;
    color: #65676b !important;
}

.wp-friend-button.pending {
    background-color: #fcfdff;
    color: #65676b !important;
}

.wp-friend-button.accept {
    background-color: #713ca1;
    color: white;
    border: none;
}

.wp-friend-button.accept:hover {
    background-color: #713ca1;
    color: white;
}

.wp-friend-button.decline {
    background-color: #fcfdff;
    color: #65676b;
    border: none;
}

.wp-friend-button.decline:hover {
    background-color: #fcfdff;
    color: #65676b;
}

.wp-friend-button.is-friend {
    background-color: #fcfdff;
    color: #65676b;
}

.wp-friend-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Thông báo kết bạn */
.wp-friend-notifications-container {
    position: relative;
    display: inline-block;
}

.wp-friend-notifications-icon {
    position: relative;

    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}


.wp-friend-notification-count {
    position: absolute;
    top: -5px;
    right: 19px;
    background-color: #e41e3f;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wp-friend-notification-count.has-notifications {
    opacity: 1;
}

.wp-friend-notifications-dropdown {
    position: absolute;
    top: 45px;
    right: 0px;
    width: 500px;
    left: -200px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 999;
}

.wp-friend-notifications-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.wp-friend-notifications-loading,
.wp-friend-notifications-empty {
    padding: 20px;
    text-align: center;
    color: #65676b;
}

.wp-friend-notifications-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wp-friend-notification-item {
    padding: 10px;
    border-bottom: 1px solid #e4e6eb;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wp-friend-notification-item:last-child {
    border-bottom: none;
}

.wp-friend-notification-content {
    font-size: 14px;
}

.wp-friend-notification-time {
    font-size: 12px;
    color: #65676b;
    margin-top: 5px;
}

.wp-friend-notification-actions {
    display: flex;
    gap: 10px;
}

.wp-friend-notification-accept,
.wp-friend-notification-decline {
    flex: 1;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.wp-friend-notification-accept {
    background-color: #713CA1;
    color: white;
}

.wp-friend-notification-accept:hover {
    background-color: #36a420;
}

.wp-friend-notification-decline {
    background-color: #e4e6eb;
    color: #65676b;
}

.wp-friend-notification-decline:hover {
    background-color: #d8dadf;
}

/* Toast thông báo */
.wp-friend-notification-toast {
    position: fixed;
    bottom: 30px;
    right: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.wp-friend-notification-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.wp-friend-notification-toast.success {
    border-left: 4px solid #42b72a;
}

.wp-friend-notification-toast.error {
    border-left: 4px solid #e41e3f;
}

.wp-friend-notification-toast-content {
    padding: 12px 20px;
    font-size: 14px;
    color: #1c1e21;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .wp-friend-notifications-dropdown {
        width: 280px;
        right: -120px;
    }

    .wp-friend-notifications-dropdown:before {
        right: 140px;
    }
}

.thongbao-tieude {
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0%;
    text-align: center;
    color: #fff;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ===== CONTAINER CHAT ===== */
.wp-friend-chat-container {
    display: flex;
    margin-top: 30px;
}

/* Thu nhỏ sidebar */
.wp-friend-chat-container.minimized .wp-friend-chat-sidebar {}

.wp-friend-chat-container.minimized .wp-friend-chat-user-info span,
.wp-friend-chat-container.minimized .wp-friend-chat-search,
.wp-friend-chat-container.minimized .wp-friend-chat-conversation-info {
    display: none;
}

.wp-friend-chat-container.minimized .wp-friend-chat-avatar-container {
    margin-right: 0;
}

/* ===== SIDEBAR CHAT ===== */
.wp-friend-chat-sidebar {
    width: 45%;
    background-color: #fff;
    height: 80vh;
    padding: 30px;
}

/* Header của sidebar */
.wp-friend-chat-header {
    padding: 10px;
    background-color: #1877f2;
    color: white;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wp-friend-chat-user-info {
    display: flex;
    align-items: center;
}

.wp-friend-chat-user-info img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

.wp-friend-chat-actions button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tìm kiếm bạn bè */
.wp-friend-chat-search {
    padding: 10px;
    border-bottom: 1px solid #e4e6eb;
}

.wp-friend-chat-search-input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #e4e6eb;
    outline: none;
}

.wp-friend-chat-search-input:focus {
    border-color: #1877f2;
}

/* Danh sách cuộc trò chuyện */
.wp-friend-chat-conversations {
    flex: 1;
    overflow-y: auto;
}

.wp-friend-chat-loading,
.wp-friend-chat-no-friends {
    padding: 20px;
    text-align: center;
    color: #65676b;
}

.wp-friend-chat-conversation-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wp-friend-chat-conversation-item {
    padding: 10px;
    display: flex;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wp-friend-chat-conversation-item:hover {
    background-color: #f0f2f5;
}

.wp-friend-chat-conversation-item.has-unread {
    background-color: #e7f3ff;
}

.wp-friend-chat-avatar-container {
    position: relative;
    margin-right: 20px;
}

.wp-friend-chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.wp-friend-chat-unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e41e3f;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.wp-friend-chat-conversation-info {
    flex: 1;
    overflow: hidden;
}

.wp-friend-chat-conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.wp-friend-chat-conversation-name {
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wp-friend-chat-conversation-time {
    font-size: 12px;
    color: #65676b;
}

.back-button {
    color: #000 !important;
}

.back-button:hover {
    color: #000 !important;
}

.wp-friend-chat-conversation-preview {
    font-size: 13px;
    color: #65676b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== CỬA SỔ CHAT ===== */
.wp-friend-chat-windows {
    display: flex;
    flex-wrap: wrap-reverse;
    align-items: flex-end;
    position: absolute;
    right: 15px;
    width: 52%;
}

.wp-friend-chat-window {
    width: 100%;
    height: 80vh;
    background: #fff;
    position: relative;
}

/* Thu nhỏ cửa sổ chat */
.wp-friend-chat-window.minimized {
    height: 42px;
}

.wp-friend-chat-window.minimized .wp-friend-chat-window-messages,
.wp-friend-chat-window.minimized .wp-friend-chat-window-input {
    display: none;
}

/* Header của cửa sổ chat */
.wp-friend-chat-window-header {
    padding: 10px;
    background-color: #44288f;
    color: white;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 18px 16px;
}

.wp-friend-chat-window-user {
    display: flex;
    align-items: center;
}

.wp-friend-chat-window-user img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    margin-right: 8px;
}

.wp-friend-chat-window-actions {
    display: flex;
}

.wp-friend-chat-window-actions button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
}

/* Phần tin nhắn */
.wp-friend-chat-window-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background-color: #fff;
}

.wp-friend-chat-window-loading,
.wp-friend-chat-window-no-messages {
    padding: 20px;
    text-align: center;
    color: #65676b;
}

.wp-friend-chat-message-list {
    display: flex;
    flex-direction: column;
}

.wp-friend-chat-message {
    margin-bottom: 10px;
    max-width: 70%;
}

.wp-friend-chat-message.my-message {
    align-self: flex-end;
}

.wp-friend-chat-message.friend-message {
    align-self: flex-start;
}

.wp-friend-chat-message-content {
    padding: 8px 12px;
    border-radius: 18px;
    word-wrap: break-word;
}

.wp-friend-chat-message.my-message .wp-friend-chat-message-content {
    background-color: #47278f;
    color: white;
    padding: 10px 22px;
    font-weight: 500;
}

.wp-friend-chat-message.friend-message .wp-friend-chat-message-content {
    background-color: #713CA147;
    color: #050505;
    padding: 10px 22px;
    font-weight: 500;
}

.wp-friend-chat-window-user span {
    font-weight: bold;
    font-size: 18px;
}

.friend-message .wp-friend-chat-message-time {
    font-size: 13px;
    color: #65676b;
    margin-top: 2px;
    text-align: left;
    font-weight: 500;
}

.wp-friend-chat-message-time {
    font-size: 11px;
    color: #65676b;
    margin-top: 2px;
    text-align: right;
}

.wp-friend-chat-window-messages {
    height: 68vh;
    padding: 20px;
}

/* Input tin nhắn */
.wp-friend-chat-window-input {
    padding: 10px;
    display: flex;
    align-items: center;
    border-top: 1px solid #e4e6eb;
    position: absolute;
    bottom: 0px;
    width: 100%;
}

.wp-friend-chat-message-input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #e4e6eb;
    outline: none;
    resize: none;
    height: 45px;
}

.wp-friend-chat-message-input:focus {
    border-color: #1877f2;
}

.wp-friend-chat-send-btn {
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    margin-left: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.wp-friend-chat-send-btn:hover {}

/* ===== THÔNG BÁO CHAT ===== */
.wp-friend-chat-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.wp-friend-chat-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.wp-friend-chat-notification-content {
    padding: 12px 20px;
    font-size: 14px;
    color: #1c1e21;
    border-left: 4px solid #1877f2;
}

/* Toast thông báo */
.wp-friend-notification-toast {
    position: fixed;
    bottom: 30px;
    right: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.wp-friend-notification-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.wp-friend-notification-toast.success {
    border-left: 4px solid #42b72a;
}

.wp-friend-notification-toast.error {
    border-left: 4px solid #e41e3f;
}

.wp-friend-notification-toast-content {
    padding: 12px 20px;
    font-size: 14px;
    color: #1c1e21;
}

/* ===== RESPONSIVE ===== */
@media screen and (max-width: 768px) {
    .wp-friend-chat-container {
        right: 10px;
    }

    .wp-friend-chat-sidebar {
        width: 250px;
    }

    .wp-friend-chat-window {
        width: 250px;
    }
}

@media screen and (max-width: 576px) {
    .wp-friend-chat-container {
        right: 0;
        left: 0;
        justify-content: center;
    }

    .wp-friend-chat-sidebar {
        width: 100%;
        max-width: 350px;
    }

    .wp-friend-chat-window {
        width: 100%;
        max-width: 350px;
    }
}