/* ═══════════════════════════════════════════════════════════════
   Kamii — Discord message previews (shared)
   Mock Discord channel + messages: the panel's live previews and the
   homepage tour. Markup: templates/_discord_preview.html (+ the
   renderV2Container() output in panel.html for .dc-* components).
   ═══════════════════════════════════════════════════════════════ */

/* ── Discord embed preview ────────────────────────────────────────────────
   Kept as Discord's own native dark-mode colors on purpose — this widget
   mimics a real Discord message and should not follow the sakura palette.
   ──────────────────────────────────────────────────────────────────────── */
.discord-window {
    background: #313338;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.discord-topbar {
    background: #2b2d31;
    padding: 9px 14px;
    border-bottom: 1px solid rgba(0,0,0,0.25);
}

.discord-channel-name {
    font-size: 13px;
    font-weight: 600;
    color: #e0e0e0;
}

.discord-messages { padding: 14px; }

.discord-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.discord-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
}

.discord-message-body { flex: 1; min-width: 0; }

.discord-message-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

.discord-bot-name { font-size: 14px; font-weight: 600; color: #e0e0e0; }

.discord-bot-tag {
    font-size: 9px;
    font-weight: 700;
    background: #5865f2;
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    letter-spacing: 0.03em;
}

.discord-timestamp { font-size: 11px; color: #949ba4; } /* Discord's own timestamp grey (was #555, ~2:1) */

.discord-embed {
    display: flex;
    background: #2b2d31;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
    max-width: 360px;
}

.embed-accent {
    width: 4px;
    flex-shrink: 0;
    border-radius: 4px 0 0 4px;
    transition: background 0.2s;
}

.embed-content { padding: 10px 12px; flex: 1; min-width: 0; }

.embed-title {
    font-size: 14px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 5px;
    word-break: break-word;
    text-align: left;
}

.embed-description {
    font-size: 13px;
    color: #b5bac1;
    line-height: 1.5;
    word-break: break-word;
    white-space: pre-wrap;
    text-align: left;
}

.embed-footer {
    font-size: 11px;
    color: #72767d;
    margin-top: 8px;
    text-align: left;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 7px;
}

/* ── Discord Components V2 preview ────────────────────────────────────────
   What Kamii actually sends now: a Container (rounded box, optional accent
   strip on the left) holding TextDisplays, Sections, Separators and
   ActionRows. Filled in by renderV2Container() in panel.html. Same rule as
   above — native Discord dark-mode colors, not the sakura palette.
   ──────────────────────────────────────────────────────────────────────── */
.dc-container {
    --dc-accent: transparent;
    position: relative;
    margin-top: 4px;
    max-width: 440px;
    padding: 14px 16px;
    background: #2b2d31;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    line-height: 1.375;
    color: #dbdee1;
    text-align: left;
    word-break: break-word;
}

.dc-container::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--dc-accent);
    transition: background 0.2s;
}

.dc-text { min-width: 0; }

.dc-h { font-weight: 700; color: #f2f3f5; line-height: 1.375; margin: 8px 0 4px; }
.dc-h:first-child { margin-top: 0; }
.dc-h1 { font-size: 1.5em; }
.dc-h2 { font-size: 1.25em; }
.dc-h3 { font-size: 1em; }

.dc-subtext { font-size: 0.8125em; color: #949ba4; }

.dc-li { position: relative; padding-left: 16px; }
.dc-li::before { content: "•"; position: absolute; left: 4px; }

.dc-quote {
    margin: 2px 0;
    padding: 0 8px 0 12px;
    box-shadow: inset 4px 0 0 #4e5058;
    border-radius: 2px;
}

.dc-code {
    font-family: Consolas, "Andale Mono", "Courier New", monospace;
    font-size: 0.85em;
    background: #1e1f22;
    border: 1px solid #111214;
    border-radius: 4px;
    padding: 0 0.2em;
}

.dc-emoji {
    width: 1.375em;
    height: 1.375em;
    object-fit: contain;
    vertical-align: bottom;
}

.dc-mention {
    color: #c9cdfb;
    background: rgba(88,101,242,0.3);
    border-radius: 3px;
    padding: 0 2px;
    font-weight: 500;
}

.dc-spoiler { background: #1e1f22; color: transparent; border-radius: 3px; }

.dc-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dc-section-body { flex: 1; min-width: 0; }
.dc-accessory { flex-shrink: 0; }

.dc-sep--small { margin: 0; }
.dc-sep--large { margin: 8px 0; }
.dc-sep--divider { height: 1px; background: rgba(255,255,255,0.1); }

.dc-row { display: flex; flex-wrap: wrap; gap: 8px; }

.dc-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 2px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: #4e5058;
    white-space: nowrap;
    cursor: default;
    user-select: none;
}

.dc-button--primary   { background: #5865f2; }
.dc-button--success   { background: #248046; }
.dc-button--danger    { background: #da373c; }

.dc-select {
    box-sizing: border-box;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    background: #1e1f22;
    border: 1px solid #1e1f22;
    border-radius: 8px;
    color: #949ba4;
    font-size: 14px;
    cursor: default;
    user-select: none;
}

.dc-select-placeholder { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-select-chevron { flex-shrink: 0; width: 18px; height: 18px; color: #dbdee1; }

/* ── Discord plain message (sticky note preview) ──────────────── */
.dc-plain {
    font-size: 14px;
    line-height: 1.375;
    color: #dbdee1;
    text-align: left;
    word-break: break-word;
}
