/* Chat Widget Styles */
.chat-widget-container {
    position: fixed;
    top: 84px;
    right: 24px;
    width: min(380px, calc(100vw - 32px));
    height: min(72vh, 520px);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.95));
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
    display: none;
    flex-direction: column;
    z-index: 1000001;
    border: 1px solid rgba(148, 163, 184, 0.18);
    overflow: hidden;
    backdrop-filter: blur(12px);
    animation: slideUp 0.28s ease-out;
}

.chatWithUserBtn {
    background: var(--primary);
    align-items: center;
    text-align: center;
    gap: 6px;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
}

.chat-widget-container.active {
    display: flex;
}

@keyframes slideUp {
    from {
        transform: translateY(26px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.chat-widget-header {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text-main);
    box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.08);
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-widget-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.chat-widget-header h3 i {
    color: var(--primary);
    font-size: 1.15rem;
}

.chat-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: max-content;
}

.back-btn,
.chat-widget-header .close-btn {
    background: rgba(15, 23, 42, 0.06);
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    transition: background 0.2s, transform 0.2s;
}

.back-btn:hover,
.chat-widget-header .close-btn:hover {
    background: rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.chat-widget-header .close-btn {
    color: var(--text-main);
}

.chat-clear-btn {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-main);
    border-radius: 999px;
    padding: 10px 14px;
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    transition: background 0.2s, transform 0.2s;
}

.chat-clear-btn:hover {
    background: rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.group-chat-header-action-btn,
.chat-clear-btn,
.group-chat-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-main);
    white-space: nowrap;
    flex-shrink: 0;
}

.group-chat-header-action-btn:hover,
.chat-clear-btn:hover,
.group-chat-close-btn:hover {
    transform: translateY(-1px);
    background: rgba(15, 23, 42, 0.1);
}

.group-chat-close-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
}

.group-chat-header-action-btn.danger {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.group-chat-header-action-btn.danger:hover {
    background: rgba(220, 53, 69, 0.18);
}

.chat-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.group-chat-members-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border, rgba(15, 23, 42, 0.08));
    background: rgba(15, 23, 42, 0.03);
    overflow: hidden;
    min-width: 0;
}

.group-chat-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 10px 14px 12px;
    border-bottom: 1px solid var(--border, rgba(15, 23, 42, 0.08));
    background: rgba(255, 255, 255, 0.7);
    flex-wrap: nowrap;
    overflow-x: auto;
}

.group-chat-members-list {
    display: flex;
    align-items: center;
    gap: 59%;
    height: 56px;
    overflow: unset;
}

.group-chat-member-avatar-wrap {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.group-chat-member-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--card-bg);
    display: block;
}

.group-chat-member-status {
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--card-bg);
    background: #94a3b8;
}

.group-chat-member-status.online {
    background: #22c55e;
}

.group-chat-member-status.offline {
    background: #94a3b8;
}

.group-chat-member-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
}

.group-chat-view-members-btn {
    border: none;
    background: var(--danger);
    color: #fff;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

.chat-widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg);
    color: var(--text-main);
    min-height: 0;
}

.chat-widget-add-friend-btn {
    margin-left: 10px;
    padding: 10px 14px;
    border-radius: 16px;
    border: none;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-main);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.chat-widget-add-friend-btn:hover {
    background: rgba(15, 23, 42, 0.1);
}

.chat-message {
    display: flex;
    gap: 12px;
    animation: messageIn 0.26s ease-out;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
    }
}

.chat-message.own {
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 42px;
    height: 42px;
    border-radius: 18px;
    flex-shrink: 0;
    object-fit: cover;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.chat-message-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-message-bubble {
    padding: 14px 16px;
    border-radius: 24px;
    word-wrap: break-word;
    max-width: 100%;
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-main);
    font-size: 0.94rem;
    line-height: 1.6;
}

.chat-message.own .chat-message-bubble {
    background: var(--primary);
    color: #fff;
}

.chat-message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    align-self: flex-end;
}

.chat-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}

.chat-msg-controls {
    display: flex;
    gap: 6px;
}

.chat-msg-controls button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 2px;
}

.chat-msg-controls button:hover {
    color: var(--primary);
}

.chat-widget-input {
    padding: 16px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.06);
}

.chat-widget-input input {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.chat-widget-input input:focus {
    border-color: rgba(99, 102, 241, 0.8);
    background: #f8fafc;
}

.chat-widget-input button {
    width: 46px;
    height: 46px;
    padding: 0;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.chat-widget-input button:hover {
    transform: translateY(-1px);
    background: #4f46e5;
}

.chat-widget-input .emoji-btn,
.chat-widget-input .attach-btn {
    width: 46px;
    height: 46px;
    padding: 0;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-main);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 1.1rem;
}

.chat-widget-input .emoji-btn:hover,
.chat-widget-input .attach-btn:hover {
    background: rgba(15, 23, 42, 0.12);
}

#chat-attachment-preview {
    margin-bottom: 4px;
}

