/* Cyberpunk Full Emoji Reaction Palette Dock */
.reaction-picker-container {
position: relative;
display: inline-flex;
}

.reaction-picker-popover,
.admin-reaction-popover {
position: absolute;
bottom: calc(100% + 4px);
top: auto;
right: 0;
background: rgba(12, 6, 24, 0.98);
border: 1.5px solid rgba(168, 85, 247, 0.65);
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.95), 0 0 25px rgba(168, 85, 247, 0.4);
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
border-radius: 18px;
padding: 8px;
display: flex;
flex-direction: column;
gap: 6px;
z-index: 1000;
animation: reactionPopIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
width: 310px;
max-width: 90vw;
font-family: ui-monospace, monospace;
}

.admin-reaction-popover {
position: fixed;
bottom: auto;
right: auto;
top: auto;
left: auto;
}

.msg-incoming .reaction-picker-popover {
left: 0;
right: auto;
}

/* Invisible hover bridge to prevent losing hover when moving mouse from dock to popover */
.reaction-picker-popover::after {
content: '';
position: absolute;
top: 100%;
bottom: auto;
left: 0;
right: 0;
height: 16px;
background: transparent;
pointer-events: auto;
}

@keyframes reactionPopIn {
from { opacity: 0; transform: translateY(8px) scale(0.92); }
to { opacity: 1; transform: translateY(0) scale(1); }
}

.reaction-quick-row {
display: flex;
align-items: center;
gap: 3px;
overflow-x: auto;
padding-bottom: 4px;
scrollbar-width: none;
border-bottom: 1px solid rgba(168, 85, 247, 0.25);
}
.reaction-quick-row::-webkit-scrollbar { display: none; }

.reaction-search-bar {
display: flex;
align-items: center;
gap: 6px;
background: rgba(20, 10, 40, 0.92);
border: 1px solid rgba(168, 85, 247, 0.4);
border-radius: 10px;
padding: 4px 8px;
}

.reaction-search-input {
background: transparent;
border: none;
outline: none;
color: #ffffff;
font-size: 0.78rem;
font-family: inherit;
width: 100%;
caret-color: #34d399;
}
.reaction-search-input::placeholder {
color: rgba(192, 132, 252, 0.4);
}

.reaction-categories-bar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 2px;
padding: 2px 0;
border-bottom: 1px solid rgba(168, 85, 247, 0.2);
}

.reaction-cat-btn {
background: transparent;
border: none;
font-size: 0.95rem;
padding: 2px 4px;
border-radius: 6px;
cursor: pointer;
opacity: 0.6;
transition: all 0.15s ease;
user-select: none;
}
.reaction-cat-btn:hover, .reaction-cat-btn.active {
opacity: 1;
background: rgba(168, 85, 247, 0.25);
transform: scale(1.15);
}

.reaction-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 3px;
max-height: 160px;
overflow-y: auto;
padding: 2px;
scrollbar-width: thin;
}

.reaction-emoji-btn {
background: transparent;
border: none;
font-size: 1.25rem;
line-height: 1;
padding: 4px 2px;
border-radius: 8px;
cursor: pointer;
transition: transform 0.15s ease, background 0.15s ease;
user-select: none;
display: inline-flex;
align-items: center;
justify-content: center;
}

.reaction-emoji-btn:hover {
transform: scale(1.35) translateY(-2px);
background: rgba(168, 85, 247, 0.3);
filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.8));
}

.reaction-emoji-btn:active {
transform: scale(1.05);
}

/* Omnibox Emoji Autocomplete HUD */
.emoji-autocomplete-popup {
position: absolute;
bottom: calc(100% + 12px);
left: 0;
width: 100%;
max-width: 380px;
background: rgba(12, 6, 24, 0.97);
border: 1px solid rgba(168, 85, 247, 0.5);
border-radius: 14px;
box-shadow: 0 0 35px rgba(0, 0, 0, 0.9), 0 0 20px rgba(168, 85, 247, 0.3);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
padding: 6px;
z-index: 500;
display: flex;
flex-direction: column;
gap: 2px;
max-height: 220px;
overflow-y: auto;
font-family: ui-monospace, monospace;
}

