/* Base styles */
.menu_right_container {
    display: flex;
    flex-direction: column;
    gap: 5px;
    height: 100vh;
    overflow: hidden;
    position: sticky;
    top: 0;
    background: #fff;
    font-family: 'Roboto', sans-serif;
}

.menu_right_header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 0 0 auto;
    padding: 10px;
}

.menu_right_theme_selector {
    display: flex;
    gap: 10px;
}

.theme_logo {
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    padding: 5px;
}

.theme_logo:hover {
    transform: scale(1.1);
}

.theme_logo.active {
    opacity: 1;
    border: 1px solid #fd7e14;
    border-radius: 5px;
    background: #fff !important;
}

.theme_logo:not(.active) {
    opacity: 0.6;
}

.menu_right_body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 5px;
}

.tab-content {
    flex: 1;
    overflow: hidden;
}

.tab-pane {
    display: none;
    flex-direction: column;
    height: 100%;
}

.tab-pane.show {
    display: flex;
}

.tab-pane.fade {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.tab-pane.fade.show {
    opacity: 1;
}

.menu_right_search {
    width: 100%;
    flex: 0 0 auto;
    padding: 10px;
}

.menu_right_search input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.menu_right_friends_wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    flex: 0 0 auto;
    padding: 10px;
}

.menu_right_friends_container {
    display: flex;
    overflow-x: auto;
    gap: 5px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

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

.menu_right_friend_item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 70px;
    text-align: center;
}

.menu_right_friend_img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.menu_right_friend_item span {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

.menu_right_empty_text {
    font-size: 14px;
    color: #666;
    text-align: center;
    width: 100%;
}

.menu_right_messages_container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    overflow-y: auto;
    flex: 1;
}

.menu_right_message_item {
    display: flex;
    align-items: center;
    gap: 5px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
    max-width: 100%;
    overflow: hidden;
}

.menu_right_message_item:hover {
    background: #f5f5f5;
}

.menu_right_message_item[data-notification-type="mining_product"] .menu_right_message_name::before {
    content: '🛒 ';
}

.menu_right_message_avatar {
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.menu_right_message_avatar img {
    width: 100%;
    height: 100%;
}

.menu_right_message_content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: hidden;
}

.menu_right_message_name {
    font-size: 14px;
    font-weight: 700 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu_right_message_text {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu_right_message_item.unread,
.menu_right_message_item.unread * {
    font-weight: 700 !important;
}

.menu_right_tabs {
    flex: 0 0 auto;
    position: absolute;
    bottom: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #ddd;
}

.nav-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    width: 100%;
}

.nav-item {
    flex: 1;
    text-align: center;
}

.nav-tabs .nav-link {
    padding: 10px;
    width: 100%;
    text-align: center;
    border: none;
    color: #6c757d;
}

.nav-tabs .nav-link.active {
    color: #fd7e14;
    background: none;
}

.nav-tabs .nav-link i {
    color: inherit;
}

.menu_right_arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
}

.menu_right_arrow.left {
    left: 0;
}

.menu_right_arrow.right {
    right: 0;
}

@media (min-width: 768px) {
    .menu_right_arrow {
        display: block;
    }
}

.badge-danger {
    display: none;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 1;
    background: red;
    padding: 10px;
    gap: 10px;
    font-size: 16px;
}

.badge-danger::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid red;
}

.alert-comment, .alert-mining {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Modal styles */
.modal-dialog {
    position: fixed;
    bottom: 0;
    right: 0;
    height: 85vh;
    margin: 0;
    width: 500px;
    max-width: 100%;
    overflow-x: hidden;
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.modal-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    border: none !important;
    border-radius: 10px 10px 0 0;
}
.modal-header,
.modal-footer {
    z-index: 1;
}
.modal-body {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    padding: 0;
}
#chatBody {
    overflow-y: auto;
    padding: 0;
}

.message {
    display: flex;
    margin: 0;
    max-width: 70%;
}

.message.received {
    margin-right: auto;
    text-align: left;
    margin-top: 10px;
}