/* emoji picker container styling */
#emoji-picker {
    width: 220px;
    max-width: 90%;
    max-height: 300px;
    overflow-y: auto;
}

/* emojis themselves black */
#emoji-picker button {
    color: var(--text-main);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
}
#emoji-picker button:hover {
    background: var(--primary);
    color: white;
}

/* Dark Mode Emoji Picker */
body.dark-mode #emoji-picker {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

body.dark-mode #emoji-picker button {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-main);
}

body.dark-mode #emoji-picker button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.chat-widget-input button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: scale(1);
}

/* Mobile responsiveness - DÜZELTİLDİ */
@media (max-width: 768px) {
    .chat-widget-container,
    .chat-lists-panel {
        width: auto;
        max-width: 100%;
        left: 10px;
        right: 10px;
        top: 72px;
        bottom: 12px;
        transform: none;
        border-radius: 24px;
        height: auto;
        margin: 0;
        box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
        overflow: hidden;
    }
    .chat-widget-header,
    .chat-lists-header {
        padding: 10px;
    }
    .chat-widget-input,
    .chat-lists-search,
    .chat-lists-footer {
        padding: 8px;
    }
    .chat-friend-avatar {
        width: 32px;
        height: 32px;
    }
    .chat-message-avatar {
        width: 28px;
        height: 28px;
    }
    /* Mobilde yalnızca popup widget başlığındaki metni gizle, liste başlığı metnini göster */
    .chat-widget-header .chat-btn-text {
        display: none !important;
    }
}

.chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

.chat-empty i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.chat-typing {
    display: flex;
    gap: 4px;
    padding: 10px 0;
}

.chat-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typing 1.4s infinite;
}

.chat-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.5;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-10px);
    }
}
/* Message Notification Badge */
.chat-notification-badge {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000001;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInUp 0.3s ease-out;
    backdrop-filter: blur(10px);
}

.chat-widget-toast {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000001;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(100% - 40px);
    max-width: 320px;
    animation: slideInUp 0.25s ease-out;
}

.chat-widget-toast i {
    font-size: 1.1rem;
}

.chat-widget-toast:hover {
    transform: translateY(-1px);
}

.chat-notification-badge i {
    font-size: 1.1rem;
}

.chat-notification-badge:hover {
    background: #8b5cf6;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Chat Lists Panel */
.chat-lists-panel {
    position: fixed;
    top: 84px;
    right: 24px;
    width: min(380px, calc(100vw - 32px));
    height: min(72vh, 520px);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
    display: none;
    flex-direction: column;
    z-index: 1000001;
    border: 1px solid rgba(148, 163, 184, 0.22);
    overflow: hidden;
    backdrop-filter: blur(14px);
    animation: slideUp 0.28s ease-out;
}

.chat-lists-panel.active {
    display: flex;
}

.chat-lists-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(147,51,234,0.09));
    color: var(--text-main);
}

.chat-lists-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.icon-btn:hover {
    background: rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.chat-lists-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.chat-lists-header h3 i {
    color: var(--primary);
    font-size: 1.1rem;
}

.chat-lists-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.chat-lists-header .close-btn {
    background: rgba(15, 23, 42, 0.06);
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    transition: background 0.2s, transform 0.2s;
}

.chat-lists-header .close-btn:hover {
    background: rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
}

.chat-lists-search {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.chat-lists-search input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #f8fafc;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.chat-lists-search input:focus {
    border-color: rgba(99, 102, 241, 0.8);
    background: #f8fafc;
}

.chat-lists-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 18px 0;
    flex-wrap: wrap;
}

.chat-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s, color 0.2s;
}

.chat-action-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.12);
}

.chat-action-warning {
    background: var(--danger);
    color: white;
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.12);
}

.chat-action-secondary {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-main);
}

.chat-action-secondary:hover,
.chat-action-primary:hover,
.chat-action-warning:hover {
    transform: translateY(-1px);
    opacity: 0.95;
}

.chat-lists-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #ffffff;
}

.chat-lists-footer {
    padding: 8px 16px 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    display: grid;
    gap: 6px;
    flex-shrink: 0;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.04);
}

.chat-lists-footer-actions {
    margin-top: 0;
    padding-bottom: 8px;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    margin-bottom: 0;
}

.chat-lists-footer-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.chat-lists-footer input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #f8fafc;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.chat-lists-footer input:focus {
    border-color: rgba(99, 102, 241, 0.8);
    background: #f8fafc;
}

.chat-lists-footer button {
    border-radius: 16px;
    padding: 14px 16px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.92rem;
}