.emoji-autocomplete-popup.hidden {
display: none;
}

.emoji-autocomplete-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 12px;
border-radius: 8px;
cursor: pointer;
color: #e9d5ff;
font-size: 0.85rem;
transition: all 0.15s ease;
user-select: none;
}

.emoji-autocomplete-item.active,
.emoji-autocomplete-item:hover {
background: rgba(52, 211, 153, 0.18);
color: #34d399;
border-left: 2px solid #34d399;
}

.emoji-item-glyph {
font-size: 1.15rem;
margin-right: 8px;
}

.emoji-item-shortcode {
font-weight: 600;
flex: 1;
}

.emoji-item-desc {
font-size: 0.72rem;
color: rgba(233, 213, 255, 0.5);
}


/* ─── 2. Ephemeral Burn Timer Controls & Badges (#2) ─── */
.burn-btn {
background: transparent;
border: 1px solid transparent;
outline: none;
cursor: pointer;
height: 34px;
width: 34px;
min-width: 34px;
padding: 0;
border-radius: 9999px;
display: flex;
align-items: center;
justify-content: center;
gap: 4px;
font-family: ui-monospace, monospace;
font-size: 0.75rem;
font-weight: 700;
color: rgba(192, 132, 252, 0.6);
transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
flex-shrink: 0;
}

.burn-btn-icon {
display: inline-flex;
align-items: center;
justify-content: center;
line-height: 1;
}

.burn-btn:hover {
color: #fbbf24;
background: rgba(251, 191, 36, 0.12);
transform: scale(1.06);
filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.8));
}

.burn-btn.active {
width: auto;
padding: 0 8px;
color: #f97316;
background: rgba(249, 115, 22, 0.18);
border: 1px solid rgba(249, 115, 22, 0.5);
box-shadow: 0 0 12px rgba(249, 115, 22, 0.5);
text-shadow: 0 0 8px rgba(249, 115, 22, 0.8);
}

.burn-badge {
display: inline-flex;
align-items: center;
gap: 3px;
font-size: 0.7rem;
font-family: ui-monospace, monospace;
font-weight: 700;
color: #f97316;
padding: 1px 6px;
border-radius: 6px;
background: rgba(249, 115, 22, 0.15);
border: 1px solid rgba(249, 115, 22, 0.4);
margin-left: 6px;
}

/* Temporary Message Timer Popover */
.burn-timer-popover {
position: absolute;
bottom: calc(100% + 14px);
right: 12px;
width: 320px;
max-width: calc(100vw - 32px);
background: rgba(14, 8, 28, 0.96);
backdrop-filter: blur(24px);
-webkit-backdrop-filter: blur(24px);
border: 1px solid rgba(249, 115, 22, 0.55);
border-radius: 16px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(249, 115, 22, 0.25);
padding: 14px 16px;
z-index: 100;
display: flex;
flex-direction: column;
gap: 10px;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
animation: msg-appear 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.burn-timer-popover.hidden {
display: none !important;
}

.burn-popover-header {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid rgba(249, 115, 22, 0.2);
padding-bottom: 8px;
}

.burn-popover-title {
font-size: 0.82rem;
font-weight: 700;
color: #fb923c;
letter-spacing: 0.04em;
display: flex;
align-items: center;
gap: 6px;
}

.burn-popover-status {
font-size: 0.74rem;
padding: 6px 10px;
border-radius: 8px;
background: rgba(249, 115, 22, 0.12);
border: 1px solid rgba(249, 115, 22, 0.3);
color: #fed7aa;
display: flex;
align-items: center;
justify-content: space-between;
}

.burn-custom-box {
display: flex;
flex-direction: column;
gap: 6px;
}

.burn-custom-label {
font-size: 0.7rem;
font-weight: 600;
color: rgba(254, 215, 170, 0.85);
letter-spacing: 0.04em;
}

.burn-custom-row {
display: flex;
align-items: center;
gap: 6px;
}

.burn-custom-input {
width: 64px;
background: rgba(8, 4, 18, 0.9);
border: 1px solid rgba(249, 115, 22, 0.4);
border-radius: 8px;
padding: 6px 8px;
color: #ffffff;
font-family: inherit;
font-size: 0.82rem;
font-weight: 600;
outline: none;
text-align: center;
-moz-appearance: textfield;
appearance: textfield;
}

.burn-custom-input::-webkit-inner-spin-button,
.burn-custom-input::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}