.message.sent {
    margin-left: auto;
    margin-top: 10px;
    flex-direction: row-reverse;
    text-align: right;
}

.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin: 0 5px;
}
.message.sent .message-content .message-content-img {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-direction: row-reverse;
}
.message.received .message-content .message-content-img {
    display: flex;
    align-items: center;
    gap: 5px;
}
.message-time {
    font-size: 0.8em;
    color: #999;
}

.message.received .message-time {
    text-align: left;
}

.message.sent .message-time {
    text-align: right;
}

.footer-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#menu-bottom-notifications, #menu-bottom-setup {
    background: #fff;
    position: relative;
    width: 100%;
    box-shadow: rgba(0, 0, 0, 0.1) 0px -2px 5px;
    min-height: 100vh;
    z-index: 1000;
}

#menu-bottom-notifications .btn-cancel, #menu-bottom-setup .btn-cancel {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1001;
}

@media (min-width: 576px) {
    #menu-bottom-notifications, #menu-bottom-setup {
        display: none !important;
    }
}

/* Animations */
@keyframes shake {
    0% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes stamp {
  0% {
    transform: scale(1.5);
    opacity: 0;
  }
  10% {
    transform: scale(1.0);
    opacity: 1;
  }
  80% {
    transform: scale(1.0);
    opacity: 1;
  }
  100% {
    transform: scale(1.0);
    opacity: 0;
  }
}

.kiss-effect-yahoo {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: -webkit-fill-available;
    height: -webkit-fill-available;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    animation: stamp 5s ease-in-out forwards;
    overflow: hidden;
}

.theme-wow,
.theme-zalo {
    background: #fff;
    font-family: 'Roboto', sans-serif;
}

.theme-wow .menu_right_header {
    background: #fd7e14;
}

.theme-wow .menu_right_tabs,
.theme-facebook .menu_right_tabs,
.theme-zalo .menu_right_tabs {
    background: #fff;
}

.theme-yahoo {
    background: #73236c;
    font-family: sans-serif;
}

.theme-yahoo .menu_right_header {
    background: #73236c;
}

.theme-yahoo .menu_right_tabs {
    background: #73236c;
    border-top: none;
}

.theme-yahoo .menu_right_tabs i {
    color: #fff;
}

.theme-yahoo .menu_right_messages_container {
    background: #fff;
    gap: 0;
    margin: 10px;
    width: auto;
}

.theme-yahoo .menu_right_message_item {
    padding: 5px !important;
}

.theme-yahoo .menu_right_friend_item span {
    color: #fff;
}

.theme-yahoo .menu_right_message_avatar img,
.theme-yahoo .menu_right_friend_item img {
    border-radius: 0;
    background: #fff;
}

.theme-facebook {
    background: #fff;
    font-family: 'Helvetica Neue', sans-serif;
}

.theme-facebook .menu_right_header {
    background: #1877F2;
}
.theme-facebook .nav-link.active i {
    color: #1877F2;
}
.theme-zalo .menu_right_header {
    background: linear-gradient(90deg, #0A68FE, #007bff80);
}
.theme-zalo .nav-link.active i {
    color: #1877F2;
}
.theme-zalo .menu_right_message_content {
    position: relative;
}
.theme-zalo .menu_right_message_time {
    position: absolute;
    top: 0;
    right: 0;
}
.theme-zalo .menu_right_message_time.countdown {
    position: static
}
.theme-yahoo .theme_logo,
.theme-wow .theme_logo,
.theme-facebook .theme_logo,
.theme-zalo .theme_logo {
    background: none;
    padding: 5px;
}

/* Chat modal theme styles */
#chatModal {
    background: none;
}

#chatModal .modal-content {
    border-radius: 10px 10px 0 0 !important;
}

#chatModal.theme-wow .modal-content {
    background: #fff;
}
#chatModal.theme-wow #sendMessageBtn {
    background: #fd7e14;
    border-color: #fd7e14;
}
#chatModal.theme-yahoo .modal-content {
    border-radius: 0 !important;
    background: #fff;
}

