/* Rich Emoji Picker Styles - COMPACT VERSION (30% smaller) */
/* Picker is appended to body with fixed positioning */

/* Enhanced Emoji Picker Container - REDUCED SIZE */
.rich-emoji-picker {
    position: fixed !important;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px; /* Reduced from 12px */
    padding: 8px; /* Reduced from 12px */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    max-width: 224px; /* Reduced from 320px (30% smaller) */
    max-height: 280px; /* Reduced from 400px (30% smaller) */
    overflow-y: auto;
    display: none;
    z-index: 999999 !important;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.rich-emoji-picker.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) !important;
}

/* Category tabs - REDUCED SIZE */
.emoji-categories {
    display: flex;
    gap: 5px; /* Reduced from 8px */
    padding-bottom: 7px; /* Reduced from 10px */
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 7px; /* Reduced from 10px */
    overflow-x: auto;
    scrollbar-width: thin;
}

.emoji-category-tab {
    padding: 5px 8px; /* Reduced from 8px 12px */
    background: #f8f8f8;
    border: none;
    border-radius: 6px; /* Reduced from 8px */
    cursor: pointer;
    font-size: 13px; /* Reduced from 18px (27% smaller) */
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.emoji-category-tab:hover {
    background: #e8e8e8;
    transform: scale(1.05);
}

.emoji-category-tab.active {
    background: #007bff;
    color: white;
}

/* Search box - REDUCED SIZE */
.emoji-search {
    width: 100%;
    padding: 5px 8px; /* Reduced from 8px 12px */
    border: 1px solid #ddd;
    border-radius: 6px; /* Reduced from 8px */
    margin-bottom: 7px; /* Reduced from 10px */
    font-size: 10px; /* Reduced from 14px (28% smaller) */
    box-sizing: border-box;
}

.emoji-search:focus {
    outline: none;
    border-color: #007bff;
}

/* Emoji grid - REDUCED SIZE */
.emoji-category-content {
    display: none;
}

.emoji-category-content.active {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(28px, 1fr)); /* Reduced from 40px */
    gap: 3px; /* Reduced from 4px */
}

.rich-emoji-option {
    font-size: 20px; /* Reduced from 28px (28% smaller) */
    cursor: pointer;
    padding: 5px; /* Reduced from 8px */
    text-align: center;
    border-radius: 4px; /* Reduced from 6px */
    transition: all 0.2s ease;
    user-select: none;
}

.rich-emoji-option:hover {
    background-color: #f0f0f0;
    transform: scale(1.2);
}

.rich-emoji-option:active {
    transform: scale(0.95);
}

/* Category labels - REDUCED SIZE */
.category-label {
    font-size: 8px; /* Reduced from 12px */
    color: #666;
    font-weight: 600;
    margin: 5px 0 3px 0; /* Reduced from 8px 0 4px 0 */
    text-transform: uppercase;
}

/* Scrollbar styling */
.rich-emoji-picker::-webkit-scrollbar {
    width: 6px; /* Reduced from 8px */
}

.rich-emoji-picker::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.rich-emoji-picker::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.rich-emoji-picker::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.emoji-categories::-webkit-scrollbar {
    height: 3px; /* Reduced from 4px */
}

.emoji-categories::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.emoji-categories::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .rich-emoji-picker {
        max-width: 196px; /* 30% smaller than 280px */
        max-height: 245px; /* 30% smaller than 350px */
    }
    
    .rich-emoji-option {
        font-size: 17px; /* Reduced from 24px (29% smaller) */
        padding: 4px; /* Reduced from 6px */
    }
    
    .emoji-category-tab {
        font-size: 11px; /* Reduced from 16px (31% smaller) */
        padding: 4px 7px; /* Reduced from 6px 10px */
    }
}