/* ============================================================
   SONORA v19 Styles:
   - Official Logo/Banner Integration
   - Premium Boost Hero Modal + Bulk Quantity Stepper (No Emojis)
   - Unified Context-Sidebar DM List + Flat Discord-Style DM Stream
   - Chat Date Dividers (Bugün/Dün) + Rich Markdown Headings
   - Standard + Server Emoji Picker Hover Bar
   - Voice Local-Muted & Server-Muted Indicators + Custom Status
   ============================================================ */

/* OFFICIAL BRAND LOGO */
.brand-mark-img {
    width: 36px; height: 36px; border-radius: 12px; object-fit: cover;
    display: block; box-shadow: 0 4px 14px rgba(124, 58, 237, .35);
}
.rail-home-btn.has-brand-logo { padding: 0; overflow: hidden; background: #0f1022; }
.rail-home-btn.has-brand-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }

/* UNIFIED CONTEXT-SIDEBAR DM LIST (ELIMINATES 3RD SIDEBAR) */
.ctx-dm-divider { height: 1px; background: var(--md-outline-variant); margin: 12px 10px 8px; opacity: .7; }
.ctx-dm-section { display: flex; flex-direction: column; gap: 4px; padding: 0 6px 10px; }
.ctx-dm-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 2px 8px 4px; font-size: 11px; font-weight: 800; letter-spacing: .07em;
    color: var(--md-on-surface-variant); text-transform: uppercase;
}
.ctx-dm-add-row {
    display: flex; align-items: center; gap: 4px; padding: 0 4px 6px;
}
.ctx-dm-add-row .m3-input {
    height: 32px; font-size: 12px; padding: 0 10px; border-radius: 10px;
}
.ctx-dm-list { display: flex; flex-direction: column; gap: 2px; }
.ctx-dm-list .dm-peer-item {
    padding: 7px 8px; border-radius: 11px; gap: 9px;
}
.ctx-dm-list .dm-peer-name { font-size: 13px; }
.ctx-dm-list .dm-peer-preview { font-size: 11.5px; }

/* FULL-WIDTH DM WORKSPACE WITHOUT 3RD SIDEBAR */
.dm-workspace.dm-unified-stage {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column;
    height: 100%;
    width: 100%;
}
.dm-workspace.dm-unified-stage .dm-thread-panel {
    width: 100%; height: 100%; flex: 1; min-width: 0;
}

/* FLAT DISCORD-STYLE DM MESSAGE STREAM (NO WHATSAPP BUBBLES) */
.dm-messages-scroll {
    padding: 16px 0 18px !important;
    gap: 2px !important;
}
.dm-flat-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 6px 24px 6px 20px;
    transition: background .12s ease;
}
.dm-flat-row.is-continuation { padding-top: 2px; padding-bottom: 2px; }
.dm-flat-row:hover { background: rgba(255, 255, 255, .035); }
.dm-flat-av { width: 38px; flex-shrink: 0; cursor: pointer; padding-top: 2px; }
.dm-flat-gutter {
    width: 38px; flex-shrink: 0; text-align: right; font-size: 10.5px;
    color: var(--md-on-surface-variant); opacity: 0; padding-top: 4px;
    font-family: 'JetBrains Mono', monospace; user-select: none;
}
.dm-flat-row:hover .dm-flat-gutter { opacity: .75; }
.dm-flat-body { flex: 1; min-width: 0; }
.dm-flat-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; flex-wrap: wrap; }
.dm-flat-head strong { font-size: 14.5px; font-weight: 700; cursor: pointer; }
.dm-flat-head strong:hover { text-decoration: underline; }
.dm-flat-time { font-size: 11px; color: var(--md-on-surface-variant); display: inline-flex; align-items: center; gap: 3px; }
.dm-flat-text {
    font-size: 14.2px; line-height: 1.52; color: var(--md-on-surface);
    word-break: break-word; overflow-wrap: anywhere;
}
.dm-flat-actions {
    position: absolute; top: 4px; right: 16px; opacity: 0; transition: opacity .12s;
    background: var(--md-surface-container-high); border: 1px solid var(--md-outline-variant);
    border-radius: 9px; padding: 2px; display: flex; gap: 2px;
}
.dm-flat-row:hover .dm-flat-actions { opacity: 1; }

