/* START social.css */

/* Subtabs */
.social-subtabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.social-subtab {
    flex: 1;
    padding: 8px 10px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.social-subtab.active,
.social-subtab:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Chat Channels */
.chat-channels {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}
.chat-chan-btn {
    flex: 1;
    padding: 6px 8px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
    white-space: nowrap;
}
.chat-chan-btn:hover { border-color: var(--primary); color: var(--primary); }
.chat-chan-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Scroll to bottom button */
.chat-scroll-btn {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    z-index: 10;
    transition: opacity 0.2s, transform 0.2s;
    display: none;
}
.chat-scroll-btn:hover { opacity: 0.85; transform: translateX(-50%) scale(1.1); }

/* Global Chat */
.chat-messages {
    height: 280px;
    overflow-y: auto;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.chat-loading,
.chat-status {
    color: #999;
    text-align: center;
    padding: 20px;
    font-size: 13px;
}
.chat-msg {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
    padding: 5px 8px;
    border-radius: 6px;
    background: var(--surface);
    font-size: 13px;
}
.chat-msg-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
    padding: 5px 8px;
    border-radius: 6px;
    background: var(--surface);
    font-size: 13px;
    position: relative;
}
.chat-msg-row.chat-mine {
    background: color-mix(in srgb, var(--primary) 15%, var(--surface));
}
.report-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 1px 3px;
    opacity: 0;
    transition: opacity 0.15s;
    flex-shrink: 0;
    line-height: 1;
    border-radius: 4px;
}
.chat-msg-row:hover .report-icon-btn,
.bubble-wrap:hover .report-icon-btn { opacity: 1; }
.report-icon-btn:hover { opacity: 1 !important; filter: brightness(1.3); }

.chat-msg.chat-mine {
    background: color-mix(in srgb, var(--primary) 15%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
}
.chat-user {
    font-weight: bold;
    color: var(--primary);
    flex-shrink: 0;
}
.chat-user::after { content: ':'; }
.chat-text { flex: 1; color: var(--text); word-break: break-word; }
.chat-time { color: #777; font-size: 11px; flex-shrink: 0; margin-left: auto; }
.chat-input-row {
    display: flex;
    gap: 8px;
}
.chat-input-row .form-input { flex: 1; }

/* Inbox */
.inbox-thread {
    padding: 10px 12px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: border-color 0.2s;
}
.inbox-thread:hover { border-color: var(--primary); }
.inbox-thread.unread { border-color: var(--primary); }
.inbox-from {
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.inbox-preview { color: #999; font-size: 12px; }
.inbox-time { color: #777; font-size: 11px; margin-top: 3px; }
.unread-badge {
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: bold;
}
.social-badge {
    display: none;
    background: #f44336;
    color: #fff;
    border-radius: 10px;
    padding: 1px 5px;
    font-size: 10px;
    vertical-align: top;
    margin-left: 3px;
}

/* Conversation */
.conv-header {
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 15px;
}
.conv-messages {
    height: 260px;
    overflow-y: auto;
    background: var(--background);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Speech Bubbles */
.bubble-wrap {
    display: flex;
    width: 100%;
    margin-bottom: 6px;
}
.bubble-wrap-sent { justify-content: flex-end; }
.bubble-wrap-recv { justify-content: flex-start; }

.bubble-row {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    max-width: 82%;
}
.bubble-col {
    display: flex;
    flex-direction: column;
}
.bubble-sender {
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 3px;
    padding: 0 4px;
}
.read-receipt {
    font-size: 10px;
    color: var(--primary);
    text-align: right;
    padding: 1px 4px;
    margin-top: 2px;
    opacity: 0.8;
}
.msg-del-btn {
    background: none;
    border: none;
    color: #555;
    font-size: 15px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    flex-shrink: 0;
    line-height: 1;
    align-self: flex-end;
    margin-bottom: 6px;
    transition: color 0.15s, background 0.15s;
}
.msg-del-btn:hover { color: #f44336; background: rgba(244,67,54,0.12); }
.conv-date-sep {
    text-align: center;
    color: #666;
    font-size: 11px;
    padding: 10px 0 6px;
    position: relative;
}
.conv-date-sep::before,
.conv-date-sep::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--border);
}
.conv-date-sep::before { left: 0; }
.conv-date-sep::after { right: 0; }

.bubble {
    padding: 8px 12px 6px;
    font-size: 13px;
    word-break: break-word;
    line-height: 1.45;
}
.bubble-sent {
    background: var(--primary);
    color: #fff;
    border-radius: 18px 18px 4px 18px;
}
.bubble-recv {
    background: var(--surface);
    color: var(--text);
    border-radius: 18px 18px 18px 4px;
    border: 1px solid var(--border);
}
.bubble-time {
    font-size: 10px;
    text-align: right;
    margin-top: 3px;
    color: rgba(255,255,255,0.65);
}
.bubble-recv .bubble-time {
    color: #777;
}

.conv-reply-row {
    display: flex;
    gap: 8px;
}
.conv-reply-row .form-input { flex: 1; }

/* Feedback */
.feedback-form {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 16px;
}
.feedback-item {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}
.feedback-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.feedback-type-tag {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}
.type-bug { background: #f44336; color: #fff; }
.type-feedback { background: #2196f3; color: #fff; }
.type-suggestion { background: #4caf50; color: #fff; }
.feedback-item-title { font-weight: bold; color: var(--text); flex: 1; }
.feedback-status-tag {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    text-transform: uppercase;
}
.status-open { background: #ff9800; color: #fff; }
.status-closed { background: #555; color: #ccc; }
.feedback-body { color: #ccc; font-size: 13px; margin-bottom: 6px; }
.feedback-admin-reply {
    background: color-mix(in srgb, var(--primary) 10%, var(--background));
    border-left: 3px solid var(--primary);
    padding: 6px 10px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: var(--text);
}

/* END social.css */
