/**
 * Loogle+ / VK 2015 Apple Emoji Stylesheet
 * Authentic iOS / VK 2015 emoji appearance and popup picker
 */

/* Apple Emoji Font Family Stack */
@font-face {
    font-family: 'Apple Color Emoji';
    src: local('Apple Color Emoji'), local('Segoe UI Emoji'), local('Noto Color Emoji');
}

.emoji, img.emoji {
    display: inline-block;
    vertical-align: -3px;
    height: 1.25em;
    width: 1.25em;
    margin: 0 0.08em;
    border: 0;
    pointer-events: none;
}

.emoji-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 6px;
    color: #757575;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    user-select: none;
}

.emoji-btn:hover, .emoji-btn.active {
    color: #d14836;
    background: rgba(0, 0, 0, 0.06);
}

/* VK 2015 Classic Apple Emoji Picker Popup */
.emoji-picker-dropdown {
    position: absolute;
    z-index: 10000;
    width: 320px;
    max-width: 90vw;
    background: #ffffff;
    border: 1px solid #d3d9de;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Arial, sans-serif;
    user-select: none;
    animation: emojiPickerFadeIn 0.15s ease-out;
}

[data-theme="dark"] .emoji-picker-dropdown {
    background: #222733;
    border-color: #384252;
    color: #e2e8f0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}

@keyframes emojiPickerFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.emoji-picker-header {
    display: flex;
    background: #f0f2f5;
    border-bottom: 1px solid #e1e5e8;
    padding: 4px 6px;
    gap: 2px;
}

[data-theme="dark"] .emoji-picker-header {
    background: #181d27;
    border-bottom-color: #2e384d;
}

.emoji-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 6px 0;
    font-size: 15px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #65676b;
    transition: background 0.1s;
}

.emoji-tab-btn:hover {
    background: #e4e6eb;
}

[data-theme="dark"] .emoji-tab-btn:hover {
    background: #2b3342;
}

.emoji-tab-btn.active {
    background: #ffffff;
    color: #dc4437;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

[data-theme="dark"] .emoji-tab-btn.active {
    background: #2a3242;
    color: #ff6b5e;
}

.emoji-picker-body {
    height: 220px;
    overflow-y: auto;
    padding: 8px 6px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    justify-items: center;
    align-items: center;
}

.emoji-item {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    transition: transform 0.1s, background 0.1s;
}

.emoji-item:hover {
    background: #e9ecf0;
    transform: scale(1.2);
}

[data-theme="dark"] .emoji-item:hover {
    background: #333d4f;
}

.emoji-item img {
    width: 24px;
    height: 24px;
    pointer-events: none;
}