#chatModal.theme-yahoo .modal-header {
    background: #73236c !important;
    border-radius: 0;
    padding: 0;
}

#chatModal.theme-yahoo .modal-header img {
    border-radius: 0 !important;
}
#chatModal.theme-yahoo #chatBody {
    padding: 10px;
}
#chatModal.theme-yahoo .modal-footer {
    background: #73236c !important;
    border-radius: 0;
    justify-content: flex-start !important;
}

#chatModal.theme-yahoo .input-group {
    padding: 10px;
    background: #fff;
}

#chatModal.theme-yahoo #messageInput {
    border-radius: 0 !important;
    padding: 0;
    border: none;
}

#chatModal.theme-yahoo #sendMessageBtn {
    border-radius: 0 !important;
    padding: 5px 15px;
    border: none;
    background: #73236c !important;
}

#chatModal.theme-yahoo .message-content {
    background: none;
    color: #000;
}
#chatModal.theme-yahoo .message.received .message-username {
    color: #dc3545;
}
#chatModal.theme-yahoo .message.sent .message-username {
    color: #3f51b5;
}
#chatModal.theme-yahoo .message.sent {
    margin-left: 0;
    flex-direction: row;
}
#chatModal.theme-yahoo .message.sent,
#chatModal.theme-yahoo .message.received {
    gap: 10px;
}
#chatModal.theme-yahoo .message-time {
    display: none;
}
#chatModal.theme-yahoo .message.sent .message-content .message-content-img {
    flex-direction: row;
}
#chatModal.theme-yahoo .modal-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.user-avatar,
.friend-avatar {
    width: 80px;
    height: 80px;
    background: #fff;
}
.webcam,
.micro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    
}
.webcam img,
.micro img {
    width: 40px;
    height: 40px;
    filter: opacity(0.5);
}
.webcam span,
.micro span {
    font-size: 12px;
    color: #fff;
}
#chatModal.theme-zalo .modal-content,
#chatModal.theme-facebook .modal-content {
    background: #fff;
}
#chatModal.theme-zalo .modal-body,
#chatModal.theme-wow .modal-body {
    background: #ebecf0;
}
#chatModal.theme-zalo .message.sent .message-content .message-content-text,
#chatModal.theme-wow .message.sent .message-content .message-content-text{
    background-color: #e5f1ff;
    color: #000;
    padding: 10px;
    border-radius: 8px;
    word-wrap: break-word;
    box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
}
#chatModal.theme-zalo .message.received .message-content .message-content-text,
#chatModal.theme-wow .message.received .message-content .message-content-text {
    background-color: #fff;
    padding: 10px;
    border-radius: 8px;
    word-wrap: break-word;
    box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
}
#chatModal.theme-zalo .modal-header {
    background: #0A68FE;
    color: #fff;
    
}
#chatModal.theme-facebook .message.sent .message-content .message-content-text {
    background-color: #0829cc;
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    word-wrap: break-word;
    box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
}
#chatModal.theme-facebook .message.received .message-content .message-content-text {
    background-color: #f5f4fa;
    padding: 10px;
    border-radius: 8px;
    word-wrap: break-word;
    box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
}
#chatModal.theme-facebook #sendMessageBtn {
    background: #030bb6;
    border-color: #030bb6;
}
#chatModal.theme-wow .footer-content,
#chatModal.theme-facebook .footer-content,
#chatModal.theme-zalo .footer-content {
    flex-direction: row;
}
#chatModal.theme-wow .message.sent .message-avatar,
#chatModal.theme-facebook .message.sent .message-avatar,
#chatModal.theme-zalo .message.sent .message-avatar {
    display: none;
}
#chatModal.theme-wow .message.sent,
#chatModal.theme-facebook .message.sent,
#chatModal.theme-zalo .message.sent {
    margin-right: 10px;
}
#chatModal.theme-wow .message.received .message-avatar-placeholder,
#chatModal.theme-facebook .message.received .message-avatar-placeholder,
#chatModal.theme-zalo .message.received .message-avatar-placeholder {
    width: 30px;
    margin: 0 5px;
}