/* ================================================================
   effects.css — Visual effect engine overlay + effect picker popup
   ================================================================ */

/* ── Canvas Overlay ─────────────────────────────────────────── */
.sh-effect-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 1049;
    pointer-events: none;
}

/* ── Effect Button (next to gift btn) ───────────────────────── */
.sh-effect-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background .15s;
    line-height: 1;
}
.sh-effect-btn:hover { background: rgba(99,102,241,.1); }

/* ── Effect Picker (sticker-picker style popup) ─────────────── */
.efp-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    max-height: 280px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, rgba(0,0,0,.08));
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,.15);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
    animation: efpSlideUp .15s ease;
}

.efp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border, rgba(0,0,0,.06));
    flex-shrink: 0;
}
.efp-title { font: 600 12px/1 'Be Vietnam Pro', sans-serif; color: var(--text, #1e293b); }
.efp-balance { font: 600 11px/1 'Be Vietnam Pro', sans-serif; color: #f59e0b; }

.efp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 6px;
    padding: 8px 10px;
    overflow-y: auto;
    flex: 1;
}

.efp-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    border-radius: 10px;
    border: 1.5px solid var(--border, rgba(0,0,0,.06));
    background: var(--bg2, #f8fafc);
    cursor: pointer;
    transition: transform .1s, background .1s, box-shadow .1s;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.efp-item:hover { background: rgba(99,102,241,.06); transform: scale(1.05); }
.efp-item:active { transform: scale(0.92); }
.efp-item.disabled { opacity: .35; cursor: not-allowed; }
.efp-item.disabled:hover { transform: none; background: var(--bg2, #f8fafc); }

/* Tier borders */
.efp-item[data-tier="rare"] { border-color: rgba(59,130,246,.3); }
.efp-item[data-tier="epic"] { border-color: rgba(168,85,247,.3); box-shadow: 0 0 8px rgba(168,85,247,.1); }
.efp-item[data-tier="legendary"] { border-color: rgba(245,158,11,.4); box-shadow: 0 0 10px rgba(245,158,11,.15); }

.efp-icon { font-size: 24px; line-height: 1; }
.efp-price { font: 600 10px/1 'Be Vietnam Pro', sans-serif; color: var(--muted, #94a3b8); }

/* Combo badge */
.efp-combo {
    position: absolute;
    top: -4px; right: -4px;
    background: #ef4444;
    color: #fff;
    font: 700 9px/1 'Be Vietnam Pro', sans-serif;
    padding: 2px 4px;
    border-radius: 6px;
    min-width: 18px;
    text-align: center;
    animation: efpComboPop .2s ease;
}

/* ── Top Spender Highlight ──────────────────────────────────── */
.chat-item.sh-top-spender {
    background: linear-gradient(90deg, rgba(251,191,36,.08), transparent) !important;
    border-left-color: #f59e0b !important;
}
.sh-top-spender-badge {
    display: inline-block;
    font: 600 9px/1 'Be Vietnam Pro', sans-serif;
    color: #f59e0b;
    background: rgba(251,191,36,.12);
    padding: 1px 5px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes efpSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes efpComboPop {
    0% { transform: scale(0.5); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .efp-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 4px; padding: 6px 8px; }
    .efp-item { padding: 6px 3px; }
    .efp-icon { font-size: 20px; }
}