.burn-custom-input:focus {
border-color: #f97316;
box-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
}

.burn-custom-unit {
background: rgba(8, 4, 18, 0.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f97316' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: 1px solid rgba(249, 115, 22, 0.4);
border-radius: 8px;
padding: 6px 28px 6px 10px;
color: #fed7aa;
font-family: inherit;
font-size: 0.78rem;
outline: none;
cursor: pointer;
flex: 1;
transition: border-color 0.2s, box-shadow 0.2s;
}

.burn-custom-unit:focus {
border-color: #f97316;
box-shadow: 0 0 10px rgba(249, 115, 22, 0.4);
}

.burn-custom-set-btn {
background: #f97316;
border: 1px solid #ea580c;
border-radius: 8px;
color: #000000;
font-family: inherit;
font-size: 0.78rem;
font-weight: 700;
padding: 6px 14px;
cursor: pointer;
transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
box-shadow: 0 0 12px rgba(249, 115, 22, 0.35);
}

.burn-custom-set-btn:hover {
background: #fb923c;
transform: translateY(-1px);
box-shadow: 0 0 18px rgba(249, 115, 22, 0.6);
}

.burn-custom-set-btn:active {
transform: translateY(0) scale(0.96);
}

.burn-custom-set-btn:hover {
background: #fb923c;
box-shadow: 0 0 12px rgba(249, 115, 22, 0.8);
transform: translateY(-1px);
}

.burn-shortcuts-row {
display: flex;
align-items: center;
gap: 5px;
padding-top: 4px;
border-top: 1px solid rgba(249, 115, 22, 0.15);
}

.burn-shortcut-btn {
background: rgba(20, 10, 36, 0.85);
border: 1px solid rgba(168, 85, 247, 0.25);
border-radius: 6px;
color: #e9d5ff;
font-size: 0.72rem;
font-weight: 600;
padding: 4px 6px;
cursor: pointer;
transition: all 0.15s ease;
font-family: inherit;
flex: 1;
text-align: center;
white-space: nowrap;
}

.burn-shortcut-btn:hover {
background: rgba(249, 115, 22, 0.25);
border-color: #f97316;
color: #ffedd5;
}


/* ─── 6. Matrix Rain Canvas & Slash Autocomplete ─── */
#matrix-canvas {
position: fixed;
inset: 0;
z-index: 1;
pointer-events: none;
opacity: 0.45;
transition: opacity 0.5s ease;
}
#matrix-canvas.hidden { display: none !important; }

.slash-autocomplete-popup {
position: absolute;
bottom: calc(100% + 12px);
left: 0;
width: 100%;
max-width: 380px;
background: rgba(12, 6, 24, 0.97);
border: 1px solid rgba(168, 85, 247, 0.5);
border-radius: 14px;
box-shadow: 0 0 35px rgba(0, 0, 0, 0.9), 0 0 20px rgba(168, 85, 247, 0.3);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
padding: 6px;
z-index: 500;
display: flex;
flex-direction: column;
gap: 2px;
max-height: 220px;
overflow-y: auto;
font-family: ui-monospace, monospace;
}
.slash-autocomplete-popup.hidden { display: none !important; }
.slash-autocomplete-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 12px;
border-radius: 8px;
cursor: pointer;
color: #e9d5ff;
font-size: 0.85rem;
transition: all 0.15s ease;
user-select: none;
}
.slash-autocomplete-item.active,
.slash-autocomplete-item:hover {
background: rgba(52, 211, 153, 0.18);
color: #34d399;
border-left: 2px solid #34d399;
}
.slash-item-cmd {
font-weight: 700;
color: #34d399;
margin-right: 8px;
}
.slash-item-desc {
font-size: 0.72rem;
color: rgba(233, 213, 255, 0.6);
}
