﻿/* 表情选择器样式 */
.emoji-picker-container {
    position: relative;
    display: inline-block;
}

.emoji-trigger-btn {
    font-size: 1.2rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.emoji-trigger-btn:hover {
    transform: scale(1.1);
}

.emoji-picker-panel {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 0.5rem;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 320px;
    max-height: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 暗黑模式适配 */
[data-bs-theme="dark"] .emoji-picker-panel {
    background: #2b3035;
    border-color: #495057;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.emoji-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}

[data-bs-theme="dark"] .emoji-picker-header {
    background: #212529;
    border-bottom-color: #495057;
}

.emoji-picker-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
}

[data-bs-theme="dark"] .emoji-picker-title {
    color: #adb5bd;
}

.emoji-picker-body {
    padding: 0.75rem;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.25rem;
    max-height: 320px;
}

.emoji-item {
    background: none;
    border: none;
    font-size: 1.5rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.emoji-item:hover {
    background: #e9ecef;
    transform: scale(1.2);
}

[data-bs-theme="dark"] .emoji-item:hover {
    background: #495057;
}

.emoji-item:active {
    transform: scale(1.1);
}

/* 滚动条样式 */
.emoji-picker-body::-webkit-scrollbar {
    width: 6px;
}

.emoji-picker-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

[data-bs-theme="dark"] .emoji-picker-body::-webkit-scrollbar-track {
    background: #2b3035;
}

.emoji-picker-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.emoji-picker-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

[data-bs-theme="dark"] .emoji-picker-body::-webkit-scrollbar-thumb {
    background: #495057;
}

[data-bs-theme="dark"] .emoji-picker-body::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}

/* 响应式调整 */
@media (max-width: 576px) {
    .emoji-picker-panel {
        width: 280px;
        max-height: 350px;
    }

    .emoji-picker-body {
        grid-template-columns: repeat(6, 1fr);
        max-height: 280px;
    }

    .emoji-item {
        font-size: 1.3rem;
        padding: 0.4rem;
    }
}
