/* Emoji Picker Custom Styles */
.emoji-picker-custom {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Position the picker dropdown */
.emoji-picker-dropdown {
    top: 50%;
    left: 0;
    margin-top: 0.5rem;
    width: 560px;
    max-height: 400px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* Emoji button styles */
.emoji-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 0.25rem;
    background-color: #f9fafb;
    color: #6b7280;
    font-size: 1rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

/* Container for emoji button inside textarea area */
.emoji-button-container {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    z-index: 10000;
}

.emoji-button:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.emoji-button:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
    ring-offset: 2px;
    border-color: #3b82f6;
}

.emoji-button.active {
    background-color: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .emoji-picker-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90vw;
        max-width: 320px;
        right: auto;
        margin-top: 0;
        z-index: 9999;
    }
}

/* Ensure emoji picker is visible */
.emoji-picker-dropdown .emoji-picker-custom,
.emoji-picker-dropdown .emoji-picker {
    border: none;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    max-height: 380px;
    z-index: inherit;
}

/* Force high z-index for all emoji picker elements */
.emoji-picker-dropdown,
.emoji-picker-dropdown *,
.emoji-picker {
    z-index: 9999 !important;
}

/* Ensure the parent container doesn't clip the dropdown */
.emoji-picker-dropdown {
    position: absolute !important;
}

/* Custom scrollbar for picker */
.emoji-picker-custom::-webkit-scrollbar {
    width: 8px;
}

.emoji-picker-custom::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.emoji-picker-custom::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.emoji-picker-custom::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}