/* ============================================================
   discord.css — Discord chat preview styles
   ============================================================ */

:root {
    --accent:       #5865F2;
    --accent-hover: #4752C4;
}

.download-wrapper { padding: 0; background: #313338; }

.preview-panel {
    background:
        radial-gradient(ellipse at 30% 40%, rgba(88,101,242,0.07) 0%, transparent 60%),
        #0D1117;
}

/* ── Discord card ─────────────────────────────────────────── */
.dc-card {
    display: flex;
    font-family: 'GG Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #313338;
    overflow: hidden;
    transition: width 0.15s;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.dc-sidebar {
    width: 48px;
    min-width: 48px;
    background: #1E1F22;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    gap: 8px;
}
.dc-server-icon {
    width: 40px; height: 40px;
    background: #5865F2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    transition: border-radius 0.15s;
    flex-shrink: 0;
}
.dc-server-icon:hover { border-radius: 14px; }
.dc-sidebar-divider {
    width: 32px;
    height: 2px;
    background: #35363C;
    border-radius: 1px;
    flex-shrink: 0;
}
.dc-channel-icon {
    width: 40px; height: 40px;
    background: #35363C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Main ────────────────────────────────────────────────── */
.dc-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ── Channel header ──────────────────────────────────────── */
.dc-channel-header {
    padding: 0 16px;
    height: 48px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #313338;
    border-bottom: 1px solid #1E1F22;
    flex-shrink: 0;
}
.dc-channel-title {
    display: flex;
    align-items: center;
    gap: 6px;
}
.dc-channel-name-title {
    font-size: 15px;
    font-weight: 700;
    color: #F2F3F5;
}
.dc-channel-topic {
    font-size: 12px;
    color: #949BA4;
    border-left: 1px solid #35363C;
    padding-left: 10px;
    margin-left: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Chat ────────────────────────────────────────────────── */
.dc-chat {
    flex: 1;
    min-height: 280px;
    padding: 16px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

/* ── Date divider ────────────────────────────────────────── */
.dc-date-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 16px;
}
.dc-date-divider::before,
.dc-date-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #3F4147;
}
.dc-date-chip {
    font-size: 11px;
    font-weight: 600;
    color: #949BA4;
    white-space: nowrap;
}

/* ── Messages ────────────────────────────────────────────── */
.dc-msg-group {
    display: flex;
    gap: 16px;
    padding: 2px 0;
    margin-bottom: 4px;
}
.dc-msg-group:hover { background: rgba(0,0,0,0.06); border-radius: 4px; }

.dc-msg-avatar-col { width: 40px; flex-shrink: 0; }
.dc-msg-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 2px;
}
.dc-msg-avatar-spacer { width: 40px; }

.dc-msg-content { flex: 1; min-width: 0; }
.dc-msg-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 2px;
}
.dc-msg-username {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}
.dc-msg-timestamp {
    font-size: 11px;
    color: #949BA4;
}
.dc-msg-text {
    font-size: 15px;
    color: #DBDEE1;
    line-height: 1.375;
    word-break: break-word;
    white-space: pre-wrap;
}

/* Continuation message (same user, no avatar/header) */
.dc-msg-cont {
    display: flex;
    gap: 16px;
    padding: 1px 0;
}
.dc-msg-cont:hover { background: rgba(0,0,0,0.06); border-radius: 4px; }
.dc-msg-cont-time {
    width: 40px;
    text-align: right;
    font-size: 10px;
    color: #949BA4;
    padding-top: 2px;
    flex-shrink: 0;
    opacity: 0;
}
.dc-msg-cont:hover .dc-msg-cont-time { opacity: 1; }
.dc-msg-cont-text {
    flex: 1;
    font-size: 15px;
    color: #DBDEE1;
    line-height: 1.375;
    word-break: break-word;
    white-space: pre-wrap;
}

/* ── Input bar ───────────────────────────────────────────── */
.dc-input-bar {
    display: flex;
    align-items: center;
    margin: 0 16px 16px;
    background: #383A40;
    border-radius: 8px;
    padding: 10px 14px;
    gap: 10px;
}
.dc-input-field {
    flex: 1;
    font-size: 15px;
    color: #4E5058;
    font-family: inherit;
}
.dc-input-icons {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

/* ── Message editor controls ─────────────────────────────── */
.msg-list { display: flex; flex-direction: column; gap: 10px; }
.msg-ctrl-card {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.msg-ctrl-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.msg-ctrl-btns { display: flex; gap: 4px; }
.msg-ctrl-btn {
    width: 24px; height: 24px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 11px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.msg-ctrl-btn.delete-btn:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.msg-ctrl-textarea {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 6px 8px;
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
}
.msg-ctrl-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.msg-ctrl-row label { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.msg-ctrl-row input[type="text"],
.msg-ctrl-row input[type="time"],
.msg-ctrl-row select {
    flex: 1;
    min-width: 80px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: 4px 8px;
    color: var(--text);
    font-size: 12px;
    font-family: inherit;
}
.add-msg-btn {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px dashed var(--input-border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, color 0.15s;
}
.add-msg-btn:hover { border-color: #5865F2; color: #5865F2; }
.range-value { font-size: 12px; color: var(--text-muted); text-align: right; }
.prefix-input { display: flex; align-items: center; }
.input-prefix {
    padding: 0 6px 0 10px;
    color: var(--text-muted);
    font-size: 14px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    height: 36px;
    display: flex;
    align-items: center;
}
.prefix-input input { border-radius: 0 8px 8px 0 !important; }