.chat-lists-footer button:hover {
    opacity: 0.95;
}

.chat-lists-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

.chat-lists-empty i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.55;
}

.chat-friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    position: relative;
}

.chat-friend-item:hover {
    transform: translateY(-1px);
    background: rgba(248, 250, 252, 0.95);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.chat-friend-avatar {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    object-fit: cover;
    flex-shrink: 0;
    border: none;
}

.chat-friend-avatar-wrap {
    position: relative;
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-friend-avatar-wrap.online {
    border: 2px solid rgba(34, 197, 94, 0.28);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.chat-friend-avatar-wrap.offline {
    border: 2px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.08);
}

.chat-friend-avatar-wrap .status-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.chat-friend-avatar-wrap .status-online {
    background: #22c55e;
}

.chat-friend-avatar-wrap .status-offline {
    background: #9ca3af;
}

.chat-friend-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-friend-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0;
    color: var(--text-main);
}

.chat-friend-username,
.chat-friend-status,
.chat-friend-lastmsg {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.3;
}

.chat-friend-lastmsg {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-friend-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 70px;
}

.chat-friend-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.chat-friend-action {
    border: 1px solid rgba(99, 102, 241, 0.18);
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.chat-friend-action i {
    font-size: 0.9rem;
}

.chat-friend-action:hover {
    background: rgba(99, 102, 241, 0.16);
    transform: translateY(-1px);
}

.chat-friend-close {
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.2);
}

.chat-friend-close:hover {
    background: rgba(220, 53, 69, 0.12);
}

.chat-friend-action.has-unread {
    background: var(--danger);
    color: #fff;
    border-color: rgba(239, 68, 68, 0.3);
}

.chat-friend-action.has-unread i {
    color: #fff;
}

.chat-friend-action.has-unread:hover {
    background: #b91c1c;
}

.chat-friend-action.group-conversation-action.has-unread {
    background: var(--danger);
    color: #fff;
}

.chat-friend-action.group-conversation-action.has-unread i {
    color: #fff;
}

.chat-friend-action.group-conversation-action.has-unread:hover {
    background: #b91c1c;
}

.chat-last-sender {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.16);
}

.chat-last-sender strong {
    margin-right: 6px;
    font-weight: 900;
}



@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* image preview modal styles */
#image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10020;
}
#image-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    cursor: zoom-out;
}

/* Dark Mode Styles for Chat Friends Section */
body.dark-mode .chat-widget-container,
body.dark-mode .chat-lists-panel {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .chat-widget-messages,
body.dark-mode .chat-lists-content,
body.dark-mode .chat-lists-search input,
body.dark-mode .chat-lists-footer input {
    background: rgba(255, 255, 255, 0.04);
}

body.dark-mode .chat-friend-item {
    background: rgba(148, 163, 184, 0.1);
}

body.dark-mode .chat-friend-item:hover {
    background: rgba(99, 102, 241, 0.14);
}

body.dark-mode .chat-friend-name {
    color: var(--text-main);
}

body.dark-mode .chat-friend-username {
    color: var(--text-muted);
    opacity: 1;
}

body.sohbet-pg .chat-page-shell {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
    min-height: calc(100vh - 260px);
}

body.sohbet-pg .chat-lists-panel,
body.sohbet-pg .chat-widget-container {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    display: flex !important;
    border-radius: 24px !important;
    box-shadow: 0 20px 46px rgba(15, 23, 42, 0.12);
}

body.sohbet-pg .chat-lists-panel {
    z-index: 2 !important;
}

body.sohbet-pg .chat-widget-container {
    z-index: 1 !important;
}

body.sohbet-pg .chat-lists-panel .close-btn {
    display: none !important;
}

/* ����������������������������������������� */
/* Sohbet Sayfas� Widget Responsive Styles */
/* ����������������������������������������� */
body.sohbet-pg .chat-widget-container {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    border-radius: 16px !important;
    z-index: 5 !important;
    box-shadow: none !important;
    border: none !important;
    animation: none !important;
    background: var(--card-bg, #f8fafc) !important;
    display: flex !important;
    flex-direction: column;
    padding: 0 !important;
    gap: 0 !important;
    top: auto !important;
    right: auto !important;
}

body.sohbet-pg .chat-widget-container.active {
    display: flex !important;
}

body.sohbet-pg .chat-widget-header {
    flex-shrink: 0;
    min-height: 70px;
}

body.sohbet-pg .chat-widget-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

body.sohbet-pg .chat-widget-input {
    flex-shrink: 0;
    min-height: 72px;
}

body.sohbet-pg #chat-back-btn i::before { content: "\f00d"; }
body.sohbet-pg #chat-back-btn { border-radius: 50%; }

@media (max-width: 1100px) {
    body.sohbet-pg .chat-page-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}