/* CHAT & DM DATE DIVIDERS (BUGÜN / DÜN) */
.chat-date-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 16px 20px 10px; user-select: none;
}
.chat-date-divider::before, .chat-date-divider::after {
    content: ""; flex: 1; height: 1px; background: var(--md-outline-variant); opacity: .7;
}
.chat-date-divider span {
    font-size: 11.5px; font-weight: 700; color: var(--md-on-surface-variant);
    padding: 3px 10px; border-radius: 999px;
    background: var(--md-surface-container); border: 1px solid var(--md-outline-variant);
}
.chat-load-older-bar {
    text-align: center; padding: 8px; font-size: 12px; color: var(--md-on-surface-variant);
    display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* RICH MARKDOWN HEADINGS & INLINE CODE */
.chat-md-h1 {
    font-size: 22px; font-weight: 800; line-height: 1.25; letter-spacing: .02em;
    text-transform: uppercase; margin: 4px 0 3px; color: var(--md-on-surface);
}
.chat-md-h2 {
    font-size: 18px; font-weight: 800; line-height: 1.3; letter-spacing: .015em;
    text-transform: uppercase; margin: 3px 0 2px; color: var(--md-on-surface);
}
.chat-md-h3 {
    font-size: 15px; font-weight: 800; line-height: 1.35; letter-spacing: .01em;
    text-transform: uppercase; margin: 2px 0; color: var(--md-on-surface);
}
.chat-md-code {
    font-family: 'JetBrains Mono', monospace; font-size: 12.5px;
    padding: 1px 6px; border-radius: 6px;
    background: rgba(124, 155, 255, .14); border: 1px solid rgba(124, 155, 255, .24);
}
.std-inline-emoji {
    display: inline-block; font-size: 1.25em; line-height: 1; vertical-align: -2px; cursor: default;
}

/* STANDARD EMOJI PICKER ITEMS & HOVER PREVIEW FOOTER */
.ep2-cat-title {
    grid-column: 1 / -1; font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
    text-transform: uppercase; color: var(--md-on-surface-variant);
    padding: 6px 4px 2px;
}
.ep2-std-btn {
    height: 36px; border-radius: 9px; border: none; background: transparent;
    font-size: 21px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: transform .12s, background .12s;
}
.ep2-std-btn:hover { background: var(--md-surface-container-high); transform: scale(1.16); }
.ep2-preview-foot {
    border-top: 1px solid var(--md-outline-variant);
    padding: 7px 12px; display: flex; align-items: center; gap: 9px;
    background: var(--md-surface-container); min-height: 38px;
}
.ep2-preview-foot .mono { font-size: 12px; font-weight: 700; color: var(--md-primary); }

/* PREMIUM DISCORD-GRADE BOOST HERO MODAL (v19 OVERHAUL) */
#commBoostDialog { max-width: 960px !important; width: min(960px, 95vw) !important; padding: 0 !important; overflow: hidden !important; background: #100b1d !important; border: 1px solid rgba(236, 72, 153, .28) !important; }
.boost-hero-shell {
    position: relative;
    padding: 34px 32px 30px;
    background:
        radial-gradient(ellipse 68% 48% at 50% 0%, rgba(168, 85, 247, .42), transparent 68%),
        radial-gradient(ellipse 52% 45% at 15% 24%, rgba(236, 72, 153, .24), transparent 62%),
        radial-gradient(ellipse 48% 42% at 88% 22%, rgba(99, 102, 241, .28), transparent 62%),
        linear-gradient(180deg, #1b1130 0%, #110d1e 55%, #0c0d14 100%);
    color: #fff;
    overflow: hidden;
}
.boost-hero-glow-bolt {
    position: absolute; pointer-events: none; opacity: .9;
    filter: drop-shadow(0 0 28px rgba(168, 85, 247, .65));
}
.boost-hero-glow-bolt.left { left: 26px; top: 118px; transform: rotate(-14deg); }
.boost-hero-glow-bolt.right { right: 26px; top: 110px; transform: rotate(16deg) scale(.86); }
.boost-hero-server-pill {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 6px 14px 6px 6px; border-radius: 999px;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(10px);
}
.boost-hero-stats {
    display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
    font-size: 12.5px; color: #e2e8f0; margin-top: 4px;
}
.boost-stat-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 11px; border-radius: 999px;
    background: rgba(168, 85, 247, .16); border: 1px solid rgba(236, 72, 153, .32);
    font-weight: 700; color: #f5d0fe;
}
.boost-stat-chip .ms-icon { font-size: 15px; color: #f472b6; }
.boost-hero-title {
    margin: 14px 0 4px; max-width: 650px;
    font-size: clamp(22px, 3vw, 31px); font-weight: 900; line-height: 1.16;
    letter-spacing: -0.02em; text-transform: uppercase;
    background: linear-gradient(180deg, #ffffff 10%, #e9d5ff 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.boost-qty-bar {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(15, 16, 30, .75); border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 14px; padding: 5px 8px; backdrop-filter: blur(10px);
}
.boost-qty-btn {
    width: 32px; height: 32px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; transition: .12s;
}
.boost-qty-btn:hover { background: rgba(168, 85, 247, .45); border-color: #c084fc; }
.boost-qty-input {
    width: 50px; height: 32px; text-align: center; border: none; background: transparent;
    color: #fff; font-weight: 800; font-size: 16px; font-family: 'JetBrains Mono', monospace;
    outline: none;
}
.boost-qty-input::-webkit-inner-spin-button, .boost-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.btc-pill {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 999px;
    background: rgba(236, 72, 153, .16); border: 1px solid rgba(236, 72, 153, .32); color: #f9a8d4;
}
.btc-pill .ms-icon { font-size: 14px; color: #f472b6; }
.boost-tier-card {
    background: rgba(18, 19, 32, .86) !important;
    border: 1px solid rgba(255, 255, 255, .11) !important;
    backdrop-filter: blur(14px);
    transition: transform .16s ease, border-color .16s ease;
}
.boost-tier-card:hover { transform: translateY(-2px); border-color: rgba(236, 72, 153, .45) !important; }
.boost-tier-card.is-unlocked { border-color: rgba(236, 72, 153, .65) !important; box-shadow: 0 0 24px rgba(236, 72, 153, .15); }
@media (max-width: 780px) { .boost-hero-glow-bolt { display: none; } .boost-hero-shell { padding: 22px 16px; } }

/* SLASH COMMAND BOT AVATAR LOGO */
.slash-bot-av {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px; color: #fff;
}
.slash-bot-av img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* CUSTOM STATUS IN MEMBER RAIL & PROFILE MODAL */
.comm-member-sub.is-combined {
    display: flex; align-items: center; gap: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.comm-member-sub .sub-act { color: #82C9B4; font-weight: 600; flex-shrink: 0; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.comm-member-sub .sub-sep { opacity: .5; flex-shrink: 0; }
.comm-member-sub .sub-cs { color: var(--md-on-surface-variant); overflow: hidden; text-overflow: ellipsis; }
.pm-custom-status-box {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 9px 12px; border-radius: 12px; margin: 8px 0 10px;
    background: var(--md-surface-container-high); border: 1px solid var(--md-outline-variant);
    font-size: 13px; line-height: 1.45; color: var(--md-on-surface); word-break: break-word;
}
.pm-custom-status-box .ms-icon { font-size: 17px; color: var(--md-primary); flex-shrink: 0; margin-top: 2px; }
.dock-status-btn {
    display: flex; align-items: center; gap: 5px; width: 100%;
    padding: 5px 8px; margin-top: 4px; border-radius: 9px;
    border: 1px dashed var(--md-outline-variant); background: transparent;
    color: var(--md-on-surface-variant); font-size: 11.5px; cursor: pointer;
    text-align: left; overflow: hidden; transition: .12s;
}
.dock-status-btn:hover { background: var(--md-surface-container-high); color: var(--md-on-surface); border-style: solid; }
.dock-status-btn span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* VOICE LOCAL-MUTED GREY MIC & SERVER-MUTED RED BADGE */
.voice-tile-ico.is-local-muted {
    background: rgba(148, 163, 184, .22) !important; color: #94a3b8 !important;
    border: 1px solid rgba(148, 163, 184, .45);
}
.voice-tile-ico.is-server-mod {
    background: rgba(239, 68, 68, .26) !important; color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, .55);
}
.comm-voice-mini-ico.is-local-muted { color: #94a3b8 !important; opacity: .95; }
.comm-voice-mini-ico.is-server-mod { color: #ef4444 !important; }

/* VERIFIED BOT CHECKMARK INSIDE BOT BADGE */
.bot-badge.is-verified {
    background: linear-gradient(135deg, #5865F2, #7C3AED);
    display: inline-flex; align-items: center; gap: 2px; padding-left: 4px;
}
.bot-badge.is-verified .ms-icon { font-size: 12px; font-weight: 700; }
